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

Handle needs-reconnect integrations #1474

Merged
merged 3 commits into from
Sep 12, 2023

Conversation

themarolt
Copy link
Contributor

@themarolt themarolt commented Sep 12, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at ea49cf2

This pull request enhances the error handling and cleanup logic for the integration stream service, which handles data from webhook providers like GitHub. It adds a new method to delete webhooks from the database, a new condition to handle GitHub's secondary rate limit, and a new enum value to indicate integrations that need to be reconnected.

🤖 Generated by Copilot at ea49cf2

Sing, O Muse, of the skillful coder who devised
A way to handle errors from the GitHub API,
And to delete the webhooks that had expired
Or lost their connection with the integration stream.

Why

How

🤖 Generated by Copilot at ea49cf2

  • Add needs-reconnect value to IntegrationState enum to handle integrations that require reconnection (link)
  • Delete webhooks and streams from database when they are no longer valid or needed (link, link, link)
  • Mark webhooks as having errors when stream processing fails due to webhook provider issues (link)
  • Skip stream processing when integration state is needs-reconnect or integration-deleted (link, link)
  • Handle secondary rate limit errors from GitHub API in BaseQuery class (link)
  • Remove redundant code that marks webhooks as having errors in processWebhook method (link)
  • Import IntegrationState enum from types library to IntegrationStreamService class (link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@themarolt themarolt merged commit 0aa000c into main Sep 12, 2023
6 of 8 checks passed
@themarolt themarolt deleted the hotfix/handle-needs-reconnect-integrations branch September 12, 2023 12:23
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

2 participants