Skip to content
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

Ignore EngineVersion minor updates when autoMinorVersionUpgrade is enabled #166

Merged

Conversation

joaquinservetto
Copy link
Contributor

@joaquinservetto joaquinservetto commented Feb 9, 2024

Fixes Issue

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-prow ack-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 9, 2024
@ack-prow ack-prow bot requested review from a-hilaly and jaypipes February 9, 2024 20:00
Copy link

ack-prow bot commented Feb 9, 2024

Hi @joaquinservetto. Thanks for your PR.

I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ack-prow ack-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 9, 2024
Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

This is great start, muchas gracias @joaquinservetto ! i left few recommendations below
/ok-to-test

pkg/resource/db_cluster/custom_update.go Outdated Show resolved Hide resolved
@@ -561,7 +562,12 @@ func (rm *resourceManager) newCustomUpdateRequestPayload(
res.SetEnableIAMDatabaseAuthentication(*desired.ko.Spec.EnableIAMDatabaseAuthentication)
}
if desired.ko.Spec.EngineVersion != nil && delta.DifferentAt("Spec.EngineVersion") {
res.SetEngineVersion(*desired.ko.Spec.EngineVersion)
r := regexp.MustCompile(`[0-9]*$`)
desiredMajorEngineVersion := r.ReplaceAllString(*desired.ko.Spec.EngineVersion, "${1}")
Copy link
Member

Choose a reason for hiding this comment

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

nil, we need to handle the case of nil *desired.ko.Spec.EngineVersion

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks a lot for you review @a-hilaly. If *desired.ko.Spec.EngineVersion is nil it'll not perform any update, isn't it the expected behavior?

pkg/resource/db_cluster/custom_update.go Show resolved Hide resolved
@ack-prow ack-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 9, 2024
@joaquinservetto joaquinservetto marked this pull request as ready for review February 19, 2024 15:26
@ack-prow ack-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 19, 2024
@ack-prow ack-prow bot requested review from a-hilaly and vijtrip2 February 19, 2024 15:26
@a-hilaly a-hilaly changed the title Fix: rds sync error when autoMinorVersionUpgrade is enabled Ignore EngineVersion minor updates when autoMinorVersionUpgrade is enabled Feb 29, 2024
Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

Thank you @joaquinservetto !
/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Feb 29, 2024
Copy link

ack-prow bot commented Feb 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-hilaly, joaquinservetto

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

@ack-prow ack-prow bot added the approved label Feb 29, 2024
@ack-prow ack-prow bot merged commit dd40399 into aws-controllers-k8s:main Feb 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RDS sync fail when autoMinorVersionUpgrade is enabled.
2 participants