-
Notifications
You must be signed in to change notification settings - Fork 291
feat: support setting maintenanceVersion on CREATE #4857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/hold will wait on #4838 to merge first. |
401f26c
to
4544723
Compare
17b2212
to
3eab59b
Compare
8809383
to
f36b5fc
Compare
/hold cancel |
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>
f36b5fc
to
c77d6f6
Compare
qq: if the create operation is successful but the patch operation failed, that means the resource exist but without the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
/lgtm |
name: sqlinstance-postgres-minimal-direct-${uniqueId} | ||
annotations: | ||
alpha.cnrm.cloud.google.com/reconciler: "direct" | ||
spec: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[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 |
I missed the other reviewers' comments while LGTM the PR. @acpana could you resolve the comments in follow-up PRs? |
Follow up on #4838 (comment)
Does this PR add something which needs to be 'release noted'?