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

SWATCH-3036: Fix pagination to process remittances retries #3879

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

Sgitario
Copy link
Contributor

Jira issue: SWATCH-3036

Description

When asking for next pages, since at the same time, we're also updating the remittances to clear the retry_after, we won't be consuming all the remittances.

To address this issue, we'll always asking for the first page which eventually reach zero. Moreover, we will first count the number of remittances and won't process more than this count (this is to avoid edge conditions and process new usages that might lead in endless

Testing

Added a test to reproduce the pagination issue.

@kahowell kahowell self-assigned this Oct 22, 2024
@kahowell kahowell added Dev/approved Pull requests that have been approved by all assigned developers QE Pull request should be approved by QE before merge labels Oct 22, 2024
@TrayvonMcKnight TrayvonMcKnight self-assigned this Oct 22, 2024
Copy link
Contributor

@TrayvonMcKnight TrayvonMcKnight left a comment

Choose a reason for hiding this comment

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

One of the CI test failures is unrelated - hosts issues.

The other two failures, the remittance is in pending state but I don't think those failures are impacted by these changes.

@TrayvonMcKnight TrayvonMcKnight added QE/approved Pull requests that have been approved by all assigned QEs and removed QE Pull request should be approved by QE before merge labels Oct 22, 2024
When asking for next pages, since at the same time, we're also updating the remittances to clear the retry_after, we won't be consuming all the remittances. 

To address this issue, we'll always asking for the first page which eventually reach zero. Moreover, we will first count the number of remittances and won't process more than this count (this is to avoid edge conditions and process new usages that might lead in endless operation)
@Sgitario Sgitario merged commit 1f8aad6 into main Oct 24, 2024
12 of 16 checks passed
@Sgitario Sgitario deleted the jcarvaja/SWATCH-3036 branch October 24, 2024 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev/approved Pull requests that have been approved by all assigned developers QE/approved Pull requests that have been approved by all assigned QEs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants