-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix exact job match when prefix of other job #3120
Conversation
command/status.go
Outdated
@@ -134,3 +138,15 @@ func (c *StatusCommand) Run(args []string) int { | |||
|
|||
return cmd.Run(argsCopy) | |||
} | |||
|
|||
func (c *StatusCommand) outputMultipleMatches(id string, matches map[contexts.Context][]string) { |
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.
Maybe "logErrorForMultipleMatches", or a function name that is a bit more descriptive.
match = ctx | ||
matchCount++ | ||
} else if l > 0 && vers[0] == id { |
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.
Is it guaranteed that the first element would be the exact match, rather than vers[1] or later?
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.
Yeah they are sorted
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR does the following:
querying of a job that is a prefix of another.
searching. The other status commands still need to be updated.
Fixes #3117
Fixes #3118