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
Escape special characters in jsonpath field names. #33901
Conversation
Example: `{.items[*].metadata.labels.kubernetes\.io/hostname}` [Resolves kubernetes#31984]
Can a kubernetes member verify that this patch is reasonable to test? If so, please reply with "@k8s-bot ok to test" on its own line. Regular contributors should join the org to skip this step. |
for { | ||
r = p.next() | ||
if isTerminator(r) { | ||
switch r := p.next(); { |
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.
rather than do the labelled breaking, I'd introduce a new helper function:
func advance(p *Parser) bool {
switch r := p.next(); {
...
}
}
...
for advance(p) {}
...
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.
Sounds good, made the change.
/lgtm @k8s-bot ok to test. |
@brendandburns: I see that the submit queue status check is still pending, but I don't see this PR in the queue at http://submit-queue.k8s.io/#/queue?prDisplay=33901&historyDisplay=33901. Do I need to do anything to get tests to run? Thanks! |
@k8s-bot ok to test |
@jmcarp sorry, I guess the bot doesn't like it when it's comment isn't the first thing on a line... tests running now. |
Jenkins verification failed for commit 6787b67. Full PR test history. The magic incantation to run this job again is |
@k8s-bot verification test this Issue: IGNORE There are no failures that I can see... |
I took another look at the build output, and it looks like I just had to run |
Tests are green, LGTM! |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
@k8s-bot verify test this |
Automatic merge from submit-queue |
There may be a better way to do this, but this seemed like the simplest possible version.
Example:
{.items[*].metadata.labels.kubernetes\.io/hostname}
[Resolves #31984]
This change is