-
Notifications
You must be signed in to change notification settings - Fork 20
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
Tagged job searching #191
Merged
Merged
Tagged job searching #191
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
plars
force-pushed
the
tagged-job-searching
branch
from
January 25, 2024 16:14
f167eea
to
b08f35d
Compare
Also added a how-to and tagged @tang-mm for the review on that |
plars
force-pushed
the
tagged-job-searching
branch
2 times, most recently
from
January 25, 2024 20:39
92c51dd
to
4034167
Compare
omar-selo
requested changes
Jan 26, 2024
plars
force-pushed
the
tagged-job-searching
branch
from
January 26, 2024 18:32
4034167
to
e8f9c49
Compare
plars
force-pushed
the
tagged-job-searching
branch
from
January 29, 2024 21:34
9f8f2f3
to
4cbbb7a
Compare
omar-selo
approved these changes
Jan 30, 2024
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 great
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.
Description
The motivation for this is to help support the creation of a spread backend for testflinger. (see jira card below)
The spread backend would submit a job that requests the devices it wants but only have them provision and stay in the allocate state. Then it would later go clean up the ones that were left. Ideally, it should just use the job_id and cancel the jobs once it's done with them, but they have some circumstances where they are unable to retain those job IDs and need to find the jobs somehow. They accomplish this on some of the cloud backends they support by tagging the systems they are using, then searching for them by that tag name. They also need the timestamp when the job was created so they can automate cancellation of the ones that are old.
The search API here defaults to only consider jobs that are active (not cancelled or completed). However, it was pretty straightforward to also add support for specifying that you wan to search for jobs in a specific state. This could be used for all sorts of other things, and I think the search API might be extended in the future to cover some other needs that we haven't though of yet.
Resolved issues
Fixes CERTTF-192
Documentation
Documentation added to the README and also to the job_schema reference docs.
Tests
Unit tests modified and added to cover both the addition of tags to the job, as well as the search API and all the different ways it can be used. I also tried this out locally of course.