-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 customize diff for deprecated attribute on gc_policy #4556
Conversation
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=175325" |
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.
This LGTM. Just to make sure I'm understanding, it doesn't look like this tests whether there's a diff, just whether the change succeeds (but without the diff suppression it wouldn't succeed) - correct?
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.
Looks like tests are failing:
Step #24 - "tpg-test": google/resource_bigtable_gc_policy.go:39:14: Error return value of `diff.Clear` is not checked (errcheck)
Step #24 - "tpg-test": diff.Clear("max_age.0.days")
Step #24 - "tpg-test": ^
Step #24 - "tpg-test": google/resource_bigtable_gc_policy.go:40:14: Error return value of `diff.Clear` is not checked (errcheck)
Step #24 - "tpg-test": diff.Clear("max_age.0.duration")
Step #24 - "tpg-test": ^
Step #23 - "tpgb-test": google-beta/resource_bigtable_gc_policy.go:39:14: Error return value of `diff.Clear` is not checked (errcheck)
Step #23 - "tpgb-test": diff.Clear("max_age.0.days")
Step #23 - "tpgb-test": ^
Step #23 - "tpgb-test": google-beta/resource_bigtable_gc_policy.go:40:14: Error return value of `diff.Clear` is not checked (errcheck)
Step #23 - "tpgb-test": diff.Clear("max_age.0.duration")
Step #23 - "tpgb-test": ^
I like the idea of unit tests for the diff suppress func, similar to |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=175733" |
auto-run failed. /gcbrun |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=175737" |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=175744" |
I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=176357" |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccApiGatewayGateway_apigatewayGatewayBasicExampleUpdated You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=176363" |
Tests failed during RECORDING mode: TestAccApiGatewayGateway_apigatewayGatewayBasicExampleUpdated Please fix these to complete your PR |
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.
LGTM - thanks for the tests!
@@ -74,7 +74,7 @@ func (d *ResourceDataMock) Timeout(key string) time.Duration { | |||
type ResourceDiffMock struct { | |||
Before map[string]interface{} | |||
After map[string]interface{} | |||
Cleared map[string]struct{} | |||
Cleared map[string]interface{} |
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.
I'm surprised this wasn't used anywhere... Could this be map[string]bool
instead?
Adding customize diff when
google_bigtable_gc_policy.max_age.days
is equivalent togoogle_bigtable_gc_policy.max_age.duration
.resolves hashicorp/terraform-provider-google#8416
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)