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

Adding support for week5 maintenance update track #10732

Merged
merged 3 commits into from
May 22, 2024

Conversation

ashishgoogle
Copy link
Contributor

@ashishgoogle ashishgoogle commented May 17, 2024

Adding support for week5 update track in the maintenance settings to provide longer advance notification

The primary objective of 40 day notification/week5 is to provide Cloud SQL users with greater flexibility and control over scheduling maintenance to minimize its impact on their businesses. Cloud SQL plans to offer a new order of update option that guarantees customers a minimum of 35 days advance notice. Users will receive notification between 35-42 days in advance of their maintenance event, depending on when their maintenance window is compared to the date that the maintenance rollout began.

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

[x] 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).
[x] Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
[x] 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).
[x] Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).

Release Note Template for Downstream PRs (will be copied) -

sql: a new value `week5` is now supported for `setting.maintenance_window.update_track` in `google_sql_database_instance` resource

Copy link

google-cla bot commented May 17, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link

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

@shuyama1, 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 shuyama1 May 17, 2024 17:54
@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label May 17, 2024
Copy link

This PR has been waiting for review for 2 days. Please take a look! Use the label disable-review-reminders to disable these notifications.

@modular-magician modular-magician added service/sqladmin-cp and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels May 20, 2024
@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, 284 insertions(+), 263 deletions(-))
google-beta provider: Diff ( 3 files changed, 284 insertions(+), 263 deletions(-))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • sql

$\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$
View the build log

@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels May 20, 2024
@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, 21 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 3 files changed, 21 insertions(+), 3 deletions(-))

Missing test report

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

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

resource "google_sql_database_instance" "primary" {
  settings {
    maintenance_window {
      update_track = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 93
Passed tests: 78
Skipped tests: 15
Affected tests: 0

Click here to see the affected service packages
  • sql

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

@@ -3632,6 +3632,25 @@ resource "google_sql_database_instance" "instance" {
}
`

var testGoogleSqlDatabaseInstance_maintenance_week5 = `
Copy link
Member

Choose a reason for hiding this comment

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

This is not currently running in any tests. You'll likely want to add this an update step of TestAccSqlDatabaseInstance_maintenance. See more details on how to implement test at https://googlecloudplatform.github.io/magic-modules/develop/test/test/#add-resource-tests (especially check the handwritten tab in each section)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a test case, thank you!

@github-actions github-actions bot requested a review from shuyama1 May 21, 2024 00:48
@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, 45 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 3 files changed, 45 insertions(+), 3 deletions(-))

Missing test report

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

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

resource "google_sql_database_instance" "primary" {
  settings {
    maintenance_window {
      update_track = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 94
Passed tests: 78
Skipped tests: 15
Affected tests: 1

Click here to see the affected service packages
  • sql

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
TestAccSqlDatabaseInstance_maintenance_update_track_week5

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

Tests failed with error:

vcr_utils.go:152: Step 1/2 error: Error running apply: exit status 1
        
        Error: Error, failed to create instance tf-test-3320866733572540542: googleapi: Error 400: Invalid request: Setting maintenance update track to WEEK5 is not allowed on the project., invalid
        
          with google_sql_database_instance.instance,
          on terraform_plugin_test.tf line 2, in resource "google_sql_database_instance" "instance":
           2: resource "google_sql_database_instance" "instance" {

is this a allowlisted feature?

@ashishgoogle
Copy link
Contributor Author

Tests failed with error:

vcr_utils.go:152: Step 1/2 error: Error running apply: exit status 1
        
        Error: Error, failed to create instance tf-test-3320866733572540542: googleapi: Error 400: Invalid request: Setting maintenance update track to WEEK5 is not allowed on the project., invalid
        
          with google_sql_database_instance.instance,
          on terraform_plugin_test.tf line 2, in resource "google_sql_database_instance" "instance":
           2: resource "google_sql_database_instance" "instance" {

is this a allowlisted feature?

Thank you for checking. I am in a process of experiment ramp up. Is there a specific project on which I can allowlist this feature?

@shuyama1
Copy link
Member

/gcbrun

@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, 45 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 3 files changed, 45 insertions(+), 3 deletions(-))

Missing test report

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

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

resource "google_sql_database_instance" "primary" {
  settings {
    maintenance_window {
      update_track = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 94
Passed tests: 79
Skipped tests: 14
Affected tests: 1

Click here to see the affected service packages
  • sql

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
TestAccSqlDatabaseInstance_maintenance_update_track_week5

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@shuyama1
Copy link
Member

/gcbrun

@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, 45 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 3 files changed, 45 insertions(+), 3 deletions(-))

Missing test report

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

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

resource "google_sql_database_instance" "primary" {
  settings {
    maintenance_window {
      update_track = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 94
Passed tests: 79
Skipped tests: 14
Affected tests: 1

Click here to see the affected service packages
  • sql

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
TestAccSqlDatabaseInstance_maintenance_update_track_week5

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccSqlDatabaseInstance_maintenance_update_track_week5[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

@shuyama1
Copy link
Member

/gcbrun

@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, 45 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 3 files changed, 45 insertions(+), 3 deletions(-))

Missing test report

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

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

resource "google_sql_database_instance" "primary" {
  settings {
    maintenance_window {
      update_track = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 94
Passed tests: 80
Skipped tests: 14
Affected tests: 0

Click here to see the affected service packages
  • sql

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

Copy link
Member

@shuyama1 shuyama1 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants