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

Add manual converter and tests for service_account #7146

Merged

Conversation

vannicktrinquier
Copy link
Contributor

@vannicktrinquier vannicktrinquier commented Jan 19, 2023

Add google_service_account for terraform validator
The converter is not existing and has to be created manually. Also, adding information into the converter list and add test cases.

Fixed GoogleCloudPlatform/terraform-validator#1290

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I've detected that you're a community contributor. @rileykarson, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


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

TF Validator: Diff ( 11 files changed, 525 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2424
Passed tests 2166
Skipped tests: 253
Failed tests: 5

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccRegionInstanceGroupManager_stateful|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccVertexAIIndex_updated|TestAccLoggingBucketConfigProject_cmekSettings|TestAccFirebaserulesRelease_BasicRelease

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccVertexAIIndex_updated[Debug log]
TestAccLoggingBucketConfigProject_cmekSettings[Debug log]
TestAccFirebaserulesRelease_BasicRelease[Debug log]

Tests failed during RECORDING mode:
TestAccRegionInstanceGroupManager_stateful[Error message] [Debug log]
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@vannicktrinquier
Copy link
Contributor Author

I will investigate why integration-test are not passing

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

TF Validator: Diff ( 8 files changed, 317 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2424
Passed tests 2170
Skipped tests: 253
Failed tests: 1

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode:
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@rileykarson rileykarson requested review from a team and iyabchen and removed request for rileykarson and a team January 19, 2023 17:55
// This file is copied here by Magic Modules. The code for building up a
// storage bucket object is copied from the manually implemented
// provider file:
// third_party/terraform/resources/resource_storage_bucket.go
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be updated as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix and removed

@iyabchen
Copy link
Contributor

The generate-diffs are failing for some 500 error, would be good if you can trigger a rerun by doing a minor change to see whether it can work next time.

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

TF Validator: Diff ( 9 files changed, 324 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2423
Passed tests 2169
Skipped tests: 253
Failed tests: 1

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode:
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@vannicktrinquier
Copy link
Contributor Author

The generate-diffs are failing for some 500 error, would be good if you can trigger a rerun by doing a minor change to see whether it can work next time.

Minor change has been pushed. Checks and their results are visible now

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

TF Validator: Diff ( 13 files changed, 560 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2435
Passed tests 2179
Skipped tests: 254
Failed tests: 2

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccContainerCluster_failedCreation|TestAccRegionInstanceGroupManager_stateful

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccContainerCluster_failedCreation[Debug log]

Tests failed during RECORDING mode:
TestAccRegionInstanceGroupManager_stateful[Error message] [Debug log]

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.

TF Validator: Diff ( 13 files changed, 555 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2435
Passed tests 2180
Skipped tests: 254
Failed tests: 1

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccContainerCluster_failedCreation

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccContainerCluster_failedCreation[Debug log]

All tests passed
View the build log or the debug log for each test

@vannicktrinquier
Copy link
Contributor Author

@iyabchen as discussed I have added a test case for service account existing.
U can find it there:
https://github.com/GoogleCloudPlatform/magic-modules/pull/7146/files#diff-8879b297a155204efd4a7202cd21a53a6981234e19fa1803dc099e909cc67007

@@ -0,0 +1,35 @@
/**
* Copyright 2021 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

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

2023?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iyabchen iyabchen requested a review from melinath January 27, 2023 22:41
@iyabchen
Copy link
Contributor

Looks good since the test case is proving it works well. @melinath could you take a look? since I don't have permission to merge.

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

TF Validator: Diff ( 13 files changed, 555 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2439
Passed tests 2182
Skipped tests: 254
Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccContainerCluster_failedCreation|TestAccRegionInstanceGroupManager_stateful

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccContainerCluster_failedCreation[Debug log]

Tests failed during RECORDING mode:
TestAccRegionInstanceGroupManager_stateful[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@melinath
Copy link
Member

melinath commented Feb 3, 2023

/gcbrun

@melinath
Copy link
Member

melinath commented Feb 3, 2023

This LGTM but I'd like to re-run just to make sure there weren't any changes that broke something in the last two weeks. Since this only changes TFV, we don't need to wait for the full VCR tests. Apologies for the delayed response, I've been catching up on old reviews.

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

TF Validator: Diff ( 13 files changed, 555 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2451
Passed tests 2192
Skipped tests: 255
Failed tests: 4

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccRegionInstanceGroupManager_stateful|TestAccFrameworkProviderMeta_setModuleName|TestAccDataSourceDnsRecordSet_basic

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccFrameworkProviderMeta_setModuleName[Debug log]
TestAccDataSourceDnsRecordSet_basic[Debug log]

Tests failed during RECORDING mode:
TestAccRegionInstanceGroupManager_stateful[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

LGTM

@melinath melinath merged commit b4b5109 into GoogleCloudPlatform:main Feb 3, 2023
kubalaguna pushed a commit to kubalaguna/magic-modules that referenced this pull request Feb 27, 2023
…rm#7146)

* Add manual converter and tests for service_account

* Remove test expecting resource to be already existing

* Fix compute_instance test with service account

* Remove not needed comments

* Adding test for service account update

* Correct tf state file to match version 0.12.31

* Fixed copyright header year
ericayyliu pushed a commit to ericayyliu/magic-modules that referenced this pull request Jul 26, 2023
…rm#7146)

* Add manual converter and tests for service_account

* Remove test expecting resource to be already existing

* Fix compute_instance test with service account

* Remove not needed comments

* Adding test for service account update

* Correct tf state file to match version 0.12.31

* Fixed copyright header year
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for google_service_account
4 participants