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 iam files with snakecase back to camelcase #5605

Merged
merged 3 commits into from
Jan 10, 2022

Conversation

iyabchen
Copy link
Contributor

@iyabchen iyabchen commented Jan 7, 2022

In previous PR #5594, it turns asset name from camel case to snake case, which is incorrect for a few resources including private ca pool. This PR reverts that and add a handwritten file for servicemanagent service iam.

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)


@iyabchen iyabchen requested a review from melinath January 7, 2022 22:12
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform Beta: Diff ( 1 file changed, 18 insertions(+), 18 deletions(-))
TF Validator: Diff ( 6 files changed, 11 insertions(+), 25 deletions(-))

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.

Ah, so it looks like the issue with servicemanagement is that the id_format and import_format were specified incorrectly. They should be services/{{service_name}}. Since the resource is excluded, this is only used to generate the iam resource... I think it should be safe to update and then it doesn't need to be handwritten. If there are any follow-on issues (like failing tests) I can advise on how to fix them.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 7 insertions(+), 7 deletions(-))
Terraform Beta: Diff ( 2 files changed, 7 insertions(+), 7 deletions(-))
TF Validator: Diff ( 5 files changed, 10 insertions(+), 10 deletions(-))

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.

Okay, it looks like there's some remaining references to serviceName which seem to be coming from the self_link in products/servicemanagement/api.yaml.

The self_link in api.yaml will need to be updated to use snake case as well; I think that should finish this PR.

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccApigeeEnvironmentIamBindingGenerated|TestAccApigeeEnvironmentIamMemberGenerated|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccServiceManagementServiceIamBindingGenerated|TestAccServiceManagementServiceIamMemberGenerated|TestAccServiceManagementServiceIamPolicyGenerated|TestAccCloudbuildWorkerPool_basic|TestAccContainerNodePool_withInvalidUpgradeSettings You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=241810

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccCloudbuildWorkerPool_basic|TestAccServiceManagementServiceIamBindingGenerated|TestAccServiceManagementServiceIamMemberGenerated|TestAccServiceManagementServiceIamPolicyGenerated|TestAccContainerNodePool_withInvalidUpgradeSettings Please fix these to complete your PR

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 50 insertions(+), 51 deletions(-))
Terraform Beta: Diff ( 2 files changed, 10 insertions(+), 11 deletions(-))
TF Validator: Diff ( 5 files changed, 13 insertions(+), 13 deletions(-))

@melinath melinath self-requested a review January 10, 2022 19:43
@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccApigeeEnvironmentIamBindingGenerated|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccCloudbuildWorkerPool_basic|TestAccContainerNodePool_withInvalidUpgradeSettings You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=241813

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccCloudbuildWorkerPool_basic|TestAccContainerNodePool_withInvalidUpgradeSettings Please fix these to complete your PR

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 384175d into GoogleCloudPlatform:master Jan 10, 2022
lcaggio pushed a commit to lcaggio/magic-modules that referenced this pull request Mar 16, 2022
)

* Fix iam files with snakecase back to camelcase

* Modify servicemanagement terraform yaml import format

* Modify servicemanagement api yaml service name to snake case
lcaggio pushed a commit to lcaggio/magic-modules that referenced this pull request Mar 17, 2022
)

* Fix iam files with snakecase back to camelcase

* Modify servicemanagement terraform yaml import format

* Modify servicemanagement api yaml service name to snake case
betsy-lichtenberg pushed a commit to betsy-lichtenberg/magic-modules that referenced this pull request Apr 25, 2022
)

* Fix iam files with snakecase back to camelcase

* Modify servicemanagement terraform yaml import format

* Modify servicemanagement api yaml service name to snake case
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.

3 participants