This repository was archived by the owner on Sep 12, 2024. It is now read-only.
Adding global flag --strict-start to wildcard-based commands.#1269
Open
hstefan wants to merge 1 commit intospotify:masterfrom
Open
Adding global flag --strict-start to wildcard-based commands.#1269hstefan wants to merge 1 commit intospotify:masterfrom
--strict-start to wildcard-based commands.#1269hstefan wants to merge 1 commit intospotify:masterfrom
Conversation
mattnworb
suggested changes
Apr 8, 2019
Member
mattnworb
left a comment
There was a problem hiding this comment.
LGTM overall. Could you add a test for the behavior in WildcardJobCommand?
| private final List<Target> targets; | ||
| private final String username; | ||
| private boolean json; | ||
| private boolean strictStart; |
Member
There was a problem hiding this comment.
could you add strictStart to WildcardJobCommand instead of as a global flag for all commands in CliParser? It looks to me like it is only used and needed in WildcardJobCommand instances.
22ab3e1 to
cf13def
Compare
This forces job names to be matched from the string start. By default, some commands will match on any jobs that contain the input name as a substring, this option forces the match to only happen if the string starts with the input name. Affects the subcommands: remove, inspect, rolling-update, undeploy, deploy and stop. The motivation behind this is production usages returning "JOB_AMBIGUOUS_REFERENCE" in cases where a job's name is a substring of another (eg: foo-bar and bar-foo-bar, as the first a substring of the second).
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This forces job names to be matched from the string start. By default,
some commands will match on any jobs that contain the input name as a
substring, this option forces the match to only happen if the string
starts with the input name. Affects the subcommands: remove, inspect,
rolling-update, undeploy, deploy and stop.
The motivation behind this is production usages returning
"JOB_AMBIGUOUS_REFERENCE" in cases where a job's name is a substring of
another (eg: foo-bar and bar-foo-bar, as the first a substring of the
second).