-
Notifications
You must be signed in to change notification settings - Fork 5
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
Implement basic queueing #474
Conversation
aeed38c
to
dd3a260
Compare
Please do not review this now. I would like to merge #480 first, then rebase this PR so that it becomes way smaller and easier to digest. |
dd3a260
to
e1d6372
Compare
@kuebler @henninggross @gerardcl ready for a first review pass. I'm not really happy with it but also unsure what exactly to improve. Let me know if you have ideas! |
9761aca
to
b675529
Compare
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
1bfa1f1
to
51dbe63
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.
LGTM! 🚀
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.
All in all it LGTM.
I am a fan of explicit variable names and would probably have called all variables concerning pipeline runs pipelineRun
instead of pr
(e.g. oldestPipelineRun
instead of oldestPr
), especially because outside of ods-pipeline
the abbreviation PR in most cases means pull request, but that is personal preference and does not need to be implemented.
@henninggross re: variable name - in Go, short names aren't seen as bad practice per se, rather it depends on the context. I kind of try to follow https://github.com/golang/go/wiki/CodeReviewComments#variable-names. |
Pipeline runs belonging to one repository now run sequentially. If a
pipeline run cannot start immediately, it is created as "pending", and a
process is started to periodically check if it can start.
Since the pipeline manager service may be restarted, it check on boot if
there are any pending runs for the repositories under its control and
starts the periodic check for those.
We can improve on the design by adding a signal in the finish task of a
pipeline run that the run will soon finish, reducing the up to 30s wait
time for the next run.
Closes #394.
Tasks:
docs/design
directory or not applicabledocs
directory or not applicablemake test
) or not applicable