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

Pass DeleteOptions down to the Reactor #102945

Merged
merged 2 commits into from Nov 2, 2021
Merged

Conversation

chenchun
Copy link
Contributor

@chenchun chenchun commented Jun 17, 2021

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #102798

Special notes for your reviewer:

Does this PR introduce a user-facing change?

client-go: pass `DeleteOptions` down to the fake client `Reactor`

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


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. labels Jun 17, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @chenchun. Thanks for your PR.

I'm waiting for a kubernetes 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 needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/code-generation 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 Jun 17, 2021
@fedebongio
Copy link
Contributor

/assign @caesarxuchao
/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 Jun 17, 2021
@enj enj added this to Needs Triage in SIG Auth Old Jul 6, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 15, 2021
@enj
Copy link
Member

enj commented Sep 27, 2021

/assign

@enj enj moved this from Needs Triage to In Review in SIG Auth Old Sep 27, 2021
@enj
Copy link
Member

enj commented Sep 27, 2021

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 27, 2021
Comment on lines 415 to 416
$if .namespaced$Invokes($.NewDeleteAction|raw$($.type|allLowercasePlural$Resource, c.ns, name, &opts), &$.type|raw${})
$else$Invokes($.NewRootDeleteAction|raw$($.type|allLowercasePlural$Resource, name, &opts), &$.type|raw${})$end$
Copy link
Member

Choose a reason for hiding this comment

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

This needs to pass in a nil when opts is the zero value of the struct.

staging/src/k8s.io/client-go/testing/actions.go Outdated Show resolved Hide resolved
SIG Auth Old automation moved this from In Review to Changes Requested Sep 27, 2021
@enj
Copy link
Member

enj commented Sep 27, 2021

I expect a lot of unit tests to fail because of #102945 (comment)

/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 27, 2021
@k8s-ci-robot k8s-ci-robot added the sig/apps Categorizes an issue or PR as relevant to SIG Apps. label Oct 12, 2021
@chenchun
Copy link
Contributor Author

@enj Thanks for review. Previously lots of tests failed because I added a DeleteOptions param to NewDeleteAction and forgot to change all places to add a nil input param. I updated PR to add a new func NewDeleteActionWithOptions instead to fix the falling tests.

Copy link
Member

@enj enj left a comment

Choose a reason for hiding this comment

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

Minor stuff.

pkg/controller/serviceaccount/tokens_controller_test.go Outdated Show resolved Hide resolved
staging/src/k8s.io/client-go/testing/actions.go Outdated Show resolved Hide resolved
staging/src/k8s.io/client-go/testing/actions.go Outdated Show resolved Hide resolved
staging/src/k8s.io/client-go/testing/actions.go Outdated Show resolved Hide resolved
staging/src/k8s.io/client-go/testing/actions.go Outdated Show resolved Hide resolved
staging/src/k8s.io/client-go/testing/actions.go Outdated Show resolved Hide resolved
Copy link
Member

@enj enj left a comment

Choose a reason for hiding this comment

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

Just some extraneous whitespace.

pkg/controller/bootstrap/tokencleaner_test.go Outdated Show resolved Hide resolved
pkg/controller/serviceaccount/tokens_controller_test.go Outdated Show resolved Hide resolved
@enj
Copy link
Member

enj commented Oct 28, 2021

This LGTM once the whitespace is sorted. Assigning to Jordan for review/approval since this touches generated code all over the codebase.

/assign @liggitt

@chenchun
Copy link
Contributor Author

/retest-required

Copy link
Member

@liggitt liggitt left a comment

Choose a reason for hiding this comment

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

one nit on the uid used in the test, lgtm otherwise

pkg/controller/bootstrap/common_test.go Outdated Show resolved Hide resolved
chenchun and others added 2 commits November 2, 2021 10:04
Co-authored-by: Mo Khan <theenjeru@gmail.com>
@enj
Copy link
Member

enj commented Nov 2, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 2, 2021
@enj
Copy link
Member

enj commented Nov 2, 2021

/milestone v1.23
/priority important-longterm

@k8s-ci-robot k8s-ci-robot added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Nov 2, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Nov 2, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Nov 2, 2021
@liggitt
Copy link
Member

liggitt commented Nov 2, 2021

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chenchun, liggitt

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 Nov 2, 2021
@k8s-ci-robot k8s-ci-robot merged commit 9be6780 into kubernetes:master Nov 2, 2021
SIG Auth Old automation moved this from Changes Requested to Closed / Done Nov 2, 2021
@chenchun chenchun deleted the fake branch November 3, 2021 01:25
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/code-generation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. 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/apps Categorizes an issue or PR as relevant to SIG Apps. sig/auth Categorizes an issue or PR as relevant to SIG Auth. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Archived in project
SIG Auth Old
Closed / Done
Development

Successfully merging this pull request may close these issues.

Fake client should support mimic graceful pod deletion
7 participants