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

Cloud Workstations - Workstation Cluster #7005

Merged

Conversation

bschaatsbergen
Copy link
Contributor

@bschaatsbergen bschaatsbergen commented Dec 20, 2022

Closes #12763

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)

google_workstations_workstation_cluster

@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@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. @ScottSuarez, 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
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR hasn't generated any diffs, but I'll let you know if a future commit does.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2353
Passed tests 2056
Skipped tests: 247
Failed tests: 50

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccComputeBackendService_withBackendAndMaxUtilization|TestAccComputeBackendService_withBackendAndIAP|TestAccComputeRegionAutoscaler_update|TestAccContainerCluster_withInvalidGatewayApiConfigChannel|TestAccComputeRegionPerInstanceConfig_update|TestAccComputeRegionAutoscaler_scalingSchedule|TestAccComputeRegionAutoscaler_scaleDownControl|TestAccComputeRegionAutoscaler_regionAutoscalerBasicExample|TestAccRegionInstanceGroupManager_stateful|TestAccRegionInstanceGroupManager_distributionPolicy|TestAccRegionInstanceGroupManager_autoHealingPolicies|TestAccComputeRegionBackendService_withBackendMultiNic|TestAccComputeRegionBackendService_withBackendInternalManaged|TestAccRegionInstanceGroupManager_versions|TestAccComputePerInstanceConfig_update|TestAccComputeRegionBackendService_withBackendInternal|TestAccRegionInstanceGroupManager_update|TestAccRegionInstanceGroupManager_targetSizeZero|TestAccRegionInstanceGroupManager_basic|TestAccComputeRegionBackendService_regionBackendServiceBalancingModeExample|TestAccComputeRegionAutoscaler_scaleInControl|TestAccInstanceGroupManager_waitForStatus|TestAccInstanceGroupManager_stateful|TestAccInstanceGroupManager_autoHealingPolicies|TestAccComputeGlobalForwardingRule_internalLoadBalancing|TestAccInstanceGroupManager_versions|TestAccInstanceGroupManager_update|TestAccInstanceGroupManager_targetSizeZero|TestAccInstanceGroupManager_basic|TestAccComputeGlobalForwardingRule_globalForwardingRuleInternalExample|TestAccComputeGlobalForwardingRule_externalHttpLbMigBackendCustomHeaderExample|TestAccDataSourceGoogleComputeInstanceGroup_fromIGM|TestAccComputeForwardingRule_forwardingRuleRegionalHttpXlbExample|TestAccLoggingBucketConfigProject_cmekSettings|TestAccComputeBackendService_withMaxConnections|TestAccComputeAutoscaler_scaleInControlFixed|TestAccComputeForwardingRule_internalHttpLbWithMigBackendExample|TestAccComputeAutoscaler_scaleInControl|TestAccComputeAutoscaler_scalingSchedule|TestAccComputeAutoscaler_multicondition|TestAccComputeAutoscaler_update|TestAccComputeAutoscaler_autoscalerBasicExample|TestAccComputeAutoscaler_autoscalerSingleInstanceExample|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeForwardingRule_forwardingRuleHttpLbExample|TestAccComputeGlobalForwardingRule_externalTcpProxyLbMigBackendExample|TestAccComputeForwardingRule_internalTcpUdpLbWithMigBackendExample|TestAccComputeBackendService_withMaxConnectionsPerInstance|TestAccComputeAutoscaler_scaleDownControl|TestAccComputeBackendService_withBackend

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeBackendService_withBackendAndMaxUtilization[Debug log]
TestAccComputeBackendService_withBackendAndIAP[Debug log]
TestAccComputeRegionAutoscaler_update[Debug log]
TestAccContainerCluster_withInvalidGatewayApiConfigChannel[Debug log]
TestAccComputeRegionPerInstanceConfig_update[Debug log]
TestAccComputeRegionAutoscaler_scalingSchedule[Debug log]
TestAccComputeRegionAutoscaler_scaleDownControl[Debug log]
TestAccComputeRegionAutoscaler_regionAutoscalerBasicExample[Debug log]
TestAccRegionInstanceGroupManager_stateful[Debug log]
TestAccRegionInstanceGroupManager_distributionPolicy[Debug log]
TestAccRegionInstanceGroupManager_autoHealingPolicies[Debug log]
TestAccComputeRegionBackendService_withBackendMultiNic[Debug log]
TestAccComputeRegionBackendService_withBackendInternalManaged[Debug log]
TestAccRegionInstanceGroupManager_versions[Debug log]
TestAccComputePerInstanceConfig_update[Debug log]
TestAccComputeRegionBackendService_withBackendInternal[Debug log]
TestAccRegionInstanceGroupManager_update[Debug log]
TestAccRegionInstanceGroupManager_targetSizeZero[Debug log]
TestAccRegionInstanceGroupManager_basic[Debug log]
TestAccComputeRegionBackendService_regionBackendServiceBalancingModeExample[Debug log]
TestAccComputeRegionAutoscaler_scaleInControl[Debug log]
TestAccInstanceGroupManager_waitForStatus[Debug log]
TestAccInstanceGroupManager_stateful[Debug log]
TestAccInstanceGroupManager_autoHealingPolicies[Debug log]
TestAccComputeGlobalForwardingRule_internalLoadBalancing[Debug log]
TestAccInstanceGroupManager_versions[Debug log]
TestAccInstanceGroupManager_update[Debug log]
TestAccInstanceGroupManager_targetSizeZero[Debug log]
TestAccInstanceGroupManager_basic[Debug log]
TestAccComputeGlobalForwardingRule_globalForwardingRuleInternalExample[Debug log]
TestAccComputeGlobalForwardingRule_externalHttpLbMigBackendCustomHeaderExample[Debug log]
TestAccDataSourceGoogleComputeInstanceGroup_fromIGM[Debug log]
TestAccComputeForwardingRule_forwardingRuleRegionalHttpXlbExample[Debug log]
TestAccLoggingBucketConfigProject_cmekSettings[Debug log]
TestAccComputeBackendService_withMaxConnections[Debug log]
TestAccComputeAutoscaler_scaleInControlFixed[Debug log]
TestAccComputeForwardingRule_internalHttpLbWithMigBackendExample[Debug log]
TestAccComputeAutoscaler_scaleInControl[Debug log]
TestAccComputeAutoscaler_scalingSchedule[Debug log]
TestAccComputeAutoscaler_multicondition[Debug log]
TestAccComputeAutoscaler_update[Debug log]
TestAccComputeAutoscaler_autoscalerBasicExample[Debug log]
TestAccComputeAutoscaler_autoscalerSingleInstanceExample[Debug log]
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccComputeForwardingRule_forwardingRuleHttpLbExample[Debug log]
TestAccComputeGlobalForwardingRule_externalTcpProxyLbMigBackendExample[Debug log]
TestAccComputeForwardingRule_internalTcpUdpLbWithMigBackendExample[Debug log]
TestAccComputeBackendService_withMaxConnectionsPerInstance[Debug log]
TestAccComputeAutoscaler_scaleDownControl[Debug log]
TestAccComputeBackendService_withBackend[Debug log]

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

