Coder Social home page Coder Social logo

sefkhet-abwy's Introduction

Sefkhet-Abwy

This repository contains script/actions that could be executed by Sefkhet-Abwy, one of the many names Sesheta is known by.

label_normalizer

review-manager

The review manager will do two basic things: handle the 'do-not-merge' labels, and assign reviewers once a pull request is ready to be reviewed.

A Pull Request is ready to be reviewed if it has

  1. no label starting with "do-not-merge"
  2. the "local/check" status is "success" (so we know zuul is happy)

merge_master_into_pullrequest

A command line utility used to merge the current master of the base of a pull request into the pull request head. A human could also press the 'update branch' button on the GitHub web user interface.

Maintainability

sefkhet-abwy's People

Contributors

bissenbay avatar chauhankaranraj avatar codificat avatar dependabot[bot] avatar fridex avatar goern avatar harshad16 avatar khebhut[bot] avatar mayacostantini avatar saisankargochhayat avatar sesheta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sefkhet-abwy's Issues

Notify when a review for a PR is submitted

Is your feature request related to a problem? Please describe.
When I submitted a review and requested changes for this PR, there were no messages in the gchat group notifying about the review.
This is not a big problem, just a nice to have feature.

Describe the solution you'd like
Sesheta could notify the group chat when a review (requesting changes) has been submitted to a PR.

Describe alternatives you've considered
None

Additional context
Add any other context or screenshots about the feature request here.

NameError: name 'issue_url' is not defined

Sentry Issue: THOTH-1P0V

CancelledError: 
  File "octomachinery/utils/asynctools.py", line 43, in _aio_gather_iter_pairs
    yield await task_res_q.get()
  File "anyio/_backends/_asyncio.py", line 724, in get
    return await super().get()
  File "asyncio/queues.py", line 163, in get
    await getter

NameError: name 'issue_url' is not defined
(12 additional frame(s) were not displayed)
...
  File "octomachinery/utils/asynctools.py", line 43, in _aio_gather_iter_pairs
    yield await task_res_q.get()
  File "anyio/_backends/_asyncio.py", line 392, in __aexit__
    raise exceptions[0]
  File "anyio/_backends/_asyncio.py", line 415, in _run_wrapped_task
    await func(*args)
  File "octomachinery/utils/asynctools.py", line 21, in _send_task_res_to_q
    task_res = await aio_task
  File "review-manager", line 192, in on_pr_open_or_edit
    f"{issue_url}/labels", preview_api_version="symmetra", data={"labels": ["approved"]},

Task exception was never retrieved
future: <Task finished name='Task-1514' coro=<route_github_event() done, defined at /opt/app-root/lib64/python3.8/site-packages/octomachinery/routing/webhooks_dispatcher.py:22> exception=NameError("name 'issue_url' is not defined")>

tag release is failling sometimes

Describe the bug
something sebkhet-abwy is unable to tag the release

{'name': 'sefkhet-abwy[bot]', 'email': '50670076+sefkhet-abwy[bot]@users.noreply.github.com', 'date': '2020-07-17T13:18:16Z'}, 'object': {'sha': '2087f46f06a9e094f5177fdcc84a733e6efac23e', 'type': 'commit', 'url': 'https://api.github.com/repos/thoth-station/mi-scheduler/git/commits/2087f46f06a9e094f5177fdcc84a733e6efac23e' }, 'tag': 'v1.0.4', 'message': 'v1.0.4', 'verification': {'verified': False, 'reason': 'unsigned', 'signature': None, 'payload': None}}"}

need to investigate this

Pull request processing is failing and unable to post result back to github

Describe the bug
While handling the pull_request webhook event, the post API to respond back to github is having trouble.

await github_api.post(

Additional context

An unhandled exception happened while running webhook event handlers for \"pull_request\"...
Traceback (most recent call last):
  File \"/opt/app-root/lib64/python3.8/site-packages/octomachinery/routing/webhooks_dispatcher.py\", line 84, in route_github_event
    return await github_app.dispatch_event(github_event)
  File \"/opt/app-root/lib64/python3.8/site-packages/octomachinery/github/api/app_client.py\", line 64, in dispatch_event
    return await github_event.dispatch_via(
  File \"/opt/app-root/lib64/python3.8/site-packages/octomachinery/github/models/events.py\", line 146, in dispatch_via
    await aio_gather(*(
  File \"/opt/app-root/lib64/python3.8/site-packages/octomachinery/utils/asynctools.py\", line 54, in aio_gather
    result_pairs_gen = [_r async for _r in _aio_gather_iter_pairs(*aio_tasks)]
  File \"/opt/app-root/lib64/python3.8/site-packages/octomachinery/utils/asynctools.py\", line 54, in <listcomp>
    result_pairs_gen = [_r async for _r in _aio_gather_iter_pairs(*aio_tasks)]
  File \"/opt/app-root/lib64/python3.8/site-packages/octomachinery/utils/asynctools.py\", line 43, in _aio_gather_iter_pairs
    yield await task_res_q.get()
  File \"/opt/app-root/lib64/python3.8/site-packages/anyio/_backends/_asyncio.py\", line 392, in __aexit__
    raise exceptions[0]
  File \"/opt/app-root/lib64/python3.8/site-packages/anyio/_backends/_asyncio.py\", line 415, in _run_wrapped_task
    await func(*args)
  File \"/opt/app-root/lib64/python3.8/site-packages/octomachinery/utils/asynctools.py\", line 21, in _send_task_res_to_q
    task_res = await aio_task
  File \"/opt/app-root/lib64/python3.8/site-packages/octomachinery/routing/routers.py\", line 79, in dispatch
    await aio_gather(*callback_coros)
  File \"/opt/app-root/lib64/python3.8/site-packages/octomachinery/utils/asynctools.py\", line 54, in aio_gather
    result_pairs_gen = [_r async for _r in _aio_gather_iter_pairs(*aio_tasks)]
  File \"/opt/app-root/lib64/python3.8/site-packages/octomachinery/utils/asynctools.py\", line 54, in <listcomp>
    result_pairs_gen = [_r async for _r in _aio_gather_iter_pairs(*aio_tasks)]
  File \"/opt/app-root/lib64/python3.8/site-packages/octomachinery/utils/asynctools.py\", line 43, in _aio_gather_iter_pairs
    yield await task_res_q.get()
  File \"/opt/app-root/lib64/python3.8/site-packages/anyio/_backends/_asyncio.py\", line 392, in __aexit__
    raise exceptions[0]
  File \"/opt/app-root/lib64/python3.8/site-packages/anyio/_backends/_asyncio.py\", line 415, in _run_wrapped_task
    await func(*args)
  File \"/opt/app-root/lib64/python3.8/site-packages/octomachinery/utils/asynctools.py\", line 21, in _send_task_res_to_q
    task_res = await aio_task
  File \"review-manager\", line 183, in on_pr_open_or_edit
    await github_api.post(
  File \"/opt/app-root/lib64/python3.8/site-packages/octomachinery/github/api/utils.py\", line 45, in async_function_wrapper
    return await coroutine_instance
  File \"/opt/app-root/lib64/python3.8/site-packages/gidgethub/abc.py\", line 175, in post
    data, _ = await self._make_request(
TypeError: _make_request() got an unexpected keyword argument 'content_type'

Create new gchat thread for the day instead of a new thread for every message

Is your feature request related to a problem? Please describe.
In gchat sometimes there are too many threads so searching for an older message becomes a pain.

Describe the solution you'd like
Maybe Sesheta could create one new thread every day and post all messages for the day in that thread, instead of a new thread for every message.

Describe alternatives you've considered
None, it's not a big problem, just something that I thought would make the gchat feed look cleaner

ML based Labeling Bot

Is your feature request related to a problem? Please describe.
This bot will use a back end service to predict a set of labels for a given issue or pull request.

Describe the solution you'd like
one back end service should expose a ml model for inference

Describe alternatives you've considered
n/a

Additional context
n/a

Failed to update dependencies to their latest version

Automatic dependency update failed for the current master with SHA e6ec7b8.

The automatic dependency management cannot continue. Please fix errors reported bellow.

Command
  $ pipenv update --dev
Standard output

Standard error
Warning: Python 3.7 was not found on your system…
Neither 'pyenv' nor 'asdf' could be found to install Python.
You can specify specific versions of Python with:
$ pipenv --python path/to/python

Environment details

Kebechet version: 1.0.1
Python version: 3.6.8
Platform: Linux-3.10.0-957.21.2.el7.x86_64-x86_64-with-redhat-8.2-Ootpa
pipenv version: pipenv, version 2020.6.2


Dependency graph
Unable to obtain dependency graph:

Warning: Python 3.7 was not found on your system…
Neither 'pyenv' nor 'asdf' could be found to install Python.
You can specify specific versions of Python with:
$ pipenv --python path/to/python

Notes

For more information, see Pipfile and Pipfile.lock.

Once this issue is resolved, the issue will be automatically closed by bot.

Application cannot be managed by Kebechet due to Git package

Kebechet cannot support maintaining this application as it contain's Git version of packages.

The package causing the issue is - chatterbot
Linked SHA - e08f1c8

For more information, see Pipfile and Pipfile.lock.

Environment details

Kebechet version: 1.1.4
Python version: 3.6.8
Platform: Linux-4.18.0-193.14.3.el8_2.x86_64-x86_64-with-redhat-8.3-Ootpa
pipenv version: pipenv, version 2020.11.15


Sesheta crash

Seshseta crashes when you ask something other than release

2020-12-07 23:30:51,233 533003 INFO     aiohttp.access:206: 127.0.0.1 [07/Dec/2020:23:30:51 +0000] "GET / HTTP/1.1" 200 163 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36"
2020-12-07 23:30:51,422 533003 INFO     aiohttp.access:206: 127.0.0.1 [07/Dec/2020:23:30:51 +0000] "GET /favicon.ico HTTP/1.1" 404 172 "http://0.0.0.0:8080/" "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36"
2020-12-07 23:31:42,629 533003 INFO     aicoe.sesheta:186: Incoming json is - {'type': 'MESSAGE', 'eventTime': '2020-05-07T14:10:15.776351Z', 'token': 'jOL8inGgWL2ggc2Mhy4LPg8Rg8oABAKsFwEuhXGnejc=', 'threadKey': 'issue_metrics-exporter_613850043', 'message': {'name': 'spaces/AAAAmQJAdY0/messages/_xnU40B3ag4.iUaPJk4QuM8', 'sender': {'name': 'users/102814839969738411580', 'displayName': 'Christoph Goern', 'avatarUrl': 'https://lh3.googleusercontent.com/a-/AOh14GhINwWPPaTOVVSpT4ZMyhS-hPst5V4ueOOyWQMsfQ', 'email': '[email protected]', 'type': 'HUMAN', 'domainId': '2k0l5e8'}, 'createTime': '2020-05-07T14:10:15.776351Z', 'text': '@Sesheta create new minor release for srcops-testing', 'annotations': [{'type': 'USER_MENTION', 'startIndex': 0, 'length': 8, 'userMention': {'user': {'name': 'users/105351276524248843824', 'displayName': 'Sesheta', 'avatarUrl': 'https://lh5.googleusercontent.com/proxy/0FHgpNIo_Qqrh5mV9pnzv7rSTRj64k7ysJwnXmlhuujzSHV7PzBkXxjNmBmZ9hwUNv9enE26Z-OL8BcHr2vSTSe0DOJp1ssSvlRYtDavkg', 'type': 'BOT'}, 'type': 'MENTION'}}], 'thread': {'name': 'spaces/AAAAmQJAdY0/threads/_xnU40B3ag4', 'retentionSettings': {'state': 'PERMANENT'}}, 'space': {'name': 'spaces/AAAAmQJAdY0', 'type': 'ROOM', 'displayName': 'AICoE - Thoth DevOps - 🤖🧠 ', 'threaded': True}, 'argumentText': ' help'}, 'user': {'name': 'users/102814839969738411580', 'displayName': 'Christoph Goern', 'avatarUrl': 'https://lh3.googleusercontent.com/a-/AOh14GhINwWPPaTOVVSpT4ZMyhS-hPst5V4ueOOyWQMsfQ', 'email': '[email protected]', 'type': 'HUMAN', 'domainId': '2k0l5e8'}, 'space': {'name': 'spaces/AAAAmQJAdY0', 'type': 'ROOM', 'displayName': 'AICoE - Thoth DevOps - 🤖🧠 ', 'threaded': True}, 'configCompleteRedirectUrl': 'https://chat.google.com/api/bot_config_complete?token=ADmUIul61LWfF8fkGYlVwpw4ad2l3GHxQkXL8ugYqgl_aC7fUixCX1QSIjKI9kDcyoei-kZAluL0Ya9BZJk1TInQPSCe62buqwrNuEWDYAWUuKx58_FZYAnqZt-7OeFKW1AqxJ33kOOXH7g3CXN1'}
2020-12-07 23:31:42,629 533003 INFO     aicoe.sesheta:104: message on thread spaces/AAAAmQJAdY0/threads/_xnU40B3ag4: @Sesheta create new minor release for srcops-testing
2020-12-07 23:31:43,522 533003 DEBUG    aicoe.sesheta:175: 201
2020-12-07 23:31:43,523 533003 INFO     aiohttp.access:206: ::1 [07/Dec/2020:23:31:42 +0000] "POST /api/v1alpha1 HTTP/1.1" 200 278 "-" "PostmanRuntime/7.26.8"
2020-12-07 23:32:46,472 533003 INFO     aicoe.sesheta:186: Incoming json is - {'type': 'MESSAGE', 'eventTime': '2020-05-07T14:10:15.776351Z', 'token': 'jOL8inGgWL2ggc2Mhy4LPg8Rg8oABAKsFwEuhXGnejc=', 'threadKey': 'issue_metrics-exporter_613850043', 'message': {'name': 'spaces/AAAAmQJAdY0/messages/_xnU40B3ag4.iUaPJk4QuM8', 'sender': {'name': 'users/102814839969738411580', 'displayName': 'Christoph Goern', 'avatarUrl': 'https://lh3.googleusercontent.com/a-/AOh14GhINwWPPaTOVVSpT4ZMyhS-hPst5V4ueOOyWQMsfQ', 'email': '[email protected]', 'type': 'HUMAN', 'domainId': '2k0l5e8'}, 'createTime': '2020-05-07T14:10:15.776351Z', 'text': '@Sesheta hows the weather', 'annotations': [{'type': 'USER_MENTION', 'startIndex': 0, 'length': 8, 'userMention': {'user': {'name': 'users/105351276524248843824', 'displayName': 'Sesheta', 'avatarUrl': 'https://lh5.googleusercontent.com/proxy/0FHgpNIo_Qqrh5mV9pnzv7rSTRj64k7ysJwnXmlhuujzSHV7PzBkXxjNmBmZ9hwUNv9enE26Z-OL8BcHr2vSTSe0DOJp1ssSvlRYtDavkg', 'type': 'BOT'}, 'type': 'MENTION'}}], 'thread': {'name': 'spaces/AAAAmQJAdY0/threads/_xnU40B3ag4', 'retentionSettings': {'state': 'PERMANENT'}}, 'space': {'name': 'spaces/AAAAmQJAdY0', 'type': 'ROOM', 'displayName': 'AICoE - Thoth DevOps - 🤖🧠 ', 'threaded': True}, 'argumentText': ' help'}, 'user': {'name': 'users/102814839969738411580', 'displayName': 'Christoph Goern', 'avatarUrl': 'https://lh3.googleusercontent.com/a-/AOh14GhINwWPPaTOVVSpT4ZMyhS-hPst5V4ueOOyWQMsfQ', 'email': '[email protected]', 'type': 'HUMAN', 'domainId': '2k0l5e8'}, 'space': {'name': 'spaces/AAAAmQJAdY0', 'type': 'ROOM', 'displayName': 'AICoE - Thoth DevOps - 🤖🧠 ', 'threaded': True}, 'configCompleteRedirectUrl': 'https://chat.google.com/api/bot_config_complete?token=ADmUIul61LWfF8fkGYlVwpw4ad2l3GHxQkXL8ugYqgl_aC7fUixCX1QSIjKI9kDcyoei-kZAluL0Ya9BZJk1TInQPSCe62buqwrNuEWDYAWUuKx58_FZYAnqZt-7OeFKW1AqxJ33kOOXH7g3CXN1'}
2020-12-07 23:32:46,472 533003 INFO     aicoe.sesheta:104: message on thread spaces/AAAAmQJAdY0/threads/_xnU40B3ag4: @Sesheta hows the weather
2020-12-07 23:32:46,482 533003 INFO     chatterbot.chatterbot:44: Beginning search for close text match
2020-12-07 23:32:46,482 533003 INFO     chatterbot.chatterbot:70: Processing search results
2020-12-07 23:32:46,489 533003 INFO     chatterbot.chatterbot:39: Using "@Sesheta hows the weather" as a close match to "@Sesheta hows the weather" with a confidence of 0
2020-12-07 23:32:46,509 533003 INFO     chatterbot.chatterbot:77: No responses found. Generating alternate response list.
2020-12-07 23:32:46,519 533003 INFO     chatterbot.chatterbot:118: No known response to the input was found. Selecting a random response.
2020-12-07 23:32:46,519 533003 INFO     chatterbot.chatterbot:155: BestMatch selected "I can be copied infinitely and re-instantiated in many places at once, so functionally speaking I am immortal." as a response with a confidence of 0
2020-12-07 23:32:46,519 533003 ERROR    aiohttp.server:393: Error handling request
Traceback (most recent call last):
  File "/home/sai/.local/share/virtualenvs/Sefkhet-Abwy-q36jUd_B/lib64/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/home/sai/.local/share/virtualenvs/Sefkhet-Abwy-q36jUd_B/lib64/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "chatbot", line 194, in hangouts_handler
    return web.json_response({"text": text})
  File "/home/sai/.local/share/virtualenvs/Sefkhet-Abwy-q36jUd_B/lib64/python3.8/site-packages/aiohttp/web_response.py", line 773, in json_response
    text = dumps(data)
  File "/usr/lib64/python3.8/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib64/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib64/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib64/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type Statement is not JSON serializable

distinguish between human and cyborg

Is your feature request related to a problem? Please describe.
If a human closes a release PR, for example, because the release was done manually, the channel should not be notified.

Describe the solution you'd like
Only if a bot really released the notification should be sent to the channel.

Describe alternatives you've considered
n/a

Additional context
n/a

Prow requires ok-to-test on the automatic pr's

Is your feature request related to a problem? Please describe.
Kebechet opens automated PR's for the package update. In thoth-station, as we trust kebechet, we have automated the process of approving such PR's. with introduction of prow test, a ok-to-test comment is needed in the PR.
It is would good to have this automated as well for the thoth-station use case.

Additional context

thoth-station/integration-tests#127 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.