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

Allow branches to be excluded in tide queries #7456

Merged

Conversation

stevekuznetsov
Copy link
Contributor

In order to support code freeze on a branch, the queries used to gather
pull requests for the tide pool need too allow negative base ref
searches. The status posted by tide also expose this behavior on PRs
against those branches that are otherwise good to merge.

Signed-off-by: Steve Kuznetsov skuznets@redhat.com

Fixes #7450
/area prow
/kind feature
/cc @Kargakis @fejta
/assign @cjwagner @BenTheElder

@k8s-ci-robot k8s-ci-robot added the area/prow Issues or PRs related to prow label Mar 28, 2018
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 28, 2018
@stevekuznetsov stevekuznetsov force-pushed the skuznets/tide-branches branch from 51a1d9b to f4ced77 Compare March 28, 2018 17:25
desc = fmt.Sprintf(" Merging to branch %s is forbidden.", pr.BaseRef.Name)
}
}
diff = 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this really one more diff vs a single diff?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this return value is consumed by expectedStatus(). Can we document the meaning of this return value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I branched this out so we only consider it when other diffs don't apply, so no in this case there are no other diffs and it is just 1. This means that if there's a query against which everything passes except for the branch issue, it will be prioritized. Unclear if that is the right direction /cc @cjwagner

Copy link
Member

Choose a reason for hiding this comment

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

We should check that the branch is acceptable first instead of last. If it is unacceptable we should prioritize that message so that users don't try to meet the other merge requirements only to discover that PRs can't merge to that branch at all.

Copy link
Contributor

Choose a reason for hiding this comment

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

Any appetite for documenting the meaning of diff count?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You know me, always ravenous for documentation

🍔 🍟 🍺

@cjwagner
Copy link
Member

deck will also need to be updated to expose the new merge requirements (maybe a separate PR).

desc = fmt.Sprintf(" Merging to branch %s is forbidden.", pr.BaseRef.Name)
}
}
diff = 1
Copy link
Member

Choose a reason for hiding this comment

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

We want to increase diff even if we don't end up showing a message about that requirement in the status description. See this review: #7454 (review)

@stevekuznetsov
Copy link
Contributor Author

I'll add docs and update the diff-count mechanism after we merge #7454 and I rebase

@fejta
Copy link
Contributor

fejta commented Mar 30, 2018

LGTM but Michalis and Cole are doing the bulk of the heavy lifting here.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 1, 2018
@stevekuznetsov stevekuznetsov force-pushed the skuznets/tide-branches branch from f4ced77 to cc84ed3 Compare April 2, 2018 15:48
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 2, 2018
In order to support code freeze on a branch, the queries used to gather
pull requests for the tide pool need too allow negative base ref
searches. The status posted by `tide` also expose this behavior on PRs
against those branches that are otherwise good to merge.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
@stevekuznetsov stevekuznetsov force-pushed the skuznets/tide-branches branch from cc84ed3 to e9343e1 Compare April 2, 2018 15:51
@stevekuznetsov
Copy link
Contributor Author

@cjwagner @Kargakis updated, will work on deck changes now in a separate PR.

Copy link
Member

@cjwagner cjwagner 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 Apr 2, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cjwagner, stevekuznetsov

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 merged commit 84f836d into kubernetes:master Apr 2, 2018
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 Issues or PRs related to prow 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants