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

Add readiness_checks to google_workstations_workstation_config #9841

Conversation

bschaatsbergen
Copy link
Contributor

@bschaatsbergen bschaatsbergen commented Jan 18, 2024

Adds the readiness_checks argument block to the google_workstations_workstation_config resource.

Release Note Template for Downstream PRs (will be copied)

workstations: added `readiness_checks` argument block to `google_workstations_workstation_config` resource (beta)

Relates hashicorp/terraform-provider-google#16997

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will require approval to run.

@shuyama1, 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 modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests service/workstations and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jan 18, 2024
@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 ( 1 file changed, 15 insertions(+))
Terraform Beta: Diff ( 3 files changed, 193 insertions(+))
TF Conversion: Diff ( 1 file changed, 43 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_workstations_workstation_config (37 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_workstations_workstation_config" "primary" {
  readiness_checks {
    path = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 30
Passed tests 29
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • workstations

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccWorkstationsWorkstationConfig_readinessChecks

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccWorkstationsWorkstationConfig_readinessChecks[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

@shuyama1
Copy link
Member

Test failed with error:

Error: Error creating WorkstationConfig: googleapi: Error 400: readiness_check.path cannot be empty

@bschaatsbergen
Copy link
Contributor Author

Test failed with error:


Error: Error creating WorkstationConfig: googleapi: Error 400: readiness_check.path cannot be empty

Thanks for the quick feedback, I'll try '/' and port 80 ad that's apparently the default path and port.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 19, 2024
@bschaatsbergen
Copy link
Contributor Author

@shuyama1 addressed in 423987b

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 19, 2024
@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 ( 1 file changed, 15 insertions(+))
Terraform Beta: Diff ( 3 files changed, 194 insertions(+))
TF Conversion: Diff ( 1 file changed, 43 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 30
Passed tests 29
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • workstations

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccWorkstationsWorkstationConfig_readinessChecks

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{The provider crashed while running the VCR tests in RECORDING mode}}$
$\textcolor{red}{\textsf{Please fix it to complete your PR}}$
View the build log

@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jan 19, 2024
@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 ( 1 file changed, 15 insertions(+))
Terraform Beta: Diff ( 3 files changed, 207 insertions(+))
TF Conversion: Diff ( 1 file changed, 43 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 30
Passed tests 29
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • workstations

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccWorkstationsWorkstationConfig_readinessChecks

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

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


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@bschaatsbergen
Copy link
Contributor Author

Tests passed during RECORDING mode: TestAccWorkstationsWorkstationConfig_readinessChecks[Debug log]

Rerun these tests in REPLAYING mode to catch issues

No issues found for passed tests after REPLAYING rerun.

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

@shuyama1 🚀 !

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

Mostly good. Some small comments

Comment on lines 437 to 444
- !ruby/object:Api::Type::String
name: 'path'
description: |
Path to which the request should be sent.
- !ruby/object:Api::Type::Integer
name: 'port'
description: |
Port to which the request should be sent.
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we want to mark these two fields required based on the previous error we ran into, even if they seem to be optional based on the API doc. Changing a field from required to optional is non-changing while the other way around is breaking.

Plus, are these updatable? If so, can you add an update test following https://googlecloudplatform.github.io/magic-modules/develop/test/#add-an-update-test. Otherwise, we need to mark them immutable. Also, if you think the fields can be tested in any of the existing tests, feel free to add them to an existing one instead of creating a new test for this feature. Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great suggestion Shuya! I'll make them required, based on the previous error we faced. I would assume they are updatable, I'll introduce a test.

Copy link
Contributor Author

@bschaatsbergen bschaatsbergen Jan 19, 2024

Choose a reason for hiding this comment

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

Added readiness_checks to the basic example through e8d3ec3, do you think this would be enough? The basic example is part of the existing update test. And, I've set the readiness_checks arguments to be required via 5fba9ba.

Copy link
Member

@shuyama1 shuyama1 Jan 19, 2024

Choose a reason for hiding this comment

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

Would it be possible if we choose another update test? We try to keep only minimum required fields in the basic example config. Sorry about the extra work

Copy link
Contributor Author

@bschaatsbergen bschaatsbergen Jan 19, 2024

Choose a reason for hiding this comment

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

I don't have an easy way to expose a different port, it's at least not possible via the existing arguments (also looking at https://workstations.googleapis.com/$discovery/rest?version=v1beta). The default exposed port is port 80. Could we perhaps omit the update test? I have a feeling that updating port 80 to any other arbitrary port is going to result into a timeout error.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 19, 2024
@bschaatsbergen
Copy link
Contributor Author

@shuyama1 any chance we can ship this :)?

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 23, 2024
@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 ( 1 file changed, 15 insertions(+))
Terraform Beta: Diff ( 3 files changed, 207 insertions(+))
TF Conversion: Diff ( 1 file changed, 43 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • workstations

$\textcolor{green}{\textsf{All tests passed in REPLAYING mode.}}$
View the build log

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

Thank you!

@shuyama1 shuyama1 merged commit 7ca983b into GoogleCloudPlatform:main Jan 23, 2024
13 checks passed
@bschaatsbergen bschaatsbergen deleted the f/readiness-checks-workstation branch January 23, 2024 22:54
tdbhacks pushed a commit to tdbhacks/magic-modules that referenced this pull request Feb 6, 2024
…oogleCloudPlatform#9841)

* feat: add `readiness_checks` to Workstation Config

* chore: set path and change port to port 80

* Update WorkstationConfig.yaml

Co-authored-by: Shuya Ma <[email protected]>

* chore: make readiness checks arguments required

* chore: add readiness checks to basic example

* LRevert "chore: add readiness checks to basic example"

This reverts commit e8d3ec3.

---------
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request Apr 19, 2024
…oogleCloudPlatform#9841)

* feat: add `readiness_checks` to Workstation Config

* chore: set path and change port to port 80

* Update WorkstationConfig.yaml

Co-authored-by: Shuya Ma <[email protected]>

* chore: make readiness checks arguments required

* chore: add readiness checks to basic example

* LRevert "chore: add readiness checks to basic example"

This reverts commit e8d3ec3.

---------
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
…oogleCloudPlatform#9841)

* feat: add `readiness_checks` to Workstation Config

* chore: set path and change port to port 80

* Update WorkstationConfig.yaml

Co-authored-by: Shuya Ma <[email protected]>

* chore: make readiness checks arguments required

* chore: add readiness checks to basic example

* LRevert "chore: add readiness checks to basic example"

This reverts commit e8d3ec3.

---------
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
…oogleCloudPlatform#9841)

* feat: add `readiness_checks` to Workstation Config

* chore: set path and change port to port 80

* Update WorkstationConfig.yaml

Co-authored-by: Shuya Ma <[email protected]>

* chore: make readiness checks arguments required

* chore: add readiness checks to basic example

* LRevert "chore: add readiness checks to basic example"

This reverts commit e8d3ec3.

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