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

normalize oidc configs to string values for comparison #3735

Merged
merged 2 commits into from
Oct 13, 2022

Conversation

luthermonson
Copy link
Contributor

What type of PR is this?
/kind bug

What this PR does / why we need it:
Normalizes OIDC configs into string values for easier comparison for reconciliation.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #3734

Special notes for your reviewer:
I have a test running with a debugger right now which will prove this fixed the issue so this is just ready for review and ill post screenshots of it being fixed when I have them.

Checklist:

  • squashed commits
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 14, 2022
@k8s-ci-robot k8s-ci-robot added needs-priority needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 14, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @luthermonson. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 14, 2022
@Skarlso
Copy link
Contributor

Skarlso commented Sep 14, 2022

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 14, 2022
@luthermonson
Copy link
Contributor Author

oh... fixing the tests sorry about that

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 14, 2022
@luthermonson
Copy link
Contributor Author

pic of it working

600503d02dd63e11921f556faea41f7b

@luthermonson
Copy link
Contributor Author

/test pull-cluster-api-provider-aws-test

1 similar comment
@luthermonson
Copy link
Contributor Author

/test pull-cluster-api-provider-aws-test

@sedefsavas
Copy link
Contributor

/hold
until #3720 is merged.
All upcoming PRs need to be merged once v1beta2 API types are in.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 14, 2022
@luthermonson
Copy link
Contributor Author

/test pull-cluster-api-provider-aws-test

@sedefsavas
Copy link
Contributor

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 22, 2022
@Skarlso
Copy link
Contributor

Skarlso commented Sep 23, 2022

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 23, 2022
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 23, 2022
@luthermonson
Copy link
Contributor Author

the idp code was also patching the control plane object every reconcile loop. added additional logic in this commit 5330024 to get out sooner if there are no procedures or if nothing changed on the idp status.

@luthermonson
Copy link
Contributor Author

the apidiff failure is a false positive, the OidcIdentityProviderConfig is an internal struct and never used in a crd and i'd like to propose we ignore it

@Skarlso
Copy link
Contributor

Skarlso commented Sep 29, 2022

I concur.
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 29, 2022
if err != nil {
s.scope.Error(err, "failed creating eks identity provider plan")
return fmt.Errorf("creating eks identity provider plan: %w", err)
}

// nothing will be done, we can leave
if len(procedures) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

This change here introduces a change in behaviour. Which might be fine, I'm just thinking aloud on this. Previously, we constantly reconciled the status even if it was the same. Which makes no sense. Why update it if the status is the same? I think this should be okay. Though I really would like to hear @dlipovetsky's opinion. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ya i added this for exactly that reason... no point to update if everything is the same. i spent a lot of time in this code >.<

@lmasiero
Copy link

lmasiero commented Oct 4, 2022

/retest

@luthermonson
Copy link
Contributor Author

@lmasiero this wont pass the apidiff check. it will need to get merged with it failed, it's not actually changing any real APIs it's just an internal struct used to reconcile the oidc config

@richardcase
Copy link
Member

Yep we can ignore the apidiff failure.

/test ?

@k8s-ci-robot
Copy link
Contributor

@richardcase: The following commands are available to trigger required jobs:

  • /test pull-cluster-api-provider-aws-build
  • /test pull-cluster-api-provider-aws-test
  • /test pull-cluster-api-provider-aws-verify

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-provider-aws-apidiff-main
  • /test pull-cluster-api-provider-aws-e2e
  • /test pull-cluster-api-provider-aws-e2e-blocking
  • /test pull-cluster-api-provider-aws-e2e-clusterclass
  • /test pull-cluster-api-provider-aws-e2e-conformance
  • /test pull-cluster-api-provider-aws-e2e-conformance-with-ci-artifacts
  • /test pull-cluster-api-provider-aws-e2e-eks

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-provider-aws-apidiff-main
  • pull-cluster-api-provider-aws-build
  • pull-cluster-api-provider-aws-test
  • pull-cluster-api-provider-aws-verify

In response to this:

Yep we can ignore the apidiff failure.

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@richardcase
Copy link
Member

/test pull-cluster-api-provider-aws-e2e-eks

@richardcase
Copy link
Member

After review and e2e tests passing i think this is good to go. We will ignore the apidiff failure. So:

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 13, 2022
@richardcase
Copy link
Member

/override pull-cluster-api-provider-aws-apidiff-main

@k8s-ci-robot
Copy link
Contributor

@richardcase: Overrode contexts on behalf of richardcase: pull-cluster-api-provider-aws-apidiff-main

In response to this:

/override pull-cluster-api-provider-aws-apidiff-main

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot merged commit ad99a1d into kubernetes-sigs:main Oct 13, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.x milestone Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EKS Identity Provider Attach/Detach Loop
6 participants