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

ARCO-183: implement quarantine for problematic callback receivers #587

Merged
merged 5 commits into from
Sep 18, 2024

Conversation

arkadiuszos4chain
Copy link
Collaborator

@arkadiuszos4chain arkadiuszos4chain commented Sep 12, 2024

Description of Changes

This update introduces a quarantine mechanism for receivers that fail to handle callbacks, helping to prevent repeated failed sends.

Changes:

  • if a callback fails to send, the receiver is placed in quarantine
  • during the quarantine period, all incoming callbacks for that receiver are persisted to storage
  • the system periodically checks the stored callbacks and attempts to resend them once the quarantine period ends
  • a cleanup process periodically prunes the store, removing outdated and unsent callbacks

Testing Procedure

  • I have added new unit tests
  • All tests pass locally
  • I have tested manually in my local environment

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have updated CHANGELOG.md with my changes

@arkadiuszos4chain arkadiuszos4chain self-assigned this Sep 12, 2024
@arkadiuszos4chain arkadiuszos4chain changed the title ARCO-183: put problematic callback receivers to quarantine ARCO-183: implement quarantine for problematic callback receivers Sep 12, 2024
@arkadiuszos4chain arkadiuszos4chain marked this pull request as ready for review September 12, 2024 15:31
@@ -0,0 +1,3 @@
ALTER TABLE callbacker.callbacks ADD COLUMN quarantine_until TIMESTAMPTZ;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think correct english would be quarantined_until, but not sure.
Thinking of naming I think the callback itself is not quarantined, but rather the URL.

What would you think of postponed_until?
IMO that would be a bit more expressive name of the field

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, it's a better name.
Changed

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
70.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@arkadiuszos4chain arkadiuszos4chain merged commit 55bb6cf into main Sep 18, 2024
4 of 5 checks passed
@arkadiuszos4chain arkadiuszos4chain deleted the feat-arco-183 branch September 18, 2024 13:34
github-actions bot pushed a commit that referenced this pull request Sep 18, 2024
* ARCO-183: put problematic callback receivers to quarantine
* ARCO-200: document changes and describe callbacker components (#588)
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.

3 participants