-
Notifications
You must be signed in to change notification settings - Fork 49
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
Copr error retries #1579
Copr error retries #1579
Conversation
@lachmanfrantisek the issue says that if there is a permission error, the task should be put back in the queue as well, but since users are easily able to retrigger the build (as opposed to bodhi updates) after resolving the permissions issue, I implemented it in the way that for these exceptions the task will not be retried, WDYT? Also, I was thinking what should be the interval for retrying if there is a Copr error, now it is set to 1 minute. |
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice changes, a few suggestions for improvements
@@ -209,6 +211,49 @@ def get_packit_commands_from_comment( | |||
return [] | |||
|
|||
|
|||
class CeleryTask: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My initial thought was to put the relevant methods into JobHandler
but I like your solution (new class wrapping celery's Task
) more 👍
9d5d4b8
to
e916465
Compare
This comment was marked as outdated.
This comment was marked as outdated.
e916465
to
608d656
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Is the retrigger easy also for the commit or release trigger? (Is the I would say if we can be clever, why not do it. Do you see any problem in the implementation or performance? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good! I would maybe go with the retries for permission issues as well
(just with bigger intervals like with Bodhi).
class CeleryTask: | ||
""" | ||
Class wrapping the Celery task object with methods related to retrying. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, thanks for that!
@lachmanfrantisek My point was more that via check or comment retries users can trigger the builds when they are done with resolving the permission issue, which e.g. may be sooner than our interval is set. From the implementation POV I don't see a problem. In that case, can the interval for the permission issues where a user action is required 10 minutes (the same as for Bodhi) and for others the one minute with exponential backoff? |
608d656
to
05ab86a
Compare
I was looking into the Copr exceptions and also our Sentry issues and implemented retrying for |
Build succeeded. ✔️ pre-commit SUCCESS in 1m 50s |
The functionality for retrying the tasks is now used in more places, therefore create a new class that will wrap the celery task object and add functionality on top of it.
05ab86a
to
71fdbec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This can help in case there is an Copr outage. If retrying, set the status so that user knows the task will be retried.
71fdbec
to
3240ce5
Compare
Build failed. ✔️ pre-commit SUCCESS in 2m 05s |
recheck |
Build succeeded. ✔️ pre-commit SUCCESS in 2m 01s |
Build succeeded (gate pipeline). ✔️ pre-commit SUCCESS in 1m 58s |
TODO:
Fixes #1549
RELEASE NOTES BEGIN
During creating Copr builds, on Copr errors, Packit will retry the task multiple times
in case there is a Copr outage.
RELEASE NOTES END