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

fix: Make key handle sweepable #11905

Conversation

romanini-ciandt
Copy link
Contributor

@romanini-ciandt romanini-ciandt commented Oct 3, 2024

Make key handle and resource project name sweepable too.

Go template version of #11693 PR

Release Note Template for Downstream PRs (will be copied)

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Oct 3, 2024
@romanini-ciandt romanini-ciandt marked this pull request as ready for review October 3, 2024 16:31
@github-actions github-actions bot requested a review from zli82016 October 3, 2024 16:32
Copy link

github-actions bot commented Oct 3, 2024

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.

@romanini-ciandt
Copy link
Contributor Author

Just realized I need to make a couple more tests on that. I'll re-open soon, sorry!

@modular-magician modular-magician added service/cloudkms and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Oct 3, 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 ( 1 file changed, 4 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 2 files changed, 8 insertions(+), 8 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 40
Passed tests: 34
Skipped tests: 6
Affected tests: 0

Click here to see the affected service packages
  • kms

🟢 All tests passed!

View the build log

@romanini-ciandt
Copy link
Contributor Author

FYI this PR should fix an opened provider issue: hashicorp/terraform-provider-google#18934

@zli82016
Copy link
Member

zli82016 commented Oct 4, 2024

I run the tests. TestAccKMSAutokeyConfig_kmsAutokeyConfigAllExample passed.

But TestAccKMSAutokeyConfig_kmsAutokeyConfigAllExample still fails with the error message

=== RUN   TestAccKMSKeyHandle_kmsKeyHandleBasicExample
=== PAUSE TestAccKMSKeyHandle_kmsKeyHandleBasicExample
=== CONT  TestAccKMSKeyHandle_kmsKeyHandleBasicExample
    resource_kms_key_handle_generated_test.go:39: Step 1/2 error: After applying this test step, the plan was not empty.
        stdout:
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        Terraform will perform the following actions:
          # google_kms_autokey_config.autokey_config will be updated in-place
          ~ resource "google_kms_autokey_config" "autokey_config" {
                id          = "folders/296033849616/autokeyConfig"
              + key_project = "projects/tf-test-key-proj0l4x6pzrzw"
                # (1 unchanged attribute hidden)
            }
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccKMSKeyHandle_kmsKeyHandleBasicExample (162.33s)

Edit: TestAccKMSKeyHandle_kmsKeyHandleBasicExample still fails.

@romanini-ciandt
Copy link
Contributor Author

romanini-ciandt commented Oct 4, 2024

@zli82016 this error you posted is being discussed/investigated in hashicorp/terraform-provider-google#18935. We suspect that is an infrastructure error (more details are in the issue thread). Looks like it was a flaky and after 8/4/24 it started to fail 100% of the times (for both testAccKMSAutokeyConfig_kmsAutokeyConfigAllExample and testAccKMSKeyHandle_kmsKeyHandleBasicExample).

The goal of this current opened PR is to make the folder name sweepable and fix the hard-coded static folder name error. Do you think we can merge this now and deal with the other error in a future PR, if it's needed? ("if it's needed" because if it's due to some infra issue, maybe no PR here will be required)

PS: In your comment you mentioned that "TestAccKMSAutokeyConfig_kmsAutokeyConfigAllExample passed" and "TestAccKMSAutokeyConfig_kmsAutokeyConfigAllExample still fails", but both are the same name. Which one passed? Key Handle or Autokey Config?

Thanks!

@zli82016
Copy link
Member

zli82016 commented Oct 4, 2024

@zli82016 this error you posted is being discussed/investigated in hashicorp/terraform-provider-google#18935. We suspect that is an infrastructure error (more details are in the issue thread). Looks like it was a flaky and after 8/4/24 it started to fail 100% of the times (for both testAccKMSAutokeyConfig_kmsAutokeyConfigAllExample and testAccKMSKeyHandle_kmsKeyHandleBasicExample).

The goal of this current opened PR is to make the folder name sweepable and fix the hard-coded static folder name error. Do you think we can merge this now and deal with the other error in a future PR, if it's needed? ("if it's needed" because if it's due to some infra issue, maybe no PR here will be required)

PS: In your comment you mentioned that "TestAccKMSAutokeyConfig_kmsAutokeyConfigAllExample passed" and "TestAccKMSAutokeyConfig_kmsAutokeyConfigAllExample still fails", but both are the same name. Which one passed? Key Handle or Autokey Config?

Thanks!

oh. Sorry for the copy paste issue.
TestAccKMSAutokeyConfig_kmsAutokeyConfigAllExample passed.

TestAccKMSKeyHandle_kmsKeyHandleBasicExample failed.

This PR can be merged and then fix the test TestAccKMSKeyHandle_kmsKeyHandleBasicExample in the future.

@zli82016
Copy link
Member

zli82016 commented Oct 4, 2024

But I don't think this PR's change is related to TestAccKMSAutokeyConfig_kmsAutokeyConfigAllExample.

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.

@zli82016 zli82016 merged commit 55574a4 into GoogleCloudPlatform:main Oct 4, 2024
14 checks passed
niharika-98 pushed a commit to niharika-98/magic-modules that referenced this pull request Oct 7, 2024
trodge pushed a commit to trodge/magic-modules that referenced this pull request Oct 10, 2024
karolgorc pushed a commit to karolgorc/magic-modules that referenced this pull request Oct 11, 2024
gontech pushed a commit to gontech/magic-modules that referenced this pull request Oct 16, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Oct 23, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Oct 24, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Nov 5, 2024
akshat-jindal-nit pushed a commit to akshat-jindal-nit/magic-modules that referenced this pull request Nov 18, 2024
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