Skip to content

Monitoring monitored project#8322

Merged
trodge merged 6 commits into
GoogleCloudPlatform:mainfrom
trodge:monitoring-monitored-project
Jul 12, 2023
Merged

Monitoring monitored project#8322
trodge merged 6 commits into
GoogleCloudPlatform:mainfrom
trodge:monitoring-monitored-project

Conversation

@trodge

@trodge trodge commented Jul 11, 2023

Copy link
Copy Markdown
Contributor

Make legacy long form name work with monitoring monitored project and add test with different project display name.

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 Write release notes before writing my release note below.

Release Note Template for Downstream PRs (will be copied)


@trodge trodge requested a review from melinath July 11, 2023 23:59
@modular-magician

Copy link
Copy Markdown
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, 31 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 6 files changed, 31 insertions(+), 4 deletions(-))
TF Conversion: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2852
Passed tests 2553
Skipped tests: 296
Affected tests: 3

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccMonitoringMonitoredProject_monitoringMonitoredProjectBasicExample|TestAccContainerAwsNodePool_BetaBasicHandWritten|TestAccComputeFirewallPolicyRule_multipleRules

Get to know how VCR tests work

@modular-magician

Copy link
Copy Markdown
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccMonitoringMonitoredProject_monitoringMonitoredProjectBasicExample[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccContainerAwsNodePool_BetaBasicHandWritten[Error message] [Debug log]
TestAccComputeFirewallPolicyRule_multipleRules[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@melinath melinath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

According to hashicorp/terraform-provider-google#15117 (comment) it was previously valid to specify locations/global/metricsScopes/<project_id> - can you confirm and include a workaround for that as well if so? (Would locations/global/metricsScopes/projects/<project_id> also have worked?)

I'm a little hesitant for us to just add more explicit string replacements to every former DCL resource, but it seems likely to be okay as long as we don't expect to add any more - can you confirm? If this is going to be a broader issue with fields that reference other resources, we should consider a more comprehensive solution.

If we do go ahead with just adding string replacements, it would be great to factor them out into a separate function with unit tests to make sure it behaves as expected.

@trodge

trodge commented Jul 12, 2023

Copy link
Copy Markdown
Contributor Author

According to hashicorp/terraform-provider-google#15117 (comment) it was previously valid to specify locations/global/metricsScopes/<project_id> - can you confirm and include a workaround for that as well if so? (Would locations/global/metricsScopes/projects/<project_id> also have worked?)

I'm a little hesitant for us to just add more explicit string replacements to every former DCL resource, but it seems likely to be okay as long as we don't expect to add any more - can you confirm? If this is going to be a broader issue with fields that reference other resources, we should consider a more comprehensive solution.

If we do go ahead with just adding string replacements, it would be great to factor them out into a separate function with unit tests to make sure it behaves as expected.

I've decided to move the handling of long form values into the encoder.

@trodge trodge requested a review from melinath July 12, 2023 17:31
@modular-magician

Copy link
Copy Markdown
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, 7 insertions(+), 10 deletions(-))
Terraform Beta: Diff ( 3 files changed, 5 insertions(+), 10 deletions(-))
TF Conversion: Diff ( 3 files changed, 4 insertions(+), 3 deletions(-))

@modular-magician

Copy link
Copy Markdown
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, 56 insertions(+), 33 deletions(-))
Terraform Beta: Diff ( 4 files changed, 56 insertions(+), 33 deletions(-))
TF Conversion: Diff ( 4 files changed, 28 insertions(+), 3 deletions(-))

@melinath melinath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Terraform is still trying to create a new monitored project for me if I am using metrics_scope = "projects/<id>" in 4.72.1 and then upgrade to this PR.

@melinath melinath requested a review from zli82016 July 12, 2023 18:35
@zli82016

Copy link
Copy Markdown
Member

hashicorp/terraform-provider-google#15117 (comment)

Hello, @trodge , I also see the same issue.

@trodge

trodge commented Jul 12, 2023

Copy link
Copy Markdown
Contributor Author

hashicorp/terraform-provider-google#15117 (comment)

Hello, @trodge , I also see the same issue.

Should be fixed now.

@modular-magician

Copy link
Copy Markdown
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, 63 insertions(+), 33 deletions(-))
Terraform Beta: Diff ( 4 files changed, 63 insertions(+), 33 deletions(-))
TF Conversion: Diff ( 4 files changed, 28 insertions(+), 3 deletions(-))

Comment thread mmv1/products/monitoring/MonitoredProject.yaml Outdated
@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2853
Passed tests 2551
Skipped tests: 297
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccContainerAwsNodePool_BetaBasicHandWritten|TestAccComputeFirewallPolicyRule_multipleRules|TestAccVertexAIIndex_updated|TestAccVertexAIIndex_vertexAiIndexStreamingExample|TestAccVertexAIIndex_vertexAiIndexExample

Get to know how VCR tests work

@modular-magician

Copy link
Copy Markdown
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, 49 insertions(+), 33 deletions(-))
Terraform Beta: Diff ( 4 files changed, 49 insertions(+), 33 deletions(-))
TF Conversion: Diff ( 4 files changed, 14 insertions(+), 3 deletions(-))

@trodge trodge requested a review from zli82016 July 12, 2023 21:56

@zli82016 zli82016 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@trodge trodge merged commit 722fb20 into GoogleCloudPlatform:main Jul 12, 2023
@trodge trodge deleted the monitoring-monitored-project branch July 12, 2023 22:13
@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2853
Passed tests 2551
Skipped tests: 297
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccContainerAwsNodePool_BetaBasicHandWritten|TestAccComputeFirewallPolicyRule_multipleRules|TestAccVertexAIIndex_updated|TestAccVertexAIIndex_vertexAiIndexExample|TestAccVertexAIIndex_vertexAiIndexStreamingExample

Get to know how VCR tests work

@modular-magician

Copy link
Copy Markdown
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccVertexAIIndex_updated[Debug log]
TestAccVertexAIIndex_vertexAiIndexStreamingExample[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccContainerAwsNodePool_BetaBasicHandWritten[Error message] [Debug log]
TestAccComputeFirewallPolicyRule_multipleRules[Error message] [Debug log]
TestAccVertexAIIndex_vertexAiIndexExample[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

Khaledmohamedrefaat pushed a commit to Khaledmohamedrefaat/magic-modules that referenced this pull request Jul 13, 2023
* Allow property to work for monitoring monitored project

* Change display name

* Move handling of long form to encoder

* Add error retry predicate

* Add a pre-read

* Retry all 403 errors
ericayyliu pushed a commit to ericayyliu/magic-modules that referenced this pull request Jul 26, 2023
* Allow property to work for monitoring monitored project

* Change display name

* Move handling of long form to encoder

* Add error retry predicate

* Add a pre-read

* Retry all 403 errors
wj-chen pushed a commit to wj-chen/magic-modules that referenced this pull request Aug 1, 2023
* Allow property to work for monitoring monitored project

* Change display name

* Move handling of long form to encoder

* Add error retry predicate

* Add a pre-read

* Retry all 403 errors
hao-nan-li pushed a commit to hao-nan-li/magic-modules that referenced this pull request Aug 9, 2023
* Allow property to work for monitoring monitored project

* Change display name

* Move handling of long form to encoder

* Add error retry predicate

* Add a pre-read

* Retry all 403 errors
@hao-nan-li hao-nan-li mentioned this pull request Sep 6, 2023
5 tasks
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.

4 participants