@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@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 hasn't generated any diffs, but I'll let you know if a future commit does.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2367
Passed tests 2117
Skipped tests: 247
Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccContainerCluster_withInvalidGatewayApiConfigChannel|TestAccLoggingBucketConfigProject_cmekSettings

@modular-magician
Copy link
Collaborator

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

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

@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@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 hasn't generated any diffs, but I'll let you know if a future commit does.

@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@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 hasn't generated any diffs, but I'll let you know if a future commit does.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2367
Passed tests 2117
Skipped tests: 247
Failed tests: 3

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|TestAccLoggingBucketConfigProject_cmekSettings

@modular-magician
Copy link
Collaborator

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

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

@bschaatsbergen bschaatsbergen changed the title Cloud Workstations Cloud Workstations - Workstation Cluster Dec 21, 2022
@bschaatsbergen bschaatsbergen changed the title Cloud Workstations - Workstation Cluster Cloud Workstations Dec 21, 2022
@bschaatsbergen bschaatsbergen changed the title Cloud Workstations Cloud Workstations - Workstation Cluster Dec 21, 2022
@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]

Tests failed during RECORDING mode:
TestAccorkstationsWorkstationCluster_update[Error message] [Debug log]
TestAccRegionInstanceGroupManager_stateful[Error message] [Debug log]
TestAccContainerCluster_failedCreation[Error message] [Debug log]

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

