Upgrade dependencies and make PodHash ignore empty fields#290
Open
Upgrade dependencies and make PodHash ignore empty fields#290
Conversation
…ration test coverage
jaypipes
reviewed
Apr 23, 2026
| @@ -0,0 +1,23 @@ | |||
| # Changelog | |||
There was a problem hiding this comment.
Is this file being added intentionally? In particular the ## [Unreleased] section header below looks wrong. :)
Collaborator
Author
There was a problem hiding this comment.
yes, I was inspired by https://github.com/kedacore/keda/blob/main/CHANGELOG.md which tracks important changes as they go in, so that come release time it is easier to know what notices to include in the release notes.
We don't have to use this strategy though, I just thought of it because I would like to put a note about the one-time hash function change in our upcoming release notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
Kubernetes v0.35 added new optional fields to core pod types — notably
RestartPolicyRulesonContainerandHostnameOverrideandWorkloadRefonPodSpec. The previous hash implementation used spew to serialize the pod spec, which includes every struct field regardless of whether it is set. Adding new zero-value fields to the struct therefore changed the hash output even when the actual pod spec was unchanged.The controller now uses
json.Marshalto serialize pod specs before hashing. Kubernetes types useomitemptyon all optional fields, so new zero-value fields introduced in future API versions are omitted from the JSON output and do not affect the hash.Added
CHANGELOG.mdto track notable changes and serve as a basis for release notes.Upgrade notes for the next release
One-time Build ID rollout. Because the hash algorithm changed, each
TemporalWorkerDeploymentwill be assigned a new build ID on its first reconcile after upgrading the controller. This causes a normal, safe rollout: existing workers continue serving traffic while pods on the new build ID start up, exactly as happens during any image upgrade. No manual intervention is required, and tracking of existing builds and their Temporal routing state is not affected. After this one-time rollout, build IDs will remain stable across future Kubernetes API upgrades.Why?
We should test against modern servers, and be able to upgrade k8s API anytime without changing build id computation.
This server upgrade was motivated by a desire to test the controller against a new rate limit which was not included in previous servers.
Checklist
Closes
How was this tested:
Existing tests. Needed to change expected results for hash tests.
Any docs updates needed?
Updated CHANGELOG.md