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

Reservation Affinity for workbench instances #13328

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

bcreddy-gcp
Copy link
Contributor

@bcreddy-gcp bcreddy-gcp commented Mar 11, 2025

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

workbench: added `reservation_affinity` field to `google_workbench_instance` resource.

@bcreddy-gcp bcreddy-gcp changed the title Wbi reservations Reservation Affinity for workbench instances Mar 11, 2025
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: see go/terraform-auto-test-runs to set up automatic test runs.

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

@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 ( 4 files changed, 471 insertions(+))
google-beta provider: Diff ( 4 files changed, 471 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 93 insertions(+))
Open in Cloud Shell: Diff ( 5 files changed, 153 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 24
Passed tests: 21
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • workbench

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
  • TestAccWorkbenchInstance_workbenchInstanceBasicGpuExample
  • TestAccWorkbenchInstance_workbenchInstanceConfidentialComputeExample
  • TestAccWorkbenchInstance_workbenchInstanceFullExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccWorkbenchInstance_workbenchInstanceBasicGpuExample [Error message] [Debug log]
TestAccWorkbenchInstance_workbenchInstanceConfidentialComputeExample [Error message] [Debug log]
TestAccWorkbenchInstance_workbenchInstanceFullExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

- 'SEV'
- 'SEV_SNP'
- 'TDX'
- name: 'reservationAffinity'
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like the tests are causing an unwanted force replacement on this.

                  ~ network_interfaces (known after apply)
                  - network_interfaces {
                      - network  = "https://www.googleapis.com/compute/v1/projects/ci-test-project-188019/global/networks/default" -> null
                      - subnet   = "https://www.googleapis.com/compute/v1/projects/ci-test-project-188019/regions/us-central1/subnetworks/default" -> null
                        # (1 unchanged attribute hidden)
        
                      - access_configs {
                          - external_ip = "34.121.56.226" -> null
                        }
                    }
        
                  + reservation_affinity { # forces replacement
                      + consume_reservation_type = "RESERVATION_ANY" # forces replacement
                    }
        
                  ~ service_accounts (known after apply)
                  - service_accounts {
                      - email  = "[email protected]" -> null
                      - scopes = [
                          - "https://www.googleapis.com/auth/cloud-platform",
                          - "https://www.googleapis.com/auth/userinfo.email",
                        ] -> null
                    }

It doesn't seem to be get added into state since a second apply shows us that it's attempting to add it. Can you take a look as to what could be causing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

API rollout for these fields is not yet done which is causing this issue. I didn't face this on my local since I have the required visibility labels for these fields. We can revisit this after the rollout is done.

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