Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo activities #884

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Repo activities #884

wants to merge 15 commits into from

Conversation

zzstoatzz
Copy link
Collaborator

@zzstoatzz zzstoatzz commented Mar 25, 2024

image

  • github sends webhooks with payloads on repo events
  • fastapi /webhook endpoint (exposed by ngrok to internet) catches webhook payloads
  • endpoint submits prefect task handle_repo_request to the background for processing
  • handler submits some result from processing to redis for later
version 1
api-1    | INFO:     192.168.65.1:33029 - "POST /webhook HTTP/1.1" 200 OK
tasks-1  | 07:17:35.868 | INFO    | prefect.task_server - Starting task server...
tasks-1  | 07:17:35.869 | INFO    | prefect.task_server - Subscribing to tasks: handle_repo_request-cb4e7b4e96ba9b61c39bd705d33c4e44
tasks-1  | 07:21:10.763 | INFO    | prefect.task_server - Received task run: 248214f3-e73d-493b-a09c-2f7a02b0cfab - fabulous-pig
tasks-1  | [03/27/24 07:21:12] INFO     gh_util.handlers: WHO?: zzstoatzz     logging.py:86
tasks-1  |                              triggered an event: issue_comment
tasks-1  | 07:21:12.962 | INFO    | Task run 'Handle issue_comment event for zzstoatzz/gh' - serialized event saved to redis: zzstoatzz/gh:events -> issue_comment:about_support_filesystem:95618b50-ec0a-11ee-9e2e-f1c787ddfb31
tasks-1  | 07:21:13.115 | INFO    | Task run 'Handle issue_comment event for zzstoatzz/gh' - Finished in state Completed()
tasks-1  | 07:21:42.961 | INFO    | prefect.task_server - Received task run: c2dc82cd-1e2e-4a30-a82f-d235802bd09f - emerald-dalmatian
tasks-1  | [03/27/24 07:21:43] INFO     gh_util.handlers: WHO?: zzstoatzz     logging.py:86
tasks-1  |                              triggered an event: issue_comment
tasks-1  | 07:21:44.815 | INFO    | Task run 'Handle issue_comment event for zzstoatzz/gh' - serialized event saved to redis: zzstoatzz/gh:events -> issue_comment:about_support_operations:9f57b5bc-ec0a-11ee-88be-3ffbbfb0dfef
tasks-1  | 07:21:44.950 | INFO    | Task run 'Handle issue_comment event for zzstoatzz/gh' - Finished in state Completed()
version 0
api-1       | INFO:     192.168.65.1:55583 - "POST /webhook HTTP/1.1" 200 OK
handlers-1  | 06:01:25.731 | INFO    | prefect.task_server - Received task run: 2fca5c43-500d-4dc9-b3ef-85bf3ef780c3 - accurate-skunk
handlers-1  | 06:01:26.825 | INFO    | Task run 'Handle issue_comment event for zzstoatzz/gh' - handlers.py:13 _default_handler
handlers-1  |     request: GitHubWebhookRequest(
handlers-1  |         headers=GitHubWebhookEventHeaders(
handlers-1  |             host='tunnel.alternatebuild.dev',
handlers-1  |             event='issue_comment',
handlers-1  |             hook_id=462585496,
handlers-1  |             delivery='08fc0d0a-ea6d-11ee-94e3-ecea191a7da3',
handlers-1  |         ),
...
...
handlers-1  |     ) (GitHubWebhookRequest)
handlers-1  | 06:01:26.832 | INFO    | Task run 'Handle issue_comment event for zzstoatzz/gh' - got issue_comment event for zzstoatzz/gh
handlers-1  | 06:01:26.837 | INFO    | Task run 'Handle issue_comment event for zzstoatzz/gh' - serialized & saved to redis @ zzstoatzz/gh:issue_comment:08fc0d0a-ea6d-11ee-94e3-ecea191a7da3
handlers-1  | 06:01:27.079 | INFO    | Task run 'Handle issue_comment event for zzstoatzz/gh' - Finished in state Completed()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant