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(prow/plugins/approve): approving with full config OWNERS controlled #29970

Merged

Conversation

wuhuizuo
Copy link
Contributor

@wuhuizuo wuhuizuo commented Jun 29, 2023

What

Fixed: #7690

How

  • Make it fixed without massive refactoring, also do not change the behavior and mostly approve notifies.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 29, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @wuhuizuo. 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 area/prow Issues or PRs related to prow area/prow/plugins Issues or PRs related to prow's plugins for the hook component sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Jun 29, 2023
@wuhuizuo wuhuizuo changed the title Feature/fix approve plugin 2 fix(prow/plugins/approve): approving with full config OWNERS controlled Jun 29, 2023
@matthyx
Copy link
Contributor

matthyx commented Jun 29, 2023

/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 Jun 29, 2023
Copy link
Contributor

@matthyx matthyx left a comment

Choose a reason for hiding this comment

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

@wuhuizuo clever... I see what you mean by not refactoring
I did try a refactoring with generics for this plugin #12440 maybe we could revisit it together?

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 29, 2023
@ti-chi-bot ti-chi-bot bot deleted the feature/fix-approve-plugin-2 branch June 29, 2023 05:46
@wuhuizuo wuhuizuo restored the feature/fix-approve-plugin-2 branch June 29, 2023 05:46
wuhuizuo added a commit to PingCAP-QE/ee-ops that referenced this pull request Jun 29, 2023
Changes:
- kubernetes/test-infra#29762
- kubernetes/test-infra#29970
- other changes from upstream.

Signed-off-by: wuhuizuo <wuhuizuo@126.com>
ti-chi-bot bot pushed a commit to PingCAP-QE/ee-ops that referenced this pull request Jun 29, 2023
…#629)

Changes:
- kubernetes/test-infra#29762
- kubernetes/test-infra#29970
- other changes from upstream.

Signed-off-by: wuhuizuo <wuhuizuo@126.com>
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 15, 2023
@wuhuizuo wuhuizuo force-pushed the feature/fix-approve-plugin-2 branch from 0f00a19 to 6b35632 Compare July 17, 2023 04:29
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 17, 2023
`NoParentOwners` should only worked when none people got.

For an example:
```
# file sub/OWNERS
options:
  no_parent_owners: true
filters:
  "\\.yaml":
    approvers: [alice]
```

But only the file `func_test.go` changed in the PR, it should use the parent OWNERS file.

Signed-off-by: wuhuizuo <wuhuizuo@126.com>
@wuhuizuo
Copy link
Contributor Author

May the integration test job failed by flaky tests.

@wuhuizuo
Copy link
Contributor Author

/retest

@wuhuizuo
Copy link
Contributor Author

wuhuizuo commented Jul 20, 2023

@wuhuizuo clever... I see what you mean by not refactoring I did try a refactoring with generics for this plugin #12440 maybe we could revisit it together?

@matthyx My pleasure! Looking forward to hearing your specific thoughts.

Also I added a new commit to solve the issue when there is no default filter and the inherit from parent is disabled, PTAL:
dcd9b36

@ti-chi-bot ti-chi-bot bot deleted the feature/fix-approve-plugin-2 branch August 8, 2023 04:01
@wuhuizuo
Copy link
Contributor Author

ping @matthyx @cjwagner 😄 could you review it?

@wuhuizuo wuhuizuo restored the feature/fix-approve-plugin-2 branch September 11, 2023 09:02
maxCovered = len(filesCanApprove)
bestPerson = approver
}
}

// todo: make it better.
Copy link
Contributor

Choose a reason for hiding this comment

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

😅

Copy link
Contributor

@matthyx matthyx left a comment

Choose a reason for hiding this comment

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

/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 28, 2023
@matthyx
Copy link
Contributor

matthyx commented Sep 28, 2023

/assign @droslean

@droslean
Copy link
Member

/label tide/merge-method-squash
/approve

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Sep 29, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: droslean, matthyx, wuhuizuo

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 Sep 29, 2023
@k8s-ci-robot k8s-ci-robot merged commit 76c82f1 into kubernetes:master Sep 29, 2023
@wuhuizuo wuhuizuo deleted the feature/fix-approve-plugin-2 branch October 8, 2023 19:07
VannTen added a commit to VannTen/community-1 that referenced this pull request May 30, 2024
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/prow/plugins Issues or PRs related to prow's plugins for the hook component area/prow Issues or PRs related to prow cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

approve plugin makes assumptions about OWNERS file implementation
4 participants