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

Fix: Remove 1.23 restriction on workload identity module #1595

Merged

Conversation

liggitt
Copy link
Contributor

@liggitt liggitt commented Mar 25, 2023

The issue with hashicorp/kubernetes hanging creating service accounts was resolved in hashicorp/terraform-provider-kubernetes#1792 in https://github.com/hashicorp/terraform-provider-kubernetes/releases/tag/v2.13.0

This reverts the temporary limitation of the workload identity module to 1.23 added in #1315 to resolve #1313, and updates the minimum required version of hashicorp/kubernetes to 2.13.0 for the workload-identity module

Fixes #1582

cc @bharathkkb @apeabody

BEGIN_COMMIT_OVERRIDE
Fix(kubernetes ~> 2.13)!: Remove 1.23 restriction on workload identity module (#1595)
END_COMMIT_OVERRIDE

@liggitt liggitt changed the title Remove 1.23 restriction on workload identity module Fix: Remove 1.23 restriction on workload identity module Mar 25, 2023
@bharathkkb
Copy link
Member

/gcbrun

@liggitt
Copy link
Contributor Author

liggitt commented Mar 27, 2023

looks like the CI failure (https://console.cloud.google.com/cloud-build/builds;region=global/4191051c-4ffc-4779-9adc-73ede3c8d710;step=94?e=-13802955&jsmode=o&mods=logs_tg_prod&project=cloud-foundation-cicd) is

TestSimpleAutopilotPrivateNonDefaultSA 2023-03-27T19:32:36Z command.go:100: Running command terraform with args [output -no-color -json project_ids]
TestSimpleAutopilotPrivateNonDefaultSA 2023-03-27T19:32:40Z command.go:185: 
TestSimpleAutopilotPrivateNonDefaultSA 2023-03-27T19:32:40Z command.go:185: Error: Output "project_ids" not found
TestSimpleAutopilotPrivateNonDefaultSA 2023-03-27T19:32:40Z command.go:185: 
TestSimpleAutopilotPrivateNonDefaultSA 2023-03-27T19:32:40Z command.go:185: The output variable requested could not be found in the state file. If you
TestSimpleAutopilotPrivateNonDefaultSA 2023-03-27T19:32:40Z command.go:185: recently added this to your configuration, be sure to run `terraform apply`,
TestSimpleAutopilotPrivateNonDefaultSA 2023-03-27T19:32:40Z command.go:185: since the state won't be updated with new output variables until that command
TestSimpleAutopilotPrivateNonDefaultSA 2023-03-27T19:32:40Z command.go:185: is run.
TestSimpleAutopilotPrivateNonDefaultSA 2023-03-27T19:32:40Z retry.go:99: Returning due to fatal error: FatalError{Underlying: error while running command: exit status 1; 
Error: Output "project_ids" not found

The output variable requested could not be found in the state file. If you
recently added this to your configuration, be sure to run `terraform apply`,
since the state won't be updated with new output variables until that command
is run.}
    output.go:193: 
        	Error Trace:	/builder/home/go/pkg/mod/github.com/gruntwork-io/terratest@v0.41.11/modules/terraform/output.go:193
        	            				/builder/home/go/pkg/mod/github.com/!google!cloud!platform/cloud-foundation-toolkit/infra/blueprint-test@v0.4.1/pkg/tft/terraform.go:292
        	            				/workspace/test/integration/utils/utils.go:25
        	            				/workspace/test/integration/simple_autopilot_private_non_default_sa/simple_autopilot_private_non_default_sa_test.go:27
        	Error:      	Received unexpected error:
        	            	FatalError{Underlying: error while running command: exit status 1; 
        	            	Error: Output "project_ids" not found
        	            	
        	            	The output variable requested could not be found in the state file. If you
        	            	recently added this to your configuration, be sure to run `terraform apply`,
        	            	since the state won't be updated with new output variables until that command
        	            	is run.}
        	Test:       	TestSimpleAutopilotPrivateNonDefaultSA
--- FAIL: TestSimpleAutopilotPrivateNonDefaultSA (17.34s)

I think this is pre-existing, I'm seeing this job fail on other PRs as well

is there an issue and ETA for resolving the CI break at HEAD?

@apeabody
Copy link
Contributor

Thanks @liggitt!

@bharathkkb, I opened #1597

@liggitt
Copy link
Contributor Author

liggitt commented Mar 27, 2023

looks like the rerun passed, and the workload-identity-local steps succeeded (and from what I can tell, it tested against a 1.25 cluster)

@apeabody
Copy link
Contributor

looks like the rerun passed, and the workload-identity-local steps succeeded

Yes, looks like some CI flakiness as both this and my test PR just passed.

Copy link
Contributor

@apeabody apeabody left a comment

Choose a reason for hiding this comment

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

Thanks @liggitt! LGTM!

@apeabody apeabody merged commit b23bc86 into terraform-google-modules:master Mar 27, 2023
@liggitt
Copy link
Contributor Author

liggitt commented Mar 27, 2023

thanks! any chance of pulling this into a 25.1.0 patch release ahead of 26.0.0?

@apeabody
Copy link
Contributor

thanks! any chance of pulling this into a 25.1.0 patch release ahead of 26.0.0?

Let me discuss with @bharathkkb, but I think we might be able to make the next release v25.1.0.

@bharathkkb
Copy link
Member

@liggitt @apeabody IIUC The 1.23 k8s version was just hardcoded in the example and not in the module. Since the previously module supported > 2.0, < 3.0 anyway, users could technically use 2.13+ providers with the fix.

We have now also bumped the min constraint to > 2.13, < 3.0 which would need a breaking release incase users were explicitly pinned between > 2.0, < 2.13.

@liggitt
Copy link
Contributor Author

liggitt commented Mar 27, 2023

Interesting, thanks for that clarification. It's surprising a minor version dependency bump for a downstream bugfix requires a major version change here, but I'm glad existing consumers can use against 1.24+ successfully without any changes here

@apeabody
Copy link
Contributor

@liggitt @apeabody IIUC The 1.23 k8s version was just hardcoded in the example and not in the module. Since the previously module supported > 2.0, < 3.0 anyway, users could technically use 2.13+ providers with the fix.

We have now also bumped the min constraint to > 2.13, < 3.0 which would need a breaking release incase users were explicitly pinned between > 2.0, < 2.13.

Thanks @bharathkkb! That was going to be my question with regards to it being a non-Google provider.

@apeabody
Copy link
Contributor

apeabody commented Mar 27, 2023

Interesting, thanks for that clarification. It's surprising a minor version dependency bump for a downstream bugfix requires a major version change here, but I'm glad existing consumers can use against 1.24+ successfully without any changes here

Hi @liggitt, yes good call by @bharathkkb that it was the module README.md and example used for CI which were pinned to kubernetes_version = "1.23", nothing in the v25.0.0 terraform-google-kubernetes-engine module actually limited the kubernetes version. As long as a user doesn't have it pinned elsewhere, terraform init -upgrade should update the kubernetes provider to the most recent 2.x release and everything should work as intended.

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.

workload-identity compatibility CI failure waiting for k8s objects
3 participants