@bschaatsbergen
Copy link
Contributor Author

bschaatsbergen commented Jan 30, 2023

@ScottSuarez, fixed the comments you put down. My assumption that the update in place wasn't working was incorrect. I just used the provider locally and the update only takes a few seconds.

Can it be that because we use 2 different test configs (also 2 random suffixes or not?), it does recreate as part of the update test and therefor exceeds the timeout?

Feel free to commit something in my branch btw.

Comment on lines 69 to 75
resource "google_compute_subnetwork" "default" {
provider = google-beta
name = "subnetwork-%{random_suffix}"
ip_cidr_range = "10.0.0.0/24"
region = "us-central1"
network = google_compute_network.default.id
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The name of the subnetwork isn't matching up with generated name of the subnetwork in testAccWorkstationsWorkstationCluster_workstationClusterBasicExample... This is forcing recreation here causing the google_workstations_workstation_cluster to subsequently get recreated. Lets either align the names or encapsulate both configs (before and after) within this file explicitly.

modular-magician/terraform-provider-google-beta@auto-pr-7005-old..auto-pr-7005#diff-38fbf90791

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sharp.. thanks Scott

@ScottSuarez
Copy link
Contributor

I pushed changes that should align the configurations

@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 ( 2 files changed, 251 insertions(+))
Terraform Beta: Diff ( 9 files changed, 1439 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 8 files changed, 272 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2445
Passed tests 2189
Skipped tests: 254
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_failedCreation|TestAccorkstationsWorkstationCluster_update

@bschaatsbergen
Copy link
Contributor Author

It still failed for some reason, thanks for the fix @ScottSuarez

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccContainerCluster_failedCreation[Debug log]
TestAccorkstationsWorkstationCluster_update[Debug log]

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

Copy link
Contributor

@ScottSuarez ScottSuarez 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 for your patience and persistence!

@ScottSuarez ScottSuarez merged commit 2e871d7 into GoogleCloudPlatform:main Jan 31, 2023
@bschaatsbergen
Copy link
Contributor Author

Sweet! @ScottSuarez I'm going to immediately hop on the other Cloud Workstation resources.

@bschaatsbergen
Copy link
Contributor Author

bschaatsbergen commented Mar 2, 2023

I noticed a mistake here:

image

cluster_hostname and service_attachment_uri are output only fields.

What do you recommend we do? Remove these in a major, or remove them now (might be a breaking change if we remove them now?)

@rileykarson / @SarahFrench

@SarahFrench
Copy link
Contributor

I don't think there's an issue with the provider, it's just that the documentation is a little misleading here. You marked those fields as outputs correctly and the resulting schema has those fields marked as Computed as we'd expect.

The documentation misleading here because the parent_cluster_config block contains outputs, but it also includes a field that can be set in the user's config (enable_private_endpoint). This means the parent_cluster_config block is included in the Arguments section because it contains something that a user can set, and cluster_hostname and service_attachment_uri aren't displayed under Attributes as a result. However, yeah, overall it makes the other fields look like they can be set by users.

We could address this by changing the template that generates these docs, e.g. to the idea below, but it'll have wide impacts and may need to be discussed by the maintainers about the correct approach:

The private_cluster_config block supports:

enable_private_endpoint - (Required) Whether Workstations endpoint is private.

cluster_hostname - (Output Only) Hostname for the workstation cluster. This field will be populated only when private endpoint is enabled. To access workstations in the cluster, create a new DNS zone mapping this domain name to an internal IP address and a forwarding rule mapping that address to the service attachment.

service_attachment_uri - (Output Only) Service attachment URI for the workstation cluster. The service attachemnt is created when private endpoint is enabled. To access workstations in the cluster, configure access to the managed service using (Private Service Connect)[https://cloud.google.com/vpc/docs/configure-private-service-connect-services].

👆 After saying all that, the tl;dr is I think it's our problem instead of yours! 😁

@bschaatsbergen
Copy link
Contributor Author

Thanks for elaborating @SarahFrench, you're right; it seems like the docs are misleading - I would think that they are arguments to pass. Anyhow, something we can fix in generating the docs correctly 👍🏼

ericayyliu pushed a commit to ericayyliu/magic-modules that referenced this pull request Jul 26, 2023
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.

Add support for Cloud Workstations
6 participants