Skip to content

fix audit union loop variables in closures#110145

Merged
k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
sxllwx:fix/audit-union-var-closures
May 28, 2022
Merged

fix audit union loop variables in closures#110145
k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
sxllwx:fix/audit-union-var-closures

Conversation

@sxllwx

@sxllwx sxllwx commented May 20, 2022

Copy link
Copy Markdown
Member

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 requested review from lavalamp and sttts May 20, 2022 09:44
@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

sxllwx commented May 23, 2022

Copy link
Copy Markdown
Member Author

@sttts @lavalamp PTAL thx..

@lavalamp

Copy link
Copy Markdown
Contributor

/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
Copy Markdown
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

Details 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
Copy Markdown
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

sxllwx commented May 25, 2022

Copy link
Copy Markdown
Member Author

/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

pacoxu commented May 27, 2022

Copy link
Copy Markdown
Member

/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

sxllwx commented May 27, 2022

Copy link
Copy Markdown
Member Author

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

@sxllwx

sxllwx commented May 27, 2022

Copy link
Copy Markdown
Member Author

/hold

1 similar comment
@pacoxu

pacoxu commented May 27, 2022

Copy link
Copy Markdown
Member

/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

pacoxu commented May 27, 2022

Copy link
Copy Markdown
Member

/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

sxllwx commented May 27, 2022

Copy link
Copy Markdown
Member Author

/release-note-edit

apiserver: fix audit of loading more than one webhooks

thx~

@ialidzhikov

Copy link
Copy Markdown
Contributor

@pacoxu, can we unhold?

@sxllwx

sxllwx commented May 28, 2022

Copy link
Copy Markdown
Member Author

@pacoxu, can we unhold?

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

@sxllwx

sxllwx commented May 28, 2022

Copy link
Copy Markdown
Member Author

/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
Copy Markdown
Contributor

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

@sxllwx

sxllwx commented May 28, 2022

Copy link
Copy Markdown
Member Author

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

pacoxu commented May 28, 2022

Copy link
Copy Markdown
Member

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

@sxllwx

sxllwx commented May 29, 2022

Copy link
Copy Markdown
Member Author

@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.

6 participants