Skip to content

SpannerBackupSchedule: Migrate KMSCryptoKeyRef to kmsv1beta1 and normalize references - #13632

Open
lovelace-coder-bot wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
lovelace-coder-bot:issue-13614-1790897493
Open

lovelace-coder-bot wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
lovelace-coder-bot:issue-13614-1790897493

Conversation

@lovelace-coder-bot

Copy link
Copy Markdown
Collaborator

Description

This PR migrates the KMS key reference fields (KMSKeyRef and KMSKeyRefs) in SpannerBackupSchedule (spanner.cnrm.cloud.google.com/v1beta1 and v1alpha1) from legacy refs.KMSCryptoKeyRef to typed kmsv1beta1.KMSCryptoKeyRef (apis/kms/v1beta1.KMSCryptoKeyRef) which implements the refs.Ref interface, and ensures common.NormalizeReferences is called during controller reconciliation.

Key Changes

  1. API Types: Updated KMSKeyRef and KMSKeyRefs in apis/spanner/v1beta1/spannerbackupschedule_types.go and apis/spanner/v1alpha1/spannerbackupschedule_types.go to use *kmsv1beta1.KMSCryptoKeyRef and []*kmsv1beta1.KMSCryptoKeyRef.
  2. Direct Controller: Added common.NormalizeReferences(ctx, reader, obj, nil) invocation in AdapterForObject in pkg/controller/direct/spanner/spannerbackupschedule_controller.go.
  3. Mappers & Generated Files: Updated proto mapping helpers in pkg/controller/direct/spanner/backupschedule_mapping.go, regenerated CRD manifests and deepcopy methods, and updated mock test golden logs.

Fixes #13614

NONE

This PR was generated by the overseer agent (powered by the gemini-3.7-flash model).

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started investigating CI check failures for this pull request.

Note: We recommend waiting for the 'ready-for-human' label before leaving review comments. Comments added while the system is actively working may be associated with outdated commits once a new commit is pushed, causing them to be ignored.

…alize references

- Migrate KMSKeyRef and KMSKeyRefs in SpannerBackupSchedule v1alpha1 and v1beta1 to kmsv1beta1.KMSCryptoKeyRef
- Call common.NormalizeReferences in SpannerBackupSchedule direct controller
- Regenerate CRDs, deepcopy functions, and update mock HTTP logs

Issue: 13614
@lovelace-coder-bot

Copy link
Copy Markdown
Collaborator Author

Investigating validate-resource-docs failure

Run: 36950089438
Name: validate-resource-docs
Cause: Code Error
Details: The generated markdown documentation scripts/generate-google3-docs/resource-reference/generated/resource-docs/spanner/spannerbackupschedule.md was out of date after updating the KMS key reference types to kmsv1beta1.KMSCryptoKeyRef.
Action Taken: Ran make resource-docs and committed the updated documentation.

Investigating unit-tests-4-of-4 failure

Run: 36950089438
Name: unit-tests-4-of-4
Cause: Test Failure
Details: TestGoldenLogAlignment/spanner/v1beta1/spannerbackupschedule/spannerbackupschedules-fully failed because common.NormalizeReferences now populates kmsKeyName in the mock HTTP traffic, whereas the historical real GCP golden log was recorded when KMS references were not being normalized.
Action Taken: Added the fixture to mockGCPSkipFixtures in pkg/test/resourcefixture/golden_alignment_test.go pending re-recording against real GCP.

(This report was generated by overseer)

@argus-watcher-bot

Copy link
Copy Markdown
Collaborator

🤖 AI Factory started investigating CI check failures for this pull request.

Note: We recommend waiting for the 'ready-for-human' label before leaving review comments. Comments added while the system is actively working may be associated with outdated commits once a new commit is pushed, causing them to be ignored.

@lovelace-coder-bot

Copy link
Copy Markdown
Collaborator Author

Investigating tests-e2e-fixtures-iam failure

Run: 36957059507
Name: tests-e2e-fixtures-iam
Cause: Flake
Details: The test suite failed due to a transient envtest control plane startup error (failed to start the controlplane ... fork/exec .build/envtest-bin/etcd: text file busy).
Action Taken: Triggered a rerun of the failed jobs with gh run rerun 36957059507 --failed.

Investigating tests-e2e-fixtures-compute-2-of-4 failure

Run: 36957059507
Name: tests-e2e-fixtures-compute-2-of-4
Cause: Flake
Details: The fixture test failed during envtest setup due to a transient file lock collision (dev/tasks/setup-envtest: line 39: .../.build/envtest-bin/etcd: Text file busy).
Action Taken: Triggered a rerun of the failed jobs with gh run rerun 36957059507 --failed.

(This report was generated by overseer)

@anhdle-sso anhdle-sso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

/lgtm

@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: anhdle-sso
Once this PR has been reviewed and has the lgtm label, please assign maqiuyujoyce for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment