Repository navigation
alloydb: fix labels and initial_user takeover diffs in AlloyDBCluster direct controller - #13963
Merged
anhdle-sso merged 5 commits intoOct 16, 2026
Merged
Conversation
… direct controller - Differentiate Create vs Update in buildDesired, adopting live GCP state for unset fields on update - Handle write-only initialUser using mutable-but-unreadable annotation pattern - Canonicalize network reference in normalize callback to prevent project number vs ID diffs - Eliminate resolveGCPDefaults to send minimal AIP-134 field masks - Add label coverage in basicalloydbcluster test fixture and align golden logs Fixes GoogleCloudPlatform#13579
anhdle-sso
force-pushed
the
alloydbcluster-fix
branch
from
October 14, 2026 00:03
3bb4762 to
4dcb3f0
Compare
gemmahou
reviewed
Oct 14, 2026
anhdle-sso
force-pushed
the
alloydbcluster-fix
branch
from
October 14, 2026 22:53
ed6a389 to
f31c0bb
Compare
Normalize .ipAddress and .response.ipAddress to 10.1.2.3 for networkconnectivity services, resolving diff failures in regionalendpoint tests caused by scoping mockalloydb normalizers. ```release-note NONE ```
gemmahou
approved these changes
Oct 15, 2026
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: gemmahou The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Merged
via the queue into
GoogleCloudPlatform:master
with commit Oct 16, 2026
9aeb98b
254 checks passed
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.
Description
This PR addresses false-positive diffs (
labels,initialUser, andnetwork) observed during takeover and re-reconciliation in theAlloyDBClusterdirect controller.This replaces and supersedes #13619, rebased onto current
masterwith review feedback addressed.Changes
buildDesiredForCreate(applies defaults to pure copy) vsbuildDesiredForUpdate(usescommon.MergeUnsetFieldsto adopt live GCP state for unset fields instead of overwriting with defaults).resolveGCPDefaultsto send minimal AIP-134 field masks.common.CompareBrownfieldSpecAndLabelsandlabel.GCPLabels(u)for brownfield label comparison, preventing system label drift.initialUservia mutable-but-unreadable annotation pattern (pkg/k8s/mutableunreadable.go).computerefs.CanonicalizeNetworkValueduring normalization to avoid false diffs between project ID and project number formats fornetwork/networkConfig.network.computerefs.CanonicalizeNetworkValuefor use in controller normalization callbacks.serviceAccountEmail,dataplexConfig, and database version formatting.basicalloydbcluster(create.yaml&update.yaml) and updated golden logs.Testing
./dev/ci/presubmits/tests-e2e-fixtures-suite alloydb(22/22 PASS)./dev/ci/presubmits/tests-e2e-fixtures-suite networkconnectivity(12/12 PASS)pkg/controller/direct/alloydb,apis/compute/refs,golden_alignment_test.goall pass.Fixes #13579