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 audit union loop variables in closures #110145

Merged
merged 1 commit into from May 28, 2022

Conversation

sxllwx
Copy link
Member

@sxllwx sxllwx commented May 20, 2022

What type of PR is this?

What this PR does / why we need it:

When we have at least two audit backends, only one will be activated, and that backend will be started twice.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

apiserver: fix audit of loading more than one webhooks

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels May 20, 2022
@k8s-ci-robot k8s-ci-robot added area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 20, 2022
@sxllwx sxllwx force-pushed the fix/audit-union-var-closures branch from 5dac79f to 85b027e Compare May 20, 2022 09:51
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 20, 2022
@sxllwx
Copy link
Member Author

sxllwx commented May 23, 2022

@sttts @lavalamp PTAL thx..

@lavalamp
Copy link
Member

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lavalamp, sxllwx

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 May 23, 2022
@leilajal
Copy link
Contributor

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 24, 2022
@sxllwx
Copy link
Member Author

sxllwx commented May 25, 2022

/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels May 25, 2022
@pacoxu
Copy link
Member

pacoxu commented May 27, 2022

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 27, 2022
@sxllwx
Copy link
Member Author

sxllwx commented May 27, 2022

@pacoxu Maybe we need a release note. Without this patch, if multiple AuditWebhooks are configured, only one will actually work.

@sxllwx
Copy link
Member Author

sxllwx commented May 27, 2022

/hold

1 similar comment
@pacoxu
Copy link
Member

pacoxu commented May 27, 2022

/hold

@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 May 27, 2022
@pacoxu
Copy link
Member

pacoxu commented May 27, 2022

/release-note-edit

apiserver: fix audit of loading more than one webhooks

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels May 27, 2022
@sxllwx
Copy link
Member Author

sxllwx commented May 27, 2022

/release-note-edit

apiserver: fix audit of loading more than one webhooks

thx~

@ialidzhikov
Copy link
Contributor

@pacoxu, can we unhold?

@sxllwx
Copy link
Member Author

sxllwx commented May 28, 2022

@pacoxu, can we unhold?

release note has been added, I think it can be unhold.

@sxllwx
Copy link
Member Author

sxllwx commented May 28, 2022

/unhold

@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 May 28, 2022
@ialidzhikov
Copy link
Contributor

@sxllwx , can you also prepare backports to all affected release branches? Thanks in advance!

@sxllwx
Copy link
Member Author

sxllwx commented May 28, 2022

can you also prepare backports to all affected release branches? Thanks in advance!

Sure, but I don't know which release branch I should port to. If you have a list here, could you please provide it to me?

@pacoxu
Copy link
Member

pacoxu commented May 28, 2022

/retest
Currently, release 1.21-1.24 are under maintainance. If this bug is in those versions, we should backport to those versions.

@sxllwx
Copy link
Member Author

sxllwx commented May 29, 2022

@pacoxu @ialidzhikov This problem does exist in 1.21~1.24. I have backported this change to these branches. Please review them both. thx~

k8s-ci-robot added a commit that referenced this pull request Jun 9, 2022
…45-upstream-release-1.23

Automated cherry pick of #110145: fix audit union loop variables in closures
k8s-ci-robot added a commit that referenced this pull request Jun 9, 2022
…45-upstream-release-1.22

Automated cherry pick of #110145: fix audit union loop variables in closures
k8s-ci-robot added a commit that referenced this pull request Jun 9, 2022
…45-upstream-release-1.24

Automated cherry pick of #110145: fix audit union loop variables in closures
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. area/apiserver 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 Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants