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 GCP PodIdentity not considered with WorkloadIdentity #5021

Closed

Conversation

juldrixx
Copy link
Contributor

@juldrixx juldrixx commented Sep 28, 2023

Provide a description of what has been changed

Checklist

#5011

Relates to #

@juldrixx juldrixx requested a review from a team as a code owner September 28, 2023 22:18
@github-actions
Copy link

Thank you for your contribution! 🙏 We will review your PR as soon as possible.

While you are waiting, make sure to:

Learn more about:

@juldrixx juldrixx changed the title Fix GCP PodIdentity not considered Fix GCP PodIdentity not considered with WorkloadIdentity Sep 28, 2023
@JorTurFer
Copy link
Member

Hello,
The changes look good, but there is a test failing because that function you have changed is covered by a test. You have to add expectedPodIdentity: kedav1alpha1.AuthPodIdentity{Provider: kedav1alpha1.PodIdentityProviderNone}, to the test cases where the expectdPodIdentity isn't set.
About how to cover this PR with a test for the future, there are 2 options actually:

  • Adding a test case that executes ResolveAuthRefAndPodIdentity and validates the output in this file
  • Covering it with e2e test, adding another test case to the secret-provider folder using podIdentity with a CRD, such as Argo Rollouts. You can do it mixing any podIdentity test (for example this) with the custom resource test (like this). Basically, you can use the workload definition from the second-one, with the ScaledObject + process from the first one

@sammaxwellxyz
Copy link
Contributor

Hi @JorTurFer

given this is a fix, to merge this PR, is the extra e2e required or a nice to have?

@juldrixx are you still working on this? I may be able to fork and fix the failing test but wouldn't be able to add the e2e in the short term

Cheers both

@juldrixx
Copy link
Contributor Author

Hi @JorTurFer

given this is a fix, to merge this PR, is the extra e2e required or a nice to have?

@juldrixx are you still working on this? I may be able to fork and fix the failing test but wouldn't be able to add the e2e in the short term

Cheers both

I'm currently rather busy, but I might have some time next week to look at the test part. But if you want to do it before then, no worries you can.

@JorTurFer
Copy link
Member

given this is a fix, to merge this PR, is the extra e2e required or a nice to have?

Any kind of test is required for preventing regressions and in this case, I'd say that e2e test is the easiest way because that code it's quite coupled and there isn't any other test already done that you can use as base for having all the test setup ready, you'd need to prepare all the unit test setup, which probably requires more time than writing an e2e test (but it's not mandatory an e2e test)

@zroubalik
Copy link
Member

Replaced by: #5255

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.

4 participants