-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add a functionality to create a snapshot before a disk is deleted #12947
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 a functionality to create a snapshot before a disk is deleted #12947
Conversation
Hello! I am a robot. Tests will require approval from a repository maintainer to run. @rileykarson, 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. |
@rileykarson This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 1 week. Please take a look! Use the label |
@rileykarson are you able to review this? |
Been low on cycles, rolled @c2thorn as an alternate reviewer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable and in decent enough demand to warrant a virtual field. @karolgorc can you write a test for this functionality?
We should be able to use a dependent google_compute_snapshot data source to verify the snapshot was successfully created.
Yes, sure. One question tough. The snapshot that's created is outside of terraform so it won't be deleted after the test finishes. I'm guessing that we don't want to leave artifacts so what i can do is add a delete API query as a check step. Is that good enough? Also just remembered that i need to add |
Good point, yes that would be great in a check step. |
e7fde09
to
93b4c2d
Compare
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 471 Click here to see the affected service packages
🔴 Tests were added that are skipped in VCR:
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🟢 Tests passed during RECORDING mode: 🔴 Tests failed when rerunning REPLAYING mode: Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made. Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer. 🟢 All tests passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after we remove from VCR I will reconfirm with a manual test run in teamcity
mmv1/third_party/terraform/services/compute/resource_compute_disk_test.go.tmpl
Show resolved
Hide resolved
…isk_test.go.tmpl Co-authored-by: Cameron Thornton <[email protected]>
running manual compute disk and region disk tests on TC |
Is there anything that has to be done with this? |
@rileykarson This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
Apologies, I was out of office for a bit, but just confirmed both the regional and non regional tests have passed. Unfortunately within that timeframe it seems there is now a conflict in the template. Once we resolve that this should be good to go. |
I've resolved the conflict in the web editor and will confirm before approving. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_compute_disk" "primary" {
create_snapshot_before_destroy = # value needed
create_snapshot_before_destroy_prefix = # value needed
}
|
Tests analyticsTotal tests: 0 Click here to see the affected service packages
🔴 Tests were added that are skipped in VCR:
View the build log |
One of the tests didn't have it's brackets closed after resolving the conflicts
Fixed |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 1122 Click here to see the affected service packages
🔴 Tests were added that are skipped in VCR:
View the build log |
thanks for the fix! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated the changelog entries. LGTM
454d4c7
…ogleCloudPlatform#12947) Co-authored-by: Cameron Thornton <[email protected]>
…ogleCloudPlatform#12947) Co-authored-by: Cameron Thornton <[email protected]>
…ogleCloudPlatform#12947) Co-authored-by: Cameron Thornton <[email protected]>
…ogleCloudPlatform#12947) Co-authored-by: Cameron Thornton <[email protected]>
closes hashicorp/terraform-provider-google#15103
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.