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

Upgrade dcl #7012

Merged
merged 12 commits into from
Dec 23, 2022
Merged

Upgrade dcl #7012

merged 12 commits into from
Dec 23, 2022

Conversation

slevenick
Copy link
Contributor

@slevenick slevenick commented Dec 21, 2022

Upgrade DCL to 1.30.0. Adds support for OSPolicyConfig skip_await_rollout

Disables tests in VCR as they haven't passed successfully in months due to long rollout times. skip_await_rollout won't work in tests due to deletion needing to happen as the last test step, but these resources cannot be deleted until they finish rollout

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)

osconfig: added support for `skip_await_rollout` in `google_os_config_os_policy_assignment`

@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 ( 5 files changed, 65 insertions(+), 29 deletions(-))
Terraform Beta: Diff ( 6 files changed, 146 insertions(+), 29 deletions(-))
TF Validator: Diff ( 2 files changed, 6 insertions(+), 6 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2367
Passed tests 2115
Skipped tests: 247
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
TestAccContainerCluster_withInvalidGatewayApiConfigChannel|TestAccFirebaserulesRelease_BasicRelease|TestAccLoggingBucketConfigProject_cmekSettings|TestAccOsConfigOsPolicyAssignment_FixedOsPolicyAssignment|TestAccOsConfigOsPolicyAssignment_PercentOsPolicyAssignment

@modular-magician
Copy link
Collaborator

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

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

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

@slevenick
Copy link
Contributor Author

/gcbrun cleared out ci

@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 ( 5 files changed, 65 insertions(+), 29 deletions(-))
Terraform Beta: Diff ( 6 files changed, 146 insertions(+), 29 deletions(-))
TF Validator: Diff ( 2 files changed, 6 insertions(+), 6 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2367
Passed tests 2116
Skipped tests: 247
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
TestAccContainerCluster_withInvalidGatewayApiConfigChannel|TestAccLoggingBucketConfigProject_cmekSettings|TestAccOsConfigOsPolicyAssignment_FixedOsPolicyAssignment|TestAccOsConfigOsPolicyAssignment_PercentOsPolicyAssignment

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccContainerCluster_withInvalidGatewayApiConfigChannel[Debug log]
TestAccLoggingBucketConfigProject_cmekSettings[Debug log]

Tests failed during RECORDING mode:
TestAccOsConfigOsPolicyAssignment_FixedOsPolicyAssignment[Error message] [Debug log]
TestAccOsConfigOsPolicyAssignment_PercentOsPolicyAssignment[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.

Terraform GA: Diff ( 5 files changed, 201 insertions(+), 1700 deletions(-))
Terraform Beta: Diff ( 6 files changed, 282 insertions(+), 1700 deletions(-))
TF Validator: Diff ( 2 files changed, 6 insertions(+), 6 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2367
Passed tests 2116
Skipped tests: 247
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
TestAccLoggingBucketConfigProject_cmekSettings|TestAccOsConfigOsPolicyAssignment_PercentOsPolicyAssignment|TestAccOsConfigOsPolicyAssignment_FixedOsPolicyAssignment|TestAccContainerCluster_withInvalidGatewayApiConfigChannel

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccLoggingBucketConfigProject_cmekSettings[Debug log]
TestAccContainerCluster_withInvalidGatewayApiConfigChannel[Debug log]

Tests failed during RECORDING mode:
TestAccOsConfigOsPolicyAssignment_PercentOsPolicyAssignment[Error message] [Debug log]
TestAccOsConfigOsPolicyAssignment_FixedOsPolicyAssignment[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.

Terraform GA: Diff ( 5 files changed, 205 insertions(+), 1704 deletions(-))
Terraform Beta: Diff ( 6 files changed, 286 insertions(+), 1704 deletions(-))
TF Validator: Diff ( 2 files changed, 6 insertions(+), 6 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2370
Passed tests 2118
Skipped tests: 247
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
TestAccContainerCluster_withInvalidGatewayApiConfigChannel|TestAccComputeForwardingRule_update|TestAccOsConfigOsPolicyAssignment_PercentOsPolicyAssignment|TestAccOsConfigOsPolicyAssignment_FixedOsPolicyAssignment|TestAccLoggingBucketConfigProject_cmekSettings

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccContainerCluster_withInvalidGatewayApiConfigChannel[Debug log]
TestAccComputeForwardingRule_update[Debug log]
TestAccLoggingBucketConfigProject_cmekSettings[Debug log]

Tests failed during RECORDING mode:
TestAccOsConfigOsPolicyAssignment_PercentOsPolicyAssignment[Error message] [Debug log]
TestAccOsConfigOsPolicyAssignment_FixedOsPolicyAssignment[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.

Terraform GA: Diff ( 5 files changed, 80 insertions(+), 1936 deletions(-))
Terraform Beta: Diff ( 5 files changed, 80 insertions(+), 1936 deletions(-))
TF Validator: Diff ( 2 files changed, 6 insertions(+), 6 deletions(-))

@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 ( 6 files changed, 205 insertions(+), 2850 deletions(-))
Terraform Beta: Diff ( 6 files changed, 205 insertions(+), 2850 deletions(-))
TF Validator: Diff ( 2 files changed, 6 insertions(+), 6 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2370
Passed tests 2119
Skipped tests: 249
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_withInvalidGatewayApiConfigChannel|TestAccLoggingBucketConfigProject_cmekSettings

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccContainerCluster_withInvalidGatewayApiConfigChannel[Debug log]
TestAccLoggingBucketConfigProject_cmekSettings[Debug log]

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

@slevenick slevenick requested review from melinath and removed request for ScottSuarez December 22, 2022 17:11
@slevenick slevenick requested review from rileykarson and removed request for melinath December 22, 2022 19:04
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.

In general this LGTM. Will this fix hashicorp/terraform-provider-google#11070? It could be nice to make the test more like a full test by adding more fields, but since it's the same as a test that previously existed I don't think that's a blocker.

The one issue is that this seems to cause the entire documentation page for the resource to get deleted - possibly tpgtools requires at least one sample?

name = "tf-test-assignment%{random_suffix}"

os_policies {
id = "policy"
Copy link
Member

Choose a reason for hiding this comment

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

possibly add allow_no_resource_group_match and description in here to get full coverage?

id = "policy"
mode = "VALIDATION"

resource_groups {
Copy link
Member

Choose a reason for hiding this comment

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

possibly add inventory_filters to get full coverage?


resource_groups {
resources {
id = "apt-to-yum"
Copy link
Member

Choose a reason for hiding this comment

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

possibly add exec, file, and pkg fields & their subfields here?

@slevenick
Copy link
Contributor Author

I'll look into the doc generation. The problem is that these tests fail due to long (1h+) rollout times of the resource because they have to run checks against every instance in the project. They pass locally, but will never pass in CI it seems

The current tests have full coverage but getting that coverage causes many updates (extending test length) and frankly unwieldy configs to show up in the examples. I tried to simplify them and target unused zones to get the rollout to succeed, but even that seems to have failed

Copy link
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

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

re: making the docs unwieldy, doc_hide in the meta.yaml file should help address that?

@melinath
Copy link
Member

The problem is that these tests fail due to long (1h+) rollout times of the resource because they have to run checks against every instance in the project.

Any chance that we could isolate these tests in their own project(s) to reduce the rollout time?

@slevenick
Copy link
Contributor Author

The problem is that these tests fail due to long (1h+) rollout times of the resource because they have to run checks against every instance in the project.

Any chance that we could isolate these tests in their own project(s) to reduce the rollout time?

Good call! Works locally, testing in CI now

Copy link
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

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

No blockers from me, approving so there aren't too many cooks in the kitchen. Primary review's @melinath.

@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 ( 6 files changed, 228 insertions(+), 2041 deletions(-))
Terraform Beta: Diff ( 6 files changed, 228 insertions(+), 2041 deletions(-))
TF Validator: Diff ( 2 files changed, 6 insertions(+), 6 deletions(-))

@modular-magician
Copy link
Collaborator

The provider crashed while running the VCR tests in REPLAYING mode
Please fix it to complete your PR
View the build log

@melinath
Copy link
Member

It looks like this crash is due to a change merged earlier; I'll make a revert PR.

@melinath
Copy link
Member

#7032

@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 ( 6 files changed, 260 insertions(+), 2041 deletions(-))
Terraform Beta: Diff ( 6 files changed, 260 insertions(+), 2041 deletions(-))
TF Validator: Diff ( 2 files changed, 6 insertions(+), 6 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2376
Passed tests 2124
Skipped tests: 248
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|TestAccContainerCluster_withInvalidGatewayApiConfigChannel|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccOsConfigOsPolicyAssignment_basicOsPolicyAssignment

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccContainerCluster_withInvalidGatewayApiConfigChannel[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample[Debug log]
TestAccOsConfigOsPolicyAssignment_basicOsPolicyAssignment[Debug log]

All tests passed
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

@slevenick slevenick merged commit 7f919ab into GoogleCloudPlatform:main Dec 23, 2022
rlapin-pl pushed a commit to rlapin-pl/magic-modules that referenced this pull request Jan 1, 2023
* Upgrade dcl

* Add new basic test

* Simplify tests

* Fix yaml

* Use other zone

* Update tests

* Simplify tests

* Remove sample tests, use handwritten

* Rename test

* Test in separate project, add back docs-only sample

* Add test changes too

* Add a couple fields
kimihrr pushed a commit to kimihrr/kimiah-magic-modules that referenced this pull request Jan 3, 2023
* Upgrade dcl

* Add new basic test

* Simplify tests

* Fix yaml

* Use other zone

* Update tests

* Simplify tests

* Remove sample tests, use handwritten

* Rename test

* Test in separate project, add back docs-only sample

* Add test changes too

* Add a couple fields
i-laird pushed a commit to i-laird/magic-modules that referenced this pull request Jan 10, 2023
* Upgrade dcl

* Add new basic test

* Simplify tests

* Fix yaml

* Use other zone

* Update tests

* Simplify tests

* Remove sample tests, use handwritten

* Rename test

* Test in separate project, add back docs-only sample

* Add test changes too

* Add a couple fields
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.

5 participants