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

k8s-ci-robot behaves inconsistently with approved/needs-ok-to-test labels #12785

Closed
vllry opened this issue May 28, 2019 · 9 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. ¯\_(ツ)_/¯ ¯\\\_(ツ)_/¯

Comments

@vllry
Copy link

vllry commented May 28, 2019

What happened:
When the needs-ok-to-test label is present, k8s-ci-robot will run tests if a PR is approved, but will not allow users to manually run tests.

What you expected to happen:
Either tests should not yet run, or ok-to-test should be added automatically.

How to reproduce it (as minimally and precisely as possible):

  • Create a PR that has needs-ok-to-test label
  • Approve the PR
  • Try test/retest commands.

Please provide links to example occurrences, if any:
kubernetes/kubernetes#78385

@vllry vllry added the kind/bug Categorizes issue or PR as related to a bug. label May 28, 2019
@stevekuznetsov
Copy link
Contributor

Technically, adding /lgtm will allow tests to run once and only once. So, this is working as implemented, but definitely not obvious what is going on behind the scenes.

/cc @cjwagner @fejta @spiffxp @cblecker

@cblecker
Copy link
Member

Yeah, it's not the approve that's doing anything, it's the lgtm.

I wonder if we even need the "run only once" functionality at all.

@cjwagner
Copy link
Member

I wonder if we even need the "run only once" functionality at all.

I think it is nice since PR reviewers may not remember to include a /test all on non-member PRs after they have reviewed, especially if they mainly review member PRs. I don't think there is a case where a reviewer would use /lgtm, but not want to let the tests run so inferring /test all from /lgtm on a non-member PR seems like a convenient behavior that wouldn't cause problems.

That being said I don't think we have any need for this functionality and I certainly agree that it is non-obvious to users. If we do remove it we would want to also update number 4 here: https://github.com/kubernetes/test-infra/blob/master/prow/cmd/tide/maintainers.md#best-practices

Perhaps the best option would be to make Prow comment with an explanation in cases where /lgtm triggers tests? I'm a bit hesitant to generate more comment spam though.
/shrug

@k8s-ci-robot k8s-ci-robot added the ¯\_(ツ)_/¯ ¯\\\_(ツ)_/¯ label May 28, 2019
@vllry
Copy link
Author

vllry commented May 28, 2019

My 2 cents would be to auto-add ok-to-test on lgtm/approve, since lgtm/approve implies that the PR is not spam or malicious.

@cjwagner
Copy link
Member

My 2 cents would be to auto-add ok-to-test on lgtm/approve, since lgtm/approve implies that the PR is not spam or malicious.

That could be a nice option to have for some repos to opt into, but I don't think that we can do that globally due to security concerns.

The reason we have the distinction between lgtm/approved and ok-to-test is because ok-to-test is sticky to the PR when changes are made while lgtm is removed whenever the PR changes. If we made lgtm auto-add ok-to-test then someone could change their PR to include a bitcoin miner (or something even more malicious) after the PR is LGTMed and the presubmits would happily run it.
So we only use ok-to-test in cases where we have decided we trust the external contributor enough to not do that. Otherwise we just lgtm and the tests will only be run and rerun on the PR so long as the PR doesn't change from what was LGTMed.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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 Aug 26, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 26, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. ¯\_(ツ)_/¯ ¯\\\_(ツ)_/¯
Projects
None yet
Development

No branches or pull requests

6 participants