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

Add support for AlloyDB Cluster Major Version Upgrade #12573

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

GauravJain21
Copy link
Contributor

@GauravJain21 GauravJain21 commented Dec 15, 2024

Add support for AlloyDB Cluster Major Version Upgrade

This PR adds support for allowing users to upgrade their AlloyDB cluster's PG major version by just updating the database_version field inside the cluster.

Release Note Template for Downstream PRs (will be copied)

alloydb: added support for upgrading `database_version` in `google_alloydb_cluster` resource

Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@NickElliot, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 132 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 3 files changed, 132 insertions(+), 11 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 75
Passed tests: 71
Skipped tests: 2
Affected tests: 2

Click here to see the affected service packages
  • alloydb

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAlloydbCluster_update
  • TestAccAlloydbCluster_upgrade

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccAlloydbCluster_update [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccAlloydbCluster_upgrade [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link

@NickElliot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

    Error: Error updating Cluster "projects/ci-test-project-188019/locations/us-central1/clusters/tf-test-alloydb-cluster9n4dqg3y43": googleapi: Error 400: The request was invalid: updating field database_version is not supported (current value: POSTGRES_14, specified value: POSTGRES_15)

It doesn't look like the API is allowing the update

@github-actions github-actions bot requested a review from NickElliot December 21, 2024 06:32
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 132 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 3 files changed, 132 insertions(+), 11 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 75
Passed tests: 72
Skipped tests: 2
Affected tests: 1

Click here to see the affected service packages
  • alloydb

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAlloydbCluster_upgrade

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccAlloydbCluster_upgrade [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 120 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 3 files changed, 158 insertions(+), 11 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_alloydb_cluster (138 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_alloydb_cluster" "primary" {
  skip_await_version_upgrade = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 75
Passed tests: 72
Skipped tests: 2
Affected tests: 1

Click here to see the affected service packages
  • alloydb

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAlloydbCluster_upgrade

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccAlloydbCluster_upgrade [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 122 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 3 files changed, 160 insertions(+), 11 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 75
Passed tests: 72
Skipped tests: 2
Affected tests: 1

Click here to see the affected service packages
  • alloydb

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAlloydbCluster_upgrade

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccAlloydbCluster_upgrade [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@GauravJain21
Copy link
Contributor Author

    Error: Error updating Cluster "projects/ci-test-project-188019/locations/us-central1/clusters/tf-test-alloydb-cluster9n4dqg3y43": googleapi: Error 400: The request was invalid: updating field database_version is not supported (current value: POSTGRES_14, specified value: POSTGRES_15)

It doesn't look like the API is allowing the update

I have fixed this as the API is available only in beta (public-preview) right now.

Copy link

@NickElliot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 122 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 3 files changed, 160 insertions(+), 11 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 75
Passed tests: 73
Skipped tests: 2
Affected tests: 0

Click here to see the affected service packages
  • alloydb

🟢 All tests passed!

View the build log

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 122 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 3 files changed, 179 insertions(+), 11 deletions(-))

@GauravJain21
Copy link
Contributor Author

/gcbrun

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 75
Passed tests: 72
Skipped tests: 2
Affected tests: 1

Click here to see the affected service packages
  • alloydb

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAlloydbCluster_upgrade

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccAlloydbCluster_upgrade [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link

@GoogleCloudPlatform/terraform-team @NickElliot This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

same error:

googleapi: Error 400: The request was invalid: updating field database_version is not supported (current value: POSTGRES_15, specified value: POSTGRES_14)

@github-actions github-actions bot requested a review from NickElliot January 6, 2025 10:02
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 124 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 3 files changed, 181 insertions(+), 11 deletions(-))

1 similar comment
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 124 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 3 files changed, 181 insertions(+), 11 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 75
Passed tests: 72
Skipped tests: 2
Affected tests: 1

Click here to see the affected service packages
  • alloydb

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAlloydbCluster_upgrade

Get to know how VCR tests work

1 similar comment
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 75
Passed tests: 72
Skipped tests: 2
Affected tests: 1

Click here to see the affected service packages
  • alloydb

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAlloydbCluster_upgrade

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccAlloydbCluster_upgrade [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccAlloydbCluster_upgrade [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 119 insertions(+), 12 deletions(-))
google-beta provider: Diff ( 3 files changed, 176 insertions(+), 12 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 75
Passed tests: 72
Skipped tests: 2
Affected tests: 1

Click here to see the affected service packages
  • alloydb

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAlloydbCluster_upgrade

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccAlloydbCluster_upgrade [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@GauravJain21
Copy link
Contributor Author

It's fixed now. Can you PTAL?

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

one question!

@@ -110,6 +110,13 @@ virtual_fields:
Possible values: DEFAULT, FORCE
type: String
default_value: "DEFAULT"
- name: 'skip_await_major_version_upgrade'
type: Boolean
default_value: true
Copy link
Contributor

Choose a reason for hiding this comment

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

is this the API default?

Copy link
Contributor Author

@GauravJain21 GauravJain21 Jan 9, 2025

Choose a reason for hiding this comment

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

Yes, it is API default.

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