Skip to content

Update cluster versions in TestAccContainerNodePool_concurrent#12955

Merged
melinath merged 4 commits intoGoogleCloudPlatform:mainfrom
bbasata:gke-version-train-moves-forward
Feb 11, 2025
Merged

Update cluster versions in TestAccContainerNodePool_concurrent#12955
melinath merged 4 commits intoGoogleCloudPlatform:mainfrom
bbasata:gke-version-train-moves-forward

Conversation

@bbasata
Copy link
Copy Markdown
Collaborator

@bbasata bbasata commented Feb 4, 2025

At time of this writing, the cluster default version is 1.31.5. The acceptance test fails because the API will not update such a cluster to 1.29.4.

This change updates the static versions and leaves hyper-breadcrumbs for the next traveler on this path.

Fixes hashicorp/terraform-provider-google#21116

Release Note Template for Downstream PRs (will be copied)


At time of this writing, the cluster default version is 1.31.5,
so the API will not update such as cluster to 1.29.4.

This change does not "fix" the need to update these static versions
from time to time. It does leave breadcrumbs for the next traveler
to zero in on the answer.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 4, 2025

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

@melinath, 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 trodge February 4, 2025 01:36
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 4, 2025
@modular-magician modular-magician added service/container and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Feb 4, 2025
@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.

google provider: Diff ( 1 file changed, 14 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 1 file changed, 14 insertions(+), 2 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 225
Passed tests: 213
Skipped tests: 11
Affected tests: 1

Click here to see the affected service packages
  • container

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

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContainerNodePool_concurrent [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

@bbasata
Copy link
Copy Markdown
Collaborator Author

bbasata commented Feb 5, 2025

Oh yes, this needs to be recorded anew. If someone gets to this before I do, that's more than welcome.

@github-actions github-actions bot requested a review from trodge February 5, 2025 16:10
@melinath
Copy link
Copy Markdown
Member

melinath commented Feb 5, 2025

@modular-magician reassign-reviewer melinath

@github-actions github-actions bot requested a review from melinath February 5, 2025 23:20
Copy link
Copy Markdown
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

@bbasata the recording is happening automatically - the failures are due to:

  
        Error: googleapi: Error 400: Node version "1.32.0-gke.1448000" must not have a greater minor version than master version "1.31.4-gke.1256000".
        Details:
        [
          {
            "@type": "type.googleapis.com/google.rpc.RequestInfo",
            "requestId": "0x19cad9635fdbce46"
          }
        ]
        , badRequest
        
          with google_container_node_pool.np1,
          on terraform_plugin_test.tf line 11, in resource "google_container_node_pool" "np1":
          11: resource "google_container_node_pool" "np1" {
        
        
        Error: googleapi: Error 400: Node version "1.32.0-gke.1448000" must not have a greater minor version than master version "1.31.4-gke.1256000".
        Details:
        [
          {
            "@type": "type.googleapis.com/google.rpc.RequestInfo",
            "requestId": "0x2a7c99b7fe91d372"
          }
        ]
        , badRequest
        
          with google_container_node_pool.np2,
          on terraform_plugin_test.tf line 23, in resource "google_container_node_pool" "np2":
          23: resource "google_container_node_pool" "np2" {

Possibly relatedly - could this test be rewritten to use the google_container_engine_versions data source instead of hardcoding versions?

@melinath melinath removed the request for review from trodge February 5, 2025 23:21
@github-actions github-actions bot requested review from melinath and trodge February 5, 2025 23:42
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 5, 2025
@bbasata
Copy link
Copy Markdown
Collaborator Author

bbasata commented Feb 5, 2025

@bbasata the recording is happening automatically - the failures are due to:

Got it, thanks! I think I see what I missed. The node version cannot exceed the cluster (control plane) version. git push. Waiting on checks ...

could this test be rewritten to use the google_container_engine_versions data source instead of hardcoding versions?

I'd like to give it a try. If this PR goes green (maybe!), how about we merge, and then follow up with the nicer solution?

@melinath
Copy link
Copy Markdown
Member

melinath commented Feb 5, 2025

If this PR goes green (maybe!), how about we merge, and then follow up with the nicer solution?

SGTM

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 6, 2025
@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.

google provider: Diff ( 1 file changed, 21 insertions(+), 7 deletions(-))
google-beta provider: Diff ( 1 file changed, 21 insertions(+), 7 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 225
Passed tests: 213
Skipped tests: 11
Affected tests: 1

Click here to see the affected service packages
  • container

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

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContainerNodePool_concurrent [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

Copy link
Copy Markdown
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

Error is:

        Error: Unsupported argument
        
          on terraform_plugin_test.tf line 9, in resource "google_container_cluster" "cluster":
           9:   version             = "1.32.0-gke.1448000"
        
        An argument named "version" is not expected here.

…er_node_pool_test.go.tmpl

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
@github-actions github-actions bot requested a review from melinath February 10, 2025 21:51
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 10, 2025
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Feb 10, 2025
@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.

google provider: Diff ( 1 file changed, 21 insertions(+), 7 deletions(-))
google-beta provider: Diff ( 1 file changed, 21 insertions(+), 7 deletions(-))

@KatrinaHoffert
Copy link
Copy Markdown
Member

Thanks for fixing this! I'm not sure why we ever hard coded it.

Bumping the version works for now. A perhaps cleaner long term solution would be to just choose some simpler field. The most important thing is that the operation takes a little bit of time so that there is actual concurrency (since several fields are nearly instant to update). There's many possibilities. The node_config field has a few that are probably cheap and easy. I particularly eye metadata as one that seems like it'd be a straightforward one to update. Seems like that'd improve coverage too, as we appear to not have any tests for that field already. Though if that makes it feel too risky, disk_size_gb is another option that at least has existing tests.

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 225
Passed tests: 213
Skipped tests: 11
Affected tests: 1

Click here to see the affected service packages
  • container

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

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccContainerNodePool_concurrent [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

Copy link
Copy Markdown
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

approving this for now to get the test passing; we can consider a longer-term fix separately.

@melinath
Copy link
Copy Markdown
Member

Thanks all!

@melinath melinath added this pull request to the merge queue Feb 11, 2025
Merged via the queue into GoogleCloudPlatform:main with commit 15b9d38 Feb 11, 2025
@bbasata bbasata deleted the gke-version-train-moves-forward branch February 11, 2025 14:18
Dawid212 pushed a commit to Dawid212/magic-modules that referenced this pull request Feb 12, 2025
…eCloudPlatform#12955)

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
niharika-98 pushed a commit to niharika-98/magic-modules that referenced this pull request Feb 17, 2025
…eCloudPlatform#12955)

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
@wyardley
Copy link
Copy Markdown
Contributor

wyardley commented Feb 27, 2025

I updated it in #13161 with an approach that hopefully accomplishes the goal of the test in a slightly more durable way, by picking two (normally) different versions? I also sized down the node pools and deleted the default pool, which should if nothing else, make it faster and cheaper to run.

I'd come across this PR, but hadn't read through all the comments before (since I'd noticed it was already fixed). I agree with the above, though, that probably updating a different field might make more sense, along with some additional comments on the goals behind the test.

JaylonmcShan03 pushed a commit to JaylonmcShan03/magic-modules-jmcshan that referenced this pull request Mar 25, 2025
…eCloudPlatform#12955)

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
JaylonmcShan03 pushed a commit to JaylonmcShan03/magic-modules-jmcshan that referenced this pull request Mar 30, 2025
…eCloudPlatform#12955)

Co-authored-by: Stephen Lewis (Burrows) <stephen.r.burrows@gmail.com>
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.

Failing test(s): TestAccContainerNodePool_concurrent

6 participants