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

Prow runs postsubmit tests as presubmit sometimes #14125

Closed
Ark-kun opened this issue Aug 29, 2019 · 8 comments
Closed

Prow runs postsubmit tests as presubmit sometimes #14125

Ark-kun opened this issue Aug 29, 2019 · 8 comments
Labels
area/prow/hook Issues or PRs related to prow's hook component kind/support Categorizes issue or PR as a support question.

Comments

@Ark-kun
Copy link
Contributor

Ark-kun commented Aug 29, 2019

We have presubmit and postsubmit tests (https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubeflow/kubeflow-postsubmits.yaml)

Usually presubmit tests run for PR branch commits and postsubmit tests run for master merges.

Sometimes though, the postsubmit test is executed for the PR and blocks attempts to merge the PR since the postsubmit test is only supposed to be run for master commits.
kubeflow/pipelines#1984

kubeflow-pipeline-postsubmit — Job failed.
tide Pending — Not mergeable. Job kubeflow-pipeline-postsubmit has not succeeded.

https://prow.k8s.io/view/gcs/kubernetes-jenkins/logs/kubeflow-pipeline-postsubmit/1166849049677008896

I expect postsubmit tests to only run post-submit.

How can we recover from this issue?

@Ark-kun Ark-kun added the kind/bug Categorizes issue or PR as related to a bug. label Aug 29, 2019
@stevekuznetsov
Copy link
Contributor

Post-submits run when code is merged to the repo. You are making PRs from branches on the repo itself, not from a fork, and you have not configured the postsubmit to run on a particular branch or subsets of branches, so this is all working as expected. I would suggest, in the following order:

  • don't make branches on the repo itself to make PRs
  • use branch selectors on your presubmits and postsubmits

@stevekuznetsov stevekuznetsov added area/prow/hook Issues or PRs related to prow's hook component kind/support Categorizes issue or PR as a support question. and removed kind/bug Categorizes issue or PR as related to a bug. labels Aug 29, 2019
@stevekuznetsov
Copy link
Contributor

/cc @cjwagner

@Ark-kun
Copy link
Contributor Author

Ark-kun commented Aug 29, 2019

You are making PRs from branches on the repo itself, not from a fork

Oh, I see. Thanks for the explanation. I usually use forks, but just this time I used GitHub's editor.

TBH, I think this wasn't an issue before and I was able to create mergeable PRs from the main repo branches. But I cannot find any proof right now. So I'm closing the issue.

I would suggest, in the following order:

  • don't make branches on the repo itself to make PRs
  • use branch selectors on your presubmits and postsubmits

Thanks for the suggestions.

@Ark-kun Ark-kun closed this as completed Aug 29, 2019
@Ark-kun
Copy link
Contributor Author

Ark-kun commented Aug 29, 2019

I've submitted the PR from a fork and yet the postsumbit test still runs: kubeflow/pipelines#1990

@Ark-kun Ark-kun reopened this Aug 29, 2019
@stevekuznetsov
Copy link
Contributor

At some point you pushed that commit to the kubeflow/pipelines repo:

 jsonPayload: {
  component: "hook"   
  event-GUID: "4c00fd9e-ca89-11e9-9bce-b48d050a623e"   
  event-type: "push"   
  file: "prow/hook/events.go:218"   
  func: "k8s.io/test-infra/prow/hook.(*Server).handlePushEvent"   
  head: "abfc57232635749501295d23be5765de237381fe"   
  level: "info"   
  msg: "Push event."   
  org: "kubeflow"   
  ref: "refs/heads/avolkov/Testing---Fixed-the-comparison-bug-in-presubmit-test-script"   
  repo: "pipelines"   
 }

/close

@k8s-ci-robot
Copy link
Contributor

@stevekuznetsov: Closing this issue.

In response to this:

At some point you pushed that commit to the kubeflow/pipelines repo:

jsonPayload: {
 component: "hook"   
 event-GUID: "4c00fd9e-ca89-11e9-9bce-b48d050a623e"   
 event-type: "push"   
 file: "prow/hook/events.go:218"   
 func: "k8s.io/test-infra/prow/hook.(*Server).handlePushEvent"   
 head: "abfc57232635749501295d23be5765de237381fe"   
 level: "info"   
 msg: "Push event."   
 org: "kubeflow"   
 ref: "refs/heads/avolkov/Testing---Fixed-the-comparison-bug-in-presubmit-test-script"   
 repo: "pipelines"   
}

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

@Ark-kun
Copy link
Contributor Author

Ark-kun commented Aug 29, 2019

At some point you pushed that commit to the kubeflow/pipelines repo:

Is that information a part of the commit or does Prow or GitHub remember that?

@Ark-kun
Copy link
Contributor Author

Ark-kun commented Aug 29, 2019

ref: "refs/heads/avolkov/Testing---Fixed-the-comparison-bug-in-presubmit-test-script"

It's interesting since that branch no longer exists in that repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prow/hook Issues or PRs related to prow's hook component kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

3 participants