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

Added missing fields in the google_data_loss_prevention_deidentify_template resource #7816

Merged

Conversation

JayS-crest
Copy link
Contributor

@JayS-crest JayS-crest commented Apr 24, 2023

Added image_transformations, replace_dictionary_config, version, create_time and update_time to data_loss_prevention_deidentify_template

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).
  • 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).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (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)

dlp: added `image_transformations` field to `google_data_loss_prevention_deidentify_template` resource
dlp: added `replace_dictionary_config` field to `info_type_transformations` in `google_data_loss_prevention_deidentify_template` resource

@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. @zli82016, 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 modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Apr 24, 2023
@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Apr 24, 2023
@zli82016
Copy link
Member

/gcbrun

@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Apr 24, 2023
@JayS-crest
Copy link
Contributor Author

Hi, actually I tried viewing presubmit-generate-diff details but in the console, I've received an error stating You do not have sufficient permissions to view this page. Could you help me with the error please, Thanks!

@zli82016
Copy link
Member

Hi, actually I tried viewing presubmit-generate-diff details but in the console, I've received an error stating You do not have sufficient permissions to view this page. Could you help me with the error please, Thanks!

I found this error

/mm-tf-oics-beta-head/mmv1/google/yaml_validator.rb:64:in `check': deidentify_config.info_type_transformations.transformations.transformations.primitive_transformation.replace_dictionary_config.word_list.words > Missing 'item_type' (RuntimeError)

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Apr 24, 2023
@JayS-crest
Copy link
Contributor Author

Hi, actually I tried viewing presubmit-generate-diff details but in the console, I've received an error stating You do not have sufficient permissions to view this page. Could you help me with the error please, Thanks!

I found this error

/mm-tf-oics-beta-head/mmv1/google/yaml_validator.rb:64:in `check': deidentify_config.info_type_transformations.transformations.transformations.primitive_transformation.replace_dictionary_config.word_list.words > Missing 'item_type' (RuntimeError)

Thanks for the help! I missed out on mentioning item_type for an attribute that happens to be array. I've done the necessary changes.

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Apr 24, 2023
@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.

Terraform GA: Diff ( 4 files changed, 987 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 4 files changed, 987 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 3 files changed, 278 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2672
Passed tests 2382
Skipped tests: 280
Affected tests: 10

Action taken

Found 10 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplate_imageTransformationsUpdate|TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplate_recordTransformationsUpdate|TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplate_infoTypeTransformationsUpdate|TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplateImageTransformationsExample|TestAccApigeeKeystoresAliasesKeyCertFile_apigeeKeystoresAliasesKeyCertFileTestExample|TestAccApigeeKeystoresAliasesPkcs12_ApigeeKeystoresAliasesPkcs12Example|TestAccAlloydbCluster_missingLocation|TestAccAlloydbBackup_missingLocation|TestAccDataSourceAlloydbLocations_basic|TestAccDataSourceGoogleFirebaseAndroidAppConfig

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplate_infoTypeTransformationsUpdate[Debug log]
TestAccApigeeKeystoresAliasesKeyCertFile_apigeeKeystoresAliasesKeyCertFileTestExample[Debug log]
TestAccApigeeKeystoresAliasesPkcs12_ApigeeKeystoresAliasesPkcs12Example[Debug log]
TestAccAlloydbCluster_missingLocation[Debug log]
TestAccAlloydbBackup_missingLocation[Debug log]
TestAccDataSourceAlloydbLocations_basic[Debug log]

Tests failed during RECORDING mode:
TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplate_imageTransformationsUpdate[Error message] [Debug log]
TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplate_recordTransformationsUpdate[Error message] [Debug log]
TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplateImageTransformationsExample[Error message] [Debug log]
TestAccDataSourceGoogleFirebaseAndroidAppConfig[Error message] [Debug log]

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

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Apr 25, 2023
@@ -1573,6 +1692,12 @@ properties:
description: |
Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits.
item_type: Api::Type::String
- !ruby/object:Api::Type::Boolean
name: 'replaceWithInfoTypeConfig'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

While running the tests, I saw error for boolean and tried to pass empty object, that worked but further I received API Error stating Error creating DeidentifyTemplate: googleapi: Error 400: replace_with_info_type_config is not valid as a primitive_transformations. It is only compatible with info_type_transformations.

Hence, removing this field and respective added test case.

@JayS-crest
Copy link
Contributor Author

Hi, I've done the necessary changes and it seems like the tests should work now.

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Apr 25, 2023
@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.

Terraform GA: Diff ( 4 files changed, 907 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 4 files changed, 907 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 3 files changed, 263 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2675
Passed tests 2387
Skipped tests: 280
Affected tests: 8

Action taken

Found 8 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplate_imageTransformationsUpdate|TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplateImageTransformationsExample|TestAccDataSourceGoogleFirebaseAndroidAppConfig|TestAccAlloydbCluster_missingLocation|TestAccApigeeKeystoresAliasesPkcs12_ApigeeKeystoresAliasesPkcs12Example|TestAccAlloydbBackup_missingLocation|TestAccDataSourceAlloydbLocations_basic|TestAccApigeeKeystoresAliasesKeyCertFile_apigeeKeystoresAliasesKeyCertFileTestExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplate_imageTransformationsUpdate[Debug log]
TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplateImageTransformationsExample[Debug log]
TestAccDataSourceGoogleFirebaseAndroidAppConfig[Debug log]
TestAccAlloydbCluster_missingLocation[Debug log]
TestAccApigeeKeystoresAliasesPkcs12_ApigeeKeystoresAliasesPkcs12Example[Debug log]
TestAccAlloydbBackup_missingLocation[Debug log]
TestAccDataSourceAlloydbLocations_basic[Debug log]
TestAccApigeeKeystoresAliasesKeyCertFile_apigeeKeystoresAliasesKeyCertFileTestExample[Debug log]

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

@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Apr 26, 2023
@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.

Terraform GA: Diff ( 4 files changed, 904 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 4 files changed, 904 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 3 files changed, 263 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2685
Passed tests 2399
Skipped tests: 279
Affected tests: 7

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccDataSourceGoogleServiceAccountIdToken_impersonation|TestAccDataSourceGoogleFirebaseAndroidAppConfig|TestAccDataSourceAlloydbLocations_basic|TestAccAlloydbCluster_missingLocation|TestAccApigeeKeystoresAliasesPkcs12_ApigeeKeystoresAliasesPkcs12Example|TestAccApigeeKeystoresAliasesKeyCertFile_apigeeKeystoresAliasesKeyCertFileTestExample|TestAccAlloydbBackup_missingLocation

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccDataSourceGoogleServiceAccountIdToken_impersonation[Debug log]
TestAccDataSourceAlloydbLocations_basic[Debug log]
TestAccAlloydbCluster_missingLocation[Debug log]
TestAccApigeeKeystoresAliasesPkcs12_ApigeeKeystoresAliasesPkcs12Example[Debug log]
TestAccApigeeKeystoresAliasesKeyCertFile_apigeeKeystoresAliasesKeyCertFileTestExample[Debug log]
TestAccAlloydbBackup_missingLocation[Debug log]

Tests failed during RECORDING mode:
TestAccDataSourceGoogleFirebaseAndroidAppConfig[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

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

@zli82016 zli82016 merged commit 86257a0 into GoogleCloudPlatform:main Apr 26, 2023
maphad pushed a commit to maphad/magic-modules that referenced this pull request Apr 27, 2023
…mplate resource (GoogleCloudPlatform#7816)

* added missing attributes to deIdentify template

* minor updates

* minor change to newline

* spacing changed

* item_type added and version description changed

* minor changes

* tests and example modified

* removed replaceWithInfoTypeConfig from yaml and test

* minor changes

* exactlyOneOf removed and required added to infotypes
maphad pushed a commit to maphad/magic-modules that referenced this pull request Apr 27, 2023
…mplate resource (GoogleCloudPlatform#7816)

* added missing attributes to deIdentify template

* minor updates

* minor change to newline

* spacing changed

* item_type added and version description changed

* minor changes

* tests and example modified

* removed replaceWithInfoTypeConfig from yaml and test

* minor changes

* exactlyOneOf removed and required added to infotypes
maphad pushed a commit to maphad/magic-modules that referenced this pull request Apr 27, 2023
…mplate resource (GoogleCloudPlatform#7816)

* added missing attributes to deIdentify template

* minor updates

* minor change to newline

* spacing changed

* item_type added and version description changed

* minor changes

* tests and example modified

* removed replaceWithInfoTypeConfig from yaml and test

* minor changes

* exactlyOneOf removed and required added to infotypes
rainshen49 pushed a commit to rainshen49/magic-modules that referenced this pull request Apr 28, 2023
…mplate resource (GoogleCloudPlatform#7816)

* added missing attributes to deIdentify template

* minor updates

* minor change to newline

* spacing changed

* item_type added and version description changed

* minor changes

* tests and example modified

* removed replaceWithInfoTypeConfig from yaml and test

* minor changes

* exactlyOneOf removed and required added to infotypes
ericayyliu pushed a commit to ericayyliu/magic-modules that referenced this pull request Jul 26, 2023
…mplate resource (GoogleCloudPlatform#7816)

* added missing attributes to deIdentify template

* minor updates

* minor change to newline

* spacing changed

* item_type added and version description changed

* minor changes

* tests and example modified

* removed replaceWithInfoTypeConfig from yaml and test

* minor changes

* exactlyOneOf removed and required added to infotypes
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