Skip to content

Update patch payload type#461

Merged
frank-spano merged 1 commit intomasterfrom
kube-patch-2
Mar 31, 2026
Merged

Update patch payload type#461
frank-spano merged 1 commit intomasterfrom
kube-patch-2

Conversation

@frank-spano
Copy link
Copy Markdown
Contributor

What does this PR do?

Changes patch field to google.protobuf.Value to avoid base64

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Reviewer's Checklist

Reviewers: please see the review guidelines.

@frank-spano frank-spano requested a review from a team as a code owner March 31, 2026 10:52
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ebac3582e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

// - For strategic-merge and merge: a JSON object, e.g. {"spec": {"replicas": 3}}
// - For json (RFC 6902): a JSON array, e.g. [{"op": "replace", "path": "/spec/replicas", "value": 3}]
// Uses google.protobuf.Value so protojson deserializes nested JSON natively (no base64).
google.protobuf.Value patch = 1 [(protoc.gen.jsonschema.field_options).required = true];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep patch field wire-compatible across versions

Changing field patch on tag 1 from bytes to google.protobuf.Value introduces a protobuf compatibility break for mixed-version deployments: old senders still encode raw JSON bytes on field 1, but new receivers now decode field 1 as an embedded message and can fail to unmarshal; conversely, new senders emit protobuf-encoded Value bytes that old receivers will treat as raw patch JSON and pass downstream incorrectly. This can break patch_deployment actions during rolling upgrades, so the new representation should use a new field number (or a compatibility oneof) instead of retyping the existing tag.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never deployed

@frank-spano frank-spano merged commit 7147916 into master Mar 31, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants