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

Terraform Restore Improvements for GKEBackup #10562

Merged
merged 7 commits into from
May 29, 2024

Conversation

avijitagarwal195
Copy link
Contributor

@avijitagarwal195 avijitagarwal195 commented Apr 30, 2024

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.backup_config.permissive_mode` field to `google_gke_backup_backup_plan` resource
gkebackup: added `restore_config.restore_order` field to `google_gke_backup_restore_plan` resource
gkebackup: added `restore_config.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.namespaced_resource_restore_mode` in `google_gke_backup_restore_plan` resource

@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 ( 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
Copy link
Collaborator

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
Copy link
Collaborator

$\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
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 ( 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
Copy link
Collaborator

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
Copy link
Collaborator

$\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

@avijitagarwal195
Copy link
Contributor Author

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 avijitagarwal195 marked this pull request as ready for review April 30, 2024 12:34
@github-actions github-actions bot requested a review from zli82016 April 30, 2024 12:34
Copy link

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.

@avijitagarwal195 avijitagarwal195 marked this pull request as draft April 30, 2024 12:37
@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 ( 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
Copy link
Collaborator

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
Copy link
Collaborator

$\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
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 ( 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
Copy link
Collaborator

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
Copy link
Collaborator

$\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

@zli82016
Copy link
Member

zli82016 commented May 6, 2024

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

@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 ( 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
Copy link
Collaborator

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
Copy link
Collaborator

$\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

@avijitagarwal195
Copy link
Contributor Author

/gcbrun

@avijitagarwal195 avijitagarwal195 marked this pull request as ready for review May 27, 2024 09:26
@avijitagarwal195
Copy link
Contributor Author

/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 ( 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
Copy link
Collaborator

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
Copy link
Collaborator

$\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

@avijitagarwal195
Copy link
Contributor Author

avijitagarwal195 commented May 27, 2024

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

mmv1/products/gkebackup/BackupPlan.yaml Show resolved Hide resolved
mmv1/products/gkebackup/RestorePlan.yaml Outdated Show resolved Hide resolved
mmv1/products/gkebackup/RestorePlan.yaml Show resolved Hide resolved
mmv1/products/gkebackup/RestorePlan.yaml Show resolved Hide resolved
@github-actions github-actions bot requested a review from zli82016 May 29, 2024 08:33
@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 ( 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
Copy link
Collaborator

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
Copy link
Collaborator

$\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

Copy link
Member

@zli82016 zli82016 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@zli82016 zli82016 self-requested a review May 29, 2024 15:51
Copy link
Member

@zli82016 zli82016 left a comment

Choose a reason for hiding this comment

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

LGTM.

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