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

phased: Enable run_before_merge for phase 2 jobs #3184

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

oshoval
Copy link
Contributor

@oshoval oshoval commented Jan 17, 2024

Seems tide has a bug, it doesnt run the phase 2 for batches.
A simple wa until it is fixed is to use run_before_merge, which force a batch to run it.

Real fix is to consider manually triggered jobs as well on this line at presubmitsForBatch
shouldRun, err := ps.ShouldRun(baseBranch, c.changedFiles.batchChanges(prs), ps.RunBeforeMerge, false)
The required logic exists on kubernetes/test-infra#30191

presubmitsByPull should be fixed as well iiuc.

{"base-branch":"main","base-sha":"b171859a412395ef5c4974a037e45aed13bd0dfc","component":"tide","context":"pull-kubevirt-e2e-k8s-1.27-ipv6-sig-network","controller":"sync","file":"k8s.io/test-infra/prow/tide/tide.go:1631","func":"k8s.io/test-infra/prow/tide.(*syncController).presubmitsForBatch","level":"debug","msg":"Presubmit excluded by ps.ShouldRun","org":"kubevirt","repo":"kubevirt","severity":"debug","time":"2024-01-17T12:43:59Z"}

Seems tide has a bug, it doesnt run the phase 2 for batches.
A simple wa until it is fixed is to use run_before_merge,
which force a batch to run it.

Signed-off-by: Or Shoval <oshoval@redhat.com>
@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Jan 17, 2024
@oshoval
Copy link
Contributor Author

oshoval commented Jan 17, 2024

Nice find @brianmcarey
wdyt?

Copy link
Member

@brianmcarey brianmcarey left a comment

Choose a reason for hiding this comment

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

This looks like what we were looking for.

        // RunBeforeMerge indicates that a job should always run by Tide as long as
        // Brancher matches.
        // This is used when a prowjob is so expensive that it's not ideal to run on
        // every single push from all PRs.
        RunBeforeMerge bool `json:"run_before_merge,omitempty"`

https://github.com/kubernetes/test-infra/blob/c758e68cdeb67314148a6be992957d092d63fcaa/prow/config/jobs.go#L203C1-L205C57

The phased plugin will still be useful I think though as it will not have to wait for "phase 1" jobs to complete before triggering the "phase 2" jobs.

/approve

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 17, 2024
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brianmcarey

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 17, 2024
@kubevirt-bot kubevirt-bot merged commit d052401 into kubevirt:main Jan 17, 2024
5 checks passed
@kubevirt-bot
Copy link
Contributor

@oshoval: Updated the job-config configmap in namespace kubevirt-prow at cluster default using the following files:

  • key kubevirt-presubmits.yaml using file github/ci/prow-deploy/files/jobs/kubevirt/kubevirt/kubevirt-presubmits.yaml

In response to this:

Seems tide has a bug, it doesnt run the phase 2 for batches.
A simple wa until it is fixed is to use run_before_merge, which force a batch to run it.

Real fix is to consider manually triggered jobs as well on this line at presubmitsForBatch
shouldRun, err := ps.ShouldRun(baseBranch, c.changedFiles.batchChanges(prs), ps.RunBeforeMerge, false)
The required logic exists on kubernetes/test-infra#30191

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.

@oshoval
Copy link
Contributor Author

oshoval commented Jan 21, 2024

Trying here to fix tide, WIP
kubernetes/test-infra#31687

once it is merged (hopefully), we can remove the WA
btw iiuc, without the WA we also suffer from kubernetes/test-infra#31050
means means tide doesn't even wait / trigger according needs phase 2 jobs.

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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants