Skip to content
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

Breaking api changes between minor versions of json-patch dependency #1486

Closed
avtrujillo opened this issue May 6, 2024 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@avtrujillo
Copy link

Current and expected behavior

Code that previously compiled successfully started failing with multiple errors similar to

281.0 --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/kube-runtime-0.90.0/src/finalizer.rs:141:31
281.0 |
281.0 141 | path: finalizer_path.clone(),
281.0 | ^^^^^^^^^^^^^^^^^^^^^^ expected Pointer, found String

without any change to the version of my kube dependency. After some digging, I found that json-patch made breaking api changes between v1.2.0 and v1.3.0, which replaced several uses of String with jsonptr's Pointer in the public fields of several public structs used by kube, including RemoveOperation, MoveOperation, PatchOperation, CopyOperation, ReplaceOperation and AddOperation.

Possible solution

Set json-patch "= 1.2.0" in Cargo.toml as a temporary solution, or bump the json-patch version and replace usage of String with jsonptr's Pointer type where appropriate.

Additional context

No response

Environment

Client Version: v1.26.15-dispatcher
Kustomize Version: v4.5.7
Server Version: v1.27.11-gke.1062001

Dockerfile OS: rust-1.77.2-slim-bookworm

Configuration and features

No response

Affected crates

kube-runtime

Would you like to work on fixing this bug?

maybe

@avtrujillo avtrujillo added the bug Something isn't working label May 6, 2024
4t145 added a commit to 4t145/tardis that referenced this issue May 6, 2024
@pgerber
Copy link

pgerber commented May 6, 2024

Upstream report: idubrov/json-patch#39

@clux
Copy link
Member

clux commented May 6, 2024

Thanks for the report. This has had not hit any renovate cycles for myself yet. It looks like it's yanked, reverted (on the 1.x branch), and published under a new 1.4.0 release of json-patch - so hopefully this should not affect any new CI runs for people.

@clux
Copy link
Member

clux commented May 7, 2024

Closing as fixed upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants