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
Turn hydra-notify into a daemon #668
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Awesome ! |
It now receives notifications about started/finished builds/steps via PostgreSQL. This gets rid of the (substantial) overhead of starting hydra-notify for every event. It also allows other programs (even on other machines) to listen to Hydra notifications.
* 'eval_started' has the format '<tmpId>\t<project>\t<jobset>'. * 'eval_failed' has the format '<tmpId>'. (The cause of the error can be found in the database.) * 'eval_added' has the format '<tmpId>:<evalId>'.
Plugins are now disabled at startup time unless there is some relevant configuration in hydra.conf. This avoids hydra-notify having to do a lot of redundant work (a lot of plugins did a lot of database queries *before* deciding they were disabled). Note: BitBucketStatus users will need to add 'enable_bitbucket_status = 1' to hydra.conf.
In particular, doing a 'select * from Jobsets where ...' must be avoided, because the 'errormsg' column can be very big.
edolstra
force-pushed
the
notifications
branch
from
August 13, 2019 16:18
14434a5
to
92d8d6b
Compare
I take everything back I said. We just weren't running the new daemon, because we still had an older version of the module. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
hydra-notify
is now a daemon that receives events fromhydra-queue-runner
by listening to PostgreSQL notifications. This makes it a lot more efficient: not starting ahydra-notify
process for each event avoids the ~1s startup time loading all the plugins. Also, it allows future plugins to be written in any language as long as they can listen to PostgreSQL notifications, and to run on different machines from the queue runner.The PostgreSQL notifications are:
step_started
step_finished
build_started
build_finished
eval_started
eval_failed
eval_cached
eval_added