magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

Terraform Restore Improvements for GKEBackup

Open avijitagarwal195 opened this issue 9 months ago • 8 comments

Adding changes to support restore improvements to Backup For GKE. Fixes b/327225667

Release Note Template for Downstream PRs (will be copied)

 -  gkebackup: added `backup_schedule.0.backup_config.0.permissive_mode` field to `google_gke_backup_backup_plan` resource
 -  gkebackup: added `restore_config.0.restore_order` field to `google_gke_backup_restore_plan` resource
 -  gkebackup: added `restore_config.0.volume_data_restore_policy_bindings` field to `google_gke_backup_restore_plan` resource
 -  gkebackup: added new enum values `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` and `MERGE_REPLACE_ON_CONFLICT` to field `restore_config.0.namespaced_resource_restore_mode` in `google_gke_backup_restore_plan` resource

avijitagarwal195 avatar Apr 30 '24 09:04 avijitagarwal195

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 ( 6 files changed, 1037 insertions(+), 3 deletions(-)) google-beta provider: Diff ( 6 files changed, 1037 insertions(+), 3 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 178 insertions(+))

Missing test report

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

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

resource "google_gke_backup_restore_plan" "primary" {
  restore_config {
    restore_order {
      group_kind_dependencies {
        requiring {
          resource_group = # value needed
          resource_kind  = # value needed
        }
        satisfying {
          resource_group = # value needed
          resource_kind  = # value needed
        }
      }
    }
  }
}

modular-magician avatar Apr 30 '24 10:04 modular-magician

Tests analytics

Total tests: 23 Passed tests: 19 Skipped tests: 0 Affected tests: 4

Click here to see the affected service packages
  • gkebackup

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEBackupBackupPlan_gkebackupBackupplanPermissiveExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanGitopsRestoreModeExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanRestoreOrderingExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanVolumeRestorePolicyBindingsExample

Get to know how VCR tests work

modular-magician avatar Apr 30 '24 10:04 modular-magician

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$ TestAccGKEBackupBackupPlan_gkebackupBackupplanPermissiveExample[Error message] [Debug log] TestAccGKEBackupRestorePlan_gkebackupRestoreplanGitopsRestoreModeExample[Error message] [Debug log] TestAccGKEBackupRestorePlan_gkebackupRestoreplanRestoreOrderingExample[Error message] [Debug log] TestAccGKEBackupRestorePlan_gkebackupRestoreplanVolumeRestorePolicyBindingsExample[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

modular-magician avatar Apr 30 '24 10:04 modular-magician

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 ( 6 files changed, 1037 insertions(+), 3 deletions(-)) google-beta provider: Diff ( 6 files changed, 1037 insertions(+), 3 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 178 insertions(+))

modular-magician avatar Apr 30 '24 10:04 modular-magician

Tests analytics

Total tests: 23 Passed tests: 19 Skipped tests: 0 Affected tests: 4

Click here to see the affected service packages
  • gkebackup

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEBackupBackupPlan_gkebackupBackupplanPermissiveExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanGitopsRestoreModeExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanRestoreOrderingExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanVolumeRestorePolicyBindingsExample

Get to know how VCR tests work

modular-magician avatar Apr 30 '24 10:04 modular-magician

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$ TestAccGKEBackupBackupPlan_gkebackupBackupplanPermissiveExample[Error message] [Debug log] TestAccGKEBackupRestorePlan_gkebackupRestoreplanGitopsRestoreModeExample[Error message] [Debug log] TestAccGKEBackupRestorePlan_gkebackupRestoreplanRestoreOrderingExample[Error message] [Debug log] TestAccGKEBackupRestorePlan_gkebackupRestoreplanVolumeRestorePolicyBindingsExample[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

modular-magician avatar Apr 30 '24 10:04 modular-magician

The newly added tests are failing in this PR because the new fields are hidden behind API visibility label. I will wait till the visibility labels are removed and pushed to production and then re-trigger the tests in CI. The ETA for visibility labels to be removed in mid of May.

avijitagarwal195 avatar Apr 30 '24 10:04 avijitagarwal195

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

@zli82016, 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[bot] avatar Apr 30 '24 12:04 github-actions[bot]

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 ( 6 files changed, 1037 insertions(+), 3 deletions(-)) google-beta provider: Diff ( 6 files changed, 1037 insertions(+), 3 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 178 insertions(+))

modular-magician avatar Apr 30 '24 17:04 modular-magician

Tests analytics

Total tests: 23 Passed tests: 19 Skipped tests: 0 Affected tests: 4

Click here to see the affected service packages
  • gkebackup

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEBackupBackupPlan_gkebackupBackupplanPermissiveExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanGitopsRestoreModeExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanRestoreOrderingExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanVolumeRestorePolicyBindingsExample

Get to know how VCR tests work

modular-magician avatar Apr 30 '24 17:04 modular-magician

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$ TestAccGKEBackupBackupPlan_gkebackupBackupplanPermissiveExample[Error message] [Debug log] TestAccGKEBackupRestorePlan_gkebackupRestoreplanGitopsRestoreModeExample[Error message] [Debug log] TestAccGKEBackupRestorePlan_gkebackupRestoreplanRestoreOrderingExample[Error message] [Debug log] TestAccGKEBackupRestorePlan_gkebackupRestoreplanVolumeRestorePolicyBindingsExample[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

modular-magician avatar Apr 30 '24 18:04 modular-magician

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 ( 6 files changed, 1037 insertions(+), 3 deletions(-)) google-beta provider: Diff ( 6 files changed, 1037 insertions(+), 3 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 178 insertions(+))

modular-magician avatar May 03 '24 14:05 modular-magician

Tests analytics

Total tests: 23 Passed tests: 19 Skipped tests: 0 Affected tests: 4

Click here to see the affected service packages
  • gkebackup

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEBackupBackupPlan_gkebackupBackupplanPermissiveExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanGitopsModeExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanRestoreOrderExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanVolumeResExample

Get to know how VCR tests work

modular-magician avatar May 03 '24 14:05 modular-magician

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$ TestAccGKEBackupBackupPlan_gkebackupBackupplanPermissiveExample[Error message] [Debug log] TestAccGKEBackupRestorePlan_gkebackupRestoreplanGitopsModeExample[Error message] [Debug log] TestAccGKEBackupRestorePlan_gkebackupRestoreplanRestoreOrderExample[Error message] [Debug log] TestAccGKEBackupRestorePlan_gkebackupRestoreplanVolumeResExample[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

modular-magician avatar May 03 '24 15:05 modular-magician

Feel free to let me know when the PR is ready for review.

zli82016 avatar May 06 '24 21:05 zli82016

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 ( 6 files changed, 1037 insertions(+), 3 deletions(-)) google-beta provider: Diff ( 6 files changed, 1037 insertions(+), 3 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 178 insertions(+))

modular-magician avatar May 27 '24 05:05 modular-magician

Tests analytics

Total tests: 23 Passed tests: 19 Skipped tests: 0 Affected tests: 4

Click here to see the affected service packages
  • gkebackup

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEBackupBackupPlan_gkebackupBackupplanPermissiveExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanGitopsModeExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanRestoreOrderExample|TestAccGKEBackupRestorePlan_gkebackupRestoreplanVolumeResExample

Get to know how VCR tests work

modular-magician avatar May 27 '24 05:05 modular-magician

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

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


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$ TestAccGKEBackupRestorePlan_gkebackupRestoreplanGitopsModeExample[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

modular-magician avatar May 27 '24 05:05 modular-magician

/gcbrun

avijitagarwal195 avatar May 27 '24 09:05 avijitagarwal195

/gcbrun

avijitagarwal195 avatar May 27 '24 09:05 avijitagarwal195

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 ( 6 files changed, 1037 insertions(+), 3 deletions(-)) google-beta provider: Diff ( 6 files changed, 1037 insertions(+), 3 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 178 insertions(+))

modular-magician avatar May 27 '24 11:05 modular-magician

Tests analytics

Total tests: 23 Passed tests: 22 Skipped tests: 0 Affected tests: 1

Click here to see the affected service packages
  • gkebackup

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
TestAccGKEBackupRestorePlan_gkebackupRestoreplanGitopsModeExample

Get to know how VCR tests work

modular-magician avatar May 27 '24 11:05 modular-magician

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

modular-magician avatar May 27 '24 11:05 modular-magician

@zli82016 This PR is ready for review now. The visibility labels have been removed and the added acceptance tests are running successfully now. Thank you.

avijitagarwal195 avatar May 27 '24 12:05 avijitagarwal195

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 ( 8 files changed, 1287 insertions(+), 3 deletions(-)) google-beta provider: Diff ( 8 files changed, 1287 insertions(+), 3 deletions(-)) terraform-google-conversion: Diff ( 2 files changed, 178 insertions(+))

modular-magician avatar May 29 '24 08:05 modular-magician

Tests analytics

Total tests: 24 Passed tests: 22 Skipped tests: 0 Affected tests: 2

Click here to see the affected service packages
  • gkebackup

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
TestAccGKEBackupBackupPlan_update|TestAccGKEBackupRestorePlan_update

Get to know how VCR tests work

modular-magician avatar May 29 '24 08:05 modular-magician

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$ TestAccGKEBackupBackupPlan_update[Debug log] TestAccGKEBackupRestorePlan_update[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

modular-magician avatar May 29 '24 08:05 modular-magician