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

feat: exponential backoff on retrieval failure #63

Conversation

gentlementlegen
Copy link
Member

Resolves #4

@gentlementlegen
Copy link
Member Author

What's new

When retrieving the comments, if there is any failure, the script will attempt again to fetch the comments. In the meantime, it updates the comment in the Issue saying that it is retrying, until eventually put a final error message if it keeps failing.

The amount of tries and the delay is configurable through variables within the configuration file. Related tests have been added as well.

QA run

Meniole#6 (comment)
(Click on the edited button of the bot's comment to see all the messages that were displayed during the run).

@gentlementlegen gentlementlegen marked this pull request as ready for review July 19, 2024 05:10
Copy link
Member

@0x4007 0x4007 left a comment

Choose a reason for hiding this comment

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

Seems good overall but consider changing the property names.

README.md Outdated Show resolved Hide resolved
Copy link
Member

@0x4007 0x4007 left a comment

Choose a reason for hiding this comment

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

Perhaps in the future we can parse time the same way we do with our other plugins like the follow up and unassignment with the plain english strings "3.5 days" "7 days"

@gentlementlegen
Copy link
Member Author

@0x4007 We can do that although in this case it cannot be more than 6 hours before the Action is shut down, don't know if it is that useful. I guess we can still put "10 minutes" or "1 hour".

Copy link
Member

@rndquu rndquu left a comment

Choose a reason for hiding this comment

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

Works fine

@gentlementlegen gentlementlegen merged commit 6d8bd23 into ubiquity-os-marketplace:development Jul 19, 2024
3 checks passed
@gentlementlegen gentlementlegen deleted the feat/exponential-backoff branch July 19, 2024 08:31
@whilefoo
Copy link
Contributor

actually there is an official octokit plugin plugin-retry that handles retries for all octokit requests - we are already using this in the kernel

@gentlementlegen
Copy link
Member Author

@whilefoo thanks for the information. I can switch to that package within another pull request.

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.

Exponential Backoff Instead of Fail
4 participants