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

ResourceManager : Update error messages for resource google_project_services in google-beta #11494

Merged

Conversation

shahmedhaCorp
Copy link
Contributor

@shahmedhaCorp shahmedhaCorp commented Aug 19, 2024

release-note: b/331417946
Update error message while disabling service with usage

Release Note Template for Downstream PRs (will be copied)


Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@NickElliot, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@github-actions github-actions bot requested a review from NickElliot August 19, 2024 22:18
@shahmedhaCorp
Copy link
Contributor Author

shahmedhaCorp commented Aug 19, 2024

Tested it
previously the error message was mentioning an internal flag "check_if_service_has_usage=SKIP" replaces it with terraform supported flag "check_if_service_has_usage_on_destroy=false".

Case where service has usage

google_project_service.google-beta-instance: Destroying... [id=965486546155/compute.googleapis.com]
╷
│ Error: Error when reading or editing Project Service 965486546155/compute.googleapis.com: Error service "compute.googleapis.com" for project "965486546155": googleapi: Error 400: The service compute.googleapis.com has usage in the last 30 days. Please specify check_if_service_has_usage_on_destroy=false if you want to proceed with disabling the service.
│ Help Token: AQAb6BwxBc08KLeMfI9cDXFd9O9TPhuUIOVvhqiKlCsdaK-GP8CQHMylBVx8uD44HIeNAPeAskg1bx4VmzhUzZwDhoVZiAfaJsnVVxHGI8FwRKjm
│ Details:
│ [
│   {
│     "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
│     "violations": [
│       {
│         "subject": "?error_code=100002\u0026service_name=compute.googleapis.com",
│         "type": "googleapis.com"
│       }
│     ]
│   },
│   {
│     "@type": "type.googleapis.com/google.rpc.ErrorInfo",
│     "domain": "serviceusage.googleapis.com",
│     "metadata": {
│       "service_name": "compute.googleapis.com"
│     },
│     "reason": "COMMON_SU_SERVICE_HAS_USAGE"
│   },
│   {
│     "@type": "type.googleapis.com/google.rpc.DebugInfo",
│     "detail": "[ORIGINAL ERROR] tenantmanager::100002: com.google.api.tenant.error.TenantManagerException: The service compute.googleapis.com has usage in the last 30 days. Please specify check_if_service_has_usage_on_destroy=false if you want to proceed with disabling the service. [google.rpc.error_details_ext] { code: 9 message: \"The service compute.googleapis.com has usage in the last 30 days. Please specify check_if_service_has_usage_on_destroy=false if you want to proceed with disabling the service.\\nHelp Token: AQAb6BwxBc08KLeMfI9cDXFd9O9TPhuUIOVvhqiKlCsdaK-GP8CQHMylBVx8uD44HIeNAPeAskg1bx4VmzhUzZwDhoVZiAfaJsnVVxHGI8FwRKjm\" details { [type.googleapis.com/google.rpc.PreconditionFailure] { violations { type: \"googleapis.com\" subject: \"?error_code=100002\u0026service_name=compute.googleapis.com\" } } } details { [type.googleapis.com/google.rpc.ErrorInfo] { reason: \"COMMON_SU_SERVICE_HAS_USAGE\" domain: \"serviceusage.googleapis.com\" metadata { key: \"service_name\" value: \"compute.googleapis.com\" } } } } 391798925 { 1: 100002 }"
│   }
│ ]
│ , failedPrecondition
│ 
│ 

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

google provider: Diff ( 1 file changed, 1 insertion(+))
google-beta provider: Diff ( 1 file changed, 4 insertions(+))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

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

google provider: Diff ( 1 file changed, 1 insertion(+))
google-beta provider: Diff ( 1 file changed, 4 insertions(+))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 144
Passed tests: 114
Skipped tests: 30
Affected tests: 0

Click here to see the affected service packages
  • resourcemanager

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

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

google-beta provider: Diff ( 1 file changed, 4 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 144
Passed tests: 114
Skipped tests: 30
Affected tests: 0

Click here to see the affected service packages
  • resourcemanager

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 144
Passed tests: 114
Skipped tests: 30
Affected tests: 0

Click here to see the affected service packages
  • resourcemanager

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

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

google provider: Diff ( 1 file changed, 1 insertion(+))
google-beta provider: Diff ( 1 file changed, 4 insertions(+))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 144
Passed tests: 114
Skipped tests: 30
Affected tests: 0

Click here to see the affected service packages
  • resourcemanager

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

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

google-beta provider: Diff ( 1 file changed, 4 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 144
Passed tests: 114
Skipped tests: 30
Affected tests: 0

Click here to see the affected service packages
  • resourcemanager

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

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

google-beta provider: Diff ( 1 file changed, 4 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 144
Passed tests: 114
Skipped tests: 30
Affected tests: 0

Click here to see the affected service packages
  • resourcemanager

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

minor formatting tweaks, otherwise lgtm

…oogle_project_service.go.erb

Co-authored-by: Nick Elliot <[email protected]>
@github-actions github-actions bot requested a review from NickElliot August 21, 2024 21:00
Copy link

@NickElliot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

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

google-beta provider: Diff ( 1 file changed, 4 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 144
Passed tests: 114
Skipped tests: 30
Affected tests: 0

Click here to see the affected service packages
  • resourcemanager

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants