update to jsonpath-rust 1#1863
Conversation
Signed-off-by: tottoto <[email protected]>
712112e to
11d43fb
Compare
clux
left a comment
There was a problem hiding this comment.
thanks for this. looks generally sensible.
quick question; were you able to find release notes / changelog for 1.0 somewhere? the linked repo is out of date and was only able to see a diff on diff.rs (and that is enormous).
| let p = path.trim_matches(|c| c == '"' || c == '{' || c == '}'); | ||
| if p.starts_with('$') { | ||
| p | ||
| } else if p.starts_with('.') { | ||
| &format!("${p}") | ||
| } else { | ||
| &format!("$.{p}") | ||
| } |
There was a problem hiding this comment.
some new jsonpath-rust api changes that is different from kubernetes expectations?
There was a problem hiding this comment.
Yes. The main difference comes from jsonpath-rust following RFC 9535 more strictly in this versions. Behaviors around the root selector ($) and leading dots are tightened, which seem different from kubectl’s more permissive jsonpath implementation.
quick question; were you able to find release notes / changelog for 1.0 somewhere? the linked repo is out of date and was only able to see a diff on diff.rs (and that is enormous).
What I referred to was the Important note section in the repository’s README. Based on the RFC 9535 notes there, I tried the changes by testing the actual behavior and migrated accordingly.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1863 +/- ##
=======================================
- Coverage 74.8% 74.7% -0.0%
=======================================
Files 84 84
Lines 7950 7953 +3
=======================================
- Hits 5941 5940 -1
- Misses 2009 2013 +4
🚀 New features to boost your workflow:
|
Updates to
jsonpath-rust1.