Skip to content

Conversation

acpana
Copy link
Collaborator

@acpana acpana commented Jul 25, 2025

Follow up on #4838 (comment)

Does this PR add something which needs to be 'release noted'?

 Support SQLInstance `maintenanceVersion` in CREATE operation

@acpana acpana added this to the 1.134 milestone Jul 25, 2025
@acpana
Copy link
Collaborator Author

acpana commented Jul 28, 2025

/hold will wait on #4838 to merge first.

@acpana acpana force-pushed the acpana/sqlinstance-fields-mv branch from 401f26c to 4544723 Compare July 31, 2025 05:33
@acpana acpana force-pushed the acpana/sqlinstance-fields-mv branch from 17b2212 to 3eab59b Compare August 12, 2025 21:41
@acpana acpana force-pushed the acpana/sqlinstance-fields-mv-create branch from 8809383 to f36b5fc Compare August 14, 2025 20:49
@acpana acpana changed the base branch from acpana/sqlinstance-fields-mv to master August 14, 2025 20:49
@acpana
Copy link
Collaborator Author

acpana commented Aug 14, 2025

/hold cancel

acpana added 6 commits August 14, 2025 23:59
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
genai: Improve the fidelity of this mock to mimick the behavior of
the real server on CREATE when trying to pass in the maintenenaceVersion

pasted log results

Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
@acpana acpana force-pushed the acpana/sqlinstance-fields-mv-create branch from f36b5fc to c77d6f6 Compare August 15, 2025 00:00
@xiaoweim
Copy link
Collaborator

qq: if the create operation is successful but the patch operation failed, that means the resource exist but without the maintenanceVersion?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@xiaoweim

re

qq: if the create operation is successful but the patch operation failed, that means the resource exist but without the maintenanceVersion?

yes that might be the case but the GCP API server will have defaulted the maintenenceVersion already.

Copy link
Collaborator

Choose a reason for hiding this comment

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

do we let the user know that they have failed to set the value or we will keep trying to update the value during reconciliation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

both as I understand it! we will also attempt that to re-reconcile via UPDATE next time around

@xiaoweim
Copy link
Collaborator

/lgtm

name: sqlinstance-postgres-minimal-direct-${uniqueId}
annotations:
alpha.cnrm.cloud.google.com/reconciler: "direct"
spec:
Copy link
Collaborator

Choose a reason for hiding this comment

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

labels:
configsync.gke.io: "true"

name: sqlinstance-postgres-minimal-direct-${uniqueId}
annotations:
alpha.cnrm.cloud.google.com/reconciler: "direct"
spec:
Copy link
Collaborator

Choose a reason for hiding this comment

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

labels:
configsync.gke.io: "true"

}

if err := a.insertInstance(ctx, u, log); err != nil {
return err
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be nice to wrap the error to bring some additional context. Eg "failed to perform initial insert: %w"

return fmt.Errorf("patching SQLInstance %s maintenanceVersion failed: %w", a.resourceID, err)
}
if err := a.pollForLROCompletion(ctx, op, "maintenanceVersion patch"); err != nil {
return err
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be nice to wrap the error to bring some additional context. Eg "failed waiting for maintenance version patch: %w"

Copy link
Collaborator

@yuwenma yuwenma left a comment

Choose a reason for hiding this comment

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

/approve

Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yuwenma

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

The pull request process is described here

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

@google-oss-prow google-oss-prow bot merged commit 2e50645 into master Aug 19, 2025
118 of 119 checks passed
@yuwenma
Copy link
Collaborator

yuwenma commented Aug 19, 2025

I missed the other reviewers' comments while LGTM the PR. @acpana could you resolve the comments in follow-up PRs?

@xiaoweim xiaoweim modified the milestones: 1.134, 1.135 Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants