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
Set notification status to done for dependent builds. #594
Conversation
When a build completes with error, the dependent builds are updated with errors as well, and notifications are sent for all these builds, but the DB wasn't setting the notification completion indication for the dependent builds. One effect of this is that on hydra restart, notifications would *again* be sent for all dependent build failures, causing duplicate notifications, many of which were often very old.
I'm not really able to determine if this is a proper fix, or more of a hack? |
Thank you for taking a look at this PR, @grahamc. This is intended to be a proper fix. The code following this block will send the notifications for this build and all of its dependents: hydra/src/hydra-queue-runner/builder.cc Lines 466 to 471 in 1e804d1
This modification ensures that the hydra/src/hydra-queue-runner/hydra-queue-runner.cc Lines 850 to 861 in 1e804d1
This fix is based on our local running hydra and the complaints of users, which this fix resolved. The alternative would be to remove lines 466-471 in builder.cc and let the hydra-queue-runner.cc handle the notifications, but it does seem to communicate the intent more directly to instigate those notifications in 466-471. |
I have a new appreciation for this PR after reviewing the notification work. I'm not sure this PR is the right thing: it seems to me that the right behavior is:
then let hydra-notify handle the per-build marking as notified. If this isn't the right behavior, then maybe hydra-notify should run the handlers per ID in the payload, and not just pass the extra IDs as an additional argument. |
Independently addressed in 4417f9f |
Interesting. Okay :) 🤷 |
When a build completes with error, the dependent builds are updated
with errors as well, and notifications are sent for all these builds,
but the DB wasn't setting the notification completion indication for
the dependent builds. One effect of this is that on hydra restart,
notifications would again be sent for all dependent build failures,
causing duplicate notifications, many of which were often very old.