-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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 bug in JSON path parser where an error occurs when a range is empty #95933
Conversation
/retest |
/assign @caesarxuchao |
1d04342
to
10634c6
Compare
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brianpursley, caesarxuchao The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@brianpursley can you make a cherry-pick to 1.19? Thanks. |
…#95933-upstream-release-1.19 Automated cherry pick of #95933: Fix bug in JSON path parser where an error occurs when a
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fix bug in JSON path parser where an error occurs when a range is empty.
The problem was that if the range contained no results, the position of the parser loop was not advanced to the end node, so when it reached the end node in the loop it seemed like there was no open range.
The fix is to make sure even if there are not results in the range, that it still advances to the end node as if it had processed something.
(BTW, this whole file seems sort of fragile and hard to conceptualize due to all the counters that are used across functions. Seems like there should be some opportunity to improve this, but that is for another time)
Which issue(s) this PR fixes:
Fixes #95882
Special notes for your reviewer:
This probably needs to be cherry-picked back to 1.19, where the problem was introduced.
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: