Skip to content

TF changes for AlloyDB Free trials #11207

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

Merged
merged 16 commits into from
Aug 26, 2024

Conversation

girdharchirag
Copy link
Contributor

@girdharchirag girdharchirag commented Jul 19, 2024

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read Write release notes before writing my release note below.

This PR contains changes for AlloyDB cluster. It adds the subscription type attribute which was missing in Terraform but were present in REST API for this resource and the corresponding tests.

alloydb: added `subscription_type` and `trial_metadata` field to `google_alloydb_cluster` resource

@girdharchirag girdharchirag marked this pull request as ready for review July 19, 2024 06:01
@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, 239 insertions(+))
google-beta provider: Diff ( 3 files changed, 239 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+))

Copy link

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

@slevenick, 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.

@github-actions github-actions bot requested a review from slevenick July 19, 2024 06:02
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 72
Passed tests: 62
Skipped tests: 4
Affected tests: 6

Click here to see the affected service packages
  • alloydb

Action taken

Found 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAlloydbCluster_standardClusterUpdate
  • TestAccAlloydbCluster_standardClusterUpdateFailure
  • TestAccAlloydbCluster_trialClusterUpdate
  • TestAccAlloydbCluster_update
  • TestAccAlloydbCluster_withSubscriptionTypeStandard
  • TestAccAlloydbCluster_withSubscriptionTypeTrial

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAlloydbCluster_standardClusterUpdate[Debug log]
TestAccAlloydbCluster_standardClusterUpdateFailure[Debug log]
TestAccAlloydbCluster_update[Debug log]
TestAccAlloydbCluster_withSubscriptionTypeStandard[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAlloydbCluster_trialClusterUpdate[Error message] [Debug log]
TestAccAlloydbCluster_withSubscriptionTypeTrial[Error message] [Debug log]

$\textcolor{red}{\textsf{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
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Looks like tests are failing with this error:

The request was invalid: Not eligible to create Free Trial cluster

Do you know how we can fix that?

@girdharchirag
Copy link
Contributor Author

Looks like tests are failing with this error:

The request was invalid: Not eligible to create Free Trial cluster

Do you know how we can fix that?

Yes, I looked into it. We'll have to add the ProjectID to the exception list so that it is eligible to create trial cluster. I have made the required changes but it will take some time for the changes to reach prod. We'll have to wait for that.

@github-actions github-actions bot requested a review from slevenick July 22, 2024 14:15
Copy link

@slevenick 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

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Leaving a review to stop the reminders, please re-request review when this is ready.

@girdharchirag girdharchirag marked this pull request as draft July 26, 2024 05:04
@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, 442 insertions(+), 33 deletions(-))
google-beta provider: Diff ( 3 files changed, 442 insertions(+), 33 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 72 insertions(+))

Missing test report

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

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

resource "google_alloydb_cluster" "primary" {
  trial_metadata {
    end_time       = # value needed
    grace_end_time = # value needed
    start_time     = # value needed
    upgrade_time   = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 72
Passed tests: 46
Skipped tests: 4
Affected tests: 22

Click here to see the affected service packages
  • alloydb

Action taken

Found 22 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAlloydbCluster_AutomatedBackupPolicyHandlesMidnight
  • TestAccAlloydbCluster_CMEKInAutomatedBackupIsUpdatable
  • TestAccAlloydbCluster_addAutomatedBackupPolicyAndInitialUser
  • TestAccAlloydbCluster_continuousBackup_CMEKIsUpdatable
  • TestAccAlloydbCluster_continuousBackup_enabledByDefault
  • TestAccAlloydbCluster_continuousBackup_noChangeIfRemoved
  • TestAccAlloydbCluster_continuousBackup_update
  • TestAccAlloydbCluster_continuousBackup_update_noChangeIfDefaultsSet
  • TestAccAlloydbCluster_deleteAutomatedBackupPolicyAndInitialUser
  • TestAccAlloydbCluster_deleteTimeBasedRetentionPolicy
  • TestAccAlloydbCluster_missingWeeklySchedule
  • TestAccAlloydbCluster_standardClusterUpdate
  • TestAccAlloydbCluster_standardClusterUpdateFailure
  • TestAccAlloydbCluster_trialClusterUpdate
  • TestAccAlloydbCluster_update
  • TestAccAlloydbCluster_usingCMEK
  • TestAccAlloydbCluster_withMaintenanceWindows
  • TestAccAlloydbCluster_withNetworkConfig
  • TestAccAlloydbCluster_withNetworkConfigAndAllocatedIPRange
  • TestAccAlloydbCluster_withPrivateServiceConnect
  • TestAccAlloydbCluster_withSubscriptionTypeStandard
  • TestAccAlloydbCluster_withSubscriptionTypeTrial

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAlloydbCluster_AutomatedBackupPolicyHandlesMidnight[Error message] [Debug log]
TestAccAlloydbCluster_CMEKInAutomatedBackupIsUpdatable[Error message] [Debug log]
TestAccAlloydbCluster_addAutomatedBackupPolicyAndInitialUser[Error message] [Debug log]
TestAccAlloydbCluster_continuousBackup_CMEKIsUpdatable[Error message] [Debug log]
TestAccAlloydbCluster_continuousBackup_enabledByDefault[Error message] [Debug log]
TestAccAlloydbCluster_continuousBackup_noChangeIfRemoved[Error message] [Debug log]
TestAccAlloydbCluster_continuousBackup_update[Error message] [Debug log]
TestAccAlloydbCluster_continuousBackup_update_noChangeIfDefaultsSet[Error message] [Debug log]
TestAccAlloydbCluster_deleteAutomatedBackupPolicyAndInitialUser[Error message] [Debug log]
TestAccAlloydbCluster_deleteTimeBasedRetentionPolicy[Error message] [Debug log]
TestAccAlloydbCluster_missingWeeklySchedule[Error message] [Debug log]
TestAccAlloydbCluster_standardClusterUpdate[Error message] [Debug log]
TestAccAlloydbCluster_standardClusterUpdateFailure[Error message] [Debug log]
TestAccAlloydbCluster_trialClusterUpdate[Error message] [Debug log]
TestAccAlloydbCluster_update[Error message] [Debug log]
TestAccAlloydbCluster_usingCMEK[Error message] [Debug log]
TestAccAlloydbCluster_withMaintenanceWindows[Error message] [Debug log]
TestAccAlloydbCluster_withNetworkConfig[Error message] [Debug log]
TestAccAlloydbCluster_withNetworkConfigAndAllocatedIPRange[Error message] [Debug log]
TestAccAlloydbCluster_withPrivateServiceConnect[Error message] [Debug log]
TestAccAlloydbCluster_withSubscriptionTypeStandard[Error message] [Debug log]
TestAccAlloydbCluster_withSubscriptionTypeTrial[Error message] [Debug log]

$\textcolor{red}{\textsf{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, 409 insertions(+))
google-beta provider: Diff ( 3 files changed, 409 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 72 insertions(+))

Missing test report

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

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

resource "google_alloydb_cluster" "primary" {
  trial_metadata {
    end_time       = # value needed
    grace_end_time = # value needed
    start_time     = # value needed
    upgrade_time   = # value needed
  }
}

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, 409 insertions(+))
google-beta provider: Diff ( 3 files changed, 409 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 72 insertions(+))

Missing test report

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

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

resource "google_alloydb_cluster" "primary" {
  trial_metadata {
    end_time       = # value needed
    grace_end_time = # value needed
    start_time     = # value needed
    upgrade_time   = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 72
Passed tests: 65
Skipped tests: 4
Affected tests: 3

Click here to see the affected service packages
  • alloydb

Action taken

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

Get to know how VCR tests work

1 similar comment
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 72
Passed tests: 65
Skipped tests: 4
Affected tests: 3

Click here to see the affected service packages
  • alloydb

Action taken

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAlloydbCluster_standardClusterUpdateFailure[Error message] [Debug log]
TestAccAlloydbCluster_trialClusterUpdate[Error message] [Debug log]
TestAccAlloydbCluster_withSubscriptionTypeTrial[Error message] [Debug log]

$\textcolor{red}{\textsf{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

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAlloydbCluster_standardClusterUpdateFailure[Error message] [Debug log]
TestAccAlloydbCluster_trialClusterUpdate[Error message] [Debug log]
TestAccAlloydbCluster_withSubscriptionTypeTrial[Error message] [Debug log]

$\textcolor{red}{\textsf{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, 413 insertions(+))
google-beta provider: Diff ( 3 files changed, 413 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 72 insertions(+))

Missing test report

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

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

resource "google_alloydb_cluster" "primary" {
  trial_metadata {
    end_time       = # value needed
    grace_end_time = # value needed
    start_time     = # value needed
    upgrade_time   = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 73
Passed tests: 67
Skipped tests: 4
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_trialClusterUpdate
  • TestAccAlloydbCluster_withSubscriptionTypeTrial

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAlloydbCluster_trialClusterUpdate[Debug log]
TestAccAlloydbCluster_withSubscriptionTypeTrial[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$

View the build log or the debug log for each test

@girdharchirag girdharchirag marked this pull request as ready for review August 26, 2024 16:20
@github-actions github-actions bot requested a review from slevenick August 26, 2024 16:21
@girdharchirag
Copy link
Contributor Author

Leaving a review to stop the reminders, please re-request review when this is ready.

The PR is ready for review now. Please review.
The failing "terraform-google-conversion-build-and-unit-tests" are not related to changes made by me.

@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, 413 insertions(+))
google-beta provider: Diff ( 3 files changed, 413 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 72 insertions(+))

Missing test report

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

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

resource "google_alloydb_cluster" "primary" {
  trial_metadata {
    end_time       = # value needed
    grace_end_time = # value needed
    start_time     = # value needed
    upgrade_time   = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 73
Passed tests: 69
Skipped tests: 4
Affected tests: 0

Click here to see the affected service packages
  • alloydb

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

@girdharchirag
Copy link
Contributor Author

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, 413 insertions(+)) google-beta provider: Diff ( 3 files changed, 413 insertions(+)) terraform-google-conversion: Diff ( 1 file changed, 72 insertions(+))

Missing test report

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

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

resource "google_alloydb_cluster" "primary" {
  trial_metadata {
    end_time       = # value needed
    grace_end_time = # value needed
    start_time     = # value needed
    upgrade_time   = # value needed
  }
}

trial_metadata is an output only field. I have added checks to verify that it is correctly populated.

@slevenick
Copy link
Contributor

trial_metadata is an output only field. I have added checks to verify that it is correctly populated.

If it's output-only it should be marked as output: true rather than default_from_api. default_from_api means that a user may specify it, but if they don't the API will set a value and send it back.

@github-actions github-actions bot requested a review from slevenick August 26, 2024 17:22
@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, 338 insertions(+))
google-beta provider: Diff ( 3 files changed, 338 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+))

Missing test report

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

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

resource "google_alloydb_cluster" "primary" {
  trial_metadata {
    end_time       = # value needed
    grace_end_time = # value needed
    start_time     = # value needed
    upgrade_time   = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 73
Passed tests: 68
Skipped tests: 4
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_trialClusterUpdate

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAlloydbCluster_trialClusterUpdate[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$

View the build log or the debug log for each test

@github-actions github-actions bot requested a review from slevenick August 26, 2024 18:09
@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, 334 insertions(+))
google-beta provider: Diff ( 3 files changed, 334 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+))

Missing test report

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

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

resource "google_alloydb_cluster" "primary" {
  trial_metadata {
    end_time       = # value needed
    grace_end_time = # value needed
    start_time     = # value needed
    upgrade_time   = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 73
Passed tests: 69
Skipped tests: 4
Affected tests: 0

Click here to see the affected service packages
  • alloydb

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

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.

3 participants