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
cli: support wildcard namespace in alloc subcommands #18095
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
tgross
force-pushed
the
alloc-command-wildcard-namespace
branch
from
July 28, 2023 20:12
4192c16
to
f0a7136
Compare
tgross
force-pushed
the
alloc-command-wildcard-namespace
branch
from
July 28, 2023 20:21
f0a7136
to
54ef908
Compare
lgfa29
approved these changes
Jul 28, 2023
Failing test is because of #18100. I'll rebase this on |
The alloc exec and filesystem/logs commands allow passing the `-job` flag to select a random allocation. If the namespace for the command is set to `*`, the RPC handler doesn't handle this correctly as it's expecting to query for a specific job. Most commands handle this ambiguity by first verifying that only a single object of the type in question exists (ex. a single node or job). Update these commands so that when the `-job` flag is set we first verify there's a single job that matches. This also allows us to extend the functionality to allow for the `-job` flag to support prefix matching. Fixes: #12097
tgross
force-pushed
the
alloc-command-wildcard-namespace
branch
from
July 31, 2023 15:54
54ef908
to
e5c6a28
Compare
tgross
added a commit
that referenced
this pull request
Jul 31, 2023
The alloc exec and filesystem/logs commands allow passing the `-job` flag to select a random allocation. If the namespace for the command is set to `*`, the RPC handler doesn't handle this correctly as it's expecting to query for a specific job. Most commands handle this ambiguity by first verifying that only a single object of the type in question exists (ex. a single node or job). Update these commands so that when the `-job` flag is set we first verify there's a single job that matches. This also allows us to extend the functionality to allow for the `-job` flag to support prefix matching. Fixes: #12097
Backported to 1.6.x |
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.
The alloc exec and filesystem/logs commands allow passing the
-job
flag to select a random allocation. If the namespace for the command is set to*
, the RPC handler doesn't handle this correctly as it's expecting to query for a specific job. Most commands handle this ambiguity by first verifying that only a single object of the type in question exists (ex. a single node or job).Update these commands so that when the
-job
flag is set we first verify there's a single job that matches. This also allows us to extend the functionality to allow for the-job
flag to support prefix matching.Fixes: #12097
What this looks like if there are multiple matching jobs: