Skip to content

Failing test(s): TestAccContainerCluster_withGatewayApiConfig failing on PRs #17319

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

Closed

Comments

@SarahFrench
Copy link
Member

SarahFrench commented Feb 19, 2024

Failure rates

  • ?% since YYYY-MM-DD?

Impacted tests

  • TestAccContainerCluster_withGatewayApiConfig

Affected Resource(s)

  • google_container_cluster

Nightly build test history Failure on PR

Message(s)

2024/02/19 16:46:13 [DEBUG] [transport] [server-transport 0xc0011011e0] loopyWriter exiting with error: transport closed by client 
    vcr_utils.go:152: Step 1/5, expected an error with pattern, no match on: Error running pre-apply refresh: exit status 1
        
        Error: expected gateway_api_config.0.channel to be one of ["CHANNEL_DISABLED" "CHANNEL_EXPERIMENTAL" "CHANNEL_STANDARD"], got CANARY
        
          with google_container_cluster.primary,
          on terraform_plugin_test.tf line 12, in resource "google_container_cluster" "primary":
          12:     channel = "CANARY"
        
--- FAIL: TestAccContainerCluster_withGatewayApiConfig (1.77s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-google-beta/google-beta/services/container	1.871s
FAIL
stderr:


b/326185953

@github-actions github-actions bot added forward/review In review; remove label to forward service/container labels Feb 19, 2024
@SarahFrench
Copy link
Member Author

SarahFrench commented Feb 19, 2024

I think that the validation here needs to be updated:

ValidateFunc: validation.StringInSlice([]string{"CHANNEL_DISABLED", "CHANNEL_EXPERIMENTAL", "CHANNEL_STANDARD"}, false),

However the API docs don't list CANARY as a valid value: https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters#channel

@melinath
Copy link
Collaborator

This test expects an error but it looks like the formatting of the error changed such that the regex no longer matches: https://github.com/hashicorp/terraform-provider-google-beta/blob/7462d9cd2c6677b807c4c9544a8064400589daa3/google-beta/services/container/resource_container_cluster_test.go#L4211

Previously the error from the API looked like:

expected gateway_api_config.0.channel to be one of [CHANNEL_DISABLED CHANNEL_EXPERIMENTAL CHANNEL_STANDARD], got CANARY

Now it looks like:

expected gateway_api_config.0.channel to be one of ["CHANNEL_DISABLED" "CHANNEL_EXPERIMENTAL" "CHANNEL_STANDARD"], got CANARY

@melinath
Copy link
Collaborator

This is also now failing in nightlies but I think it's worth just fixing since it's also impact PRs and the fix is trivial.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.