-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Proposal for Prow mechanism for force-pushing a feature branch #8058
Comments
There needs to be a way to differentiate a branch as a feature branch. Perhaps the branch whitelist for each repo in the prow config file would designate the locked down branches that cannot be rebased, such as |
/cc @lavalamp for his feature Branch thoughts |
We decided not to do this for our feature branch. What is wrong with just merging like git was intended? |
(If you did want to do this I'd suggest making the directive be in the body of the PR, not an imperative command someone gives at the end. I.e., it's about the type of the PR: it's |
@lavalamp the Docs team has non-release-specific improvements always going into the In a similar way, we need to have feature-specific work for 1.11 in the "feature branch" This is similar to other feature-branch work that is built on top of a well-known base. In the feature-branch workflow, all feature commits should go on top of the base, and the base needs to be periodically updated. Nobody cares about the chronology of commits in the feature branch until the feature is merged, at which time all feature-related commits will be at the tip. Merging into feature branches muddies the water around chronology and makes it very difficult to refactor commits in the feature branch (as should be pretty easy to do, since the feature branch is not yet definitive). I am happy to jump on a call with you about this, as we did with @fejta earlier this week. The problem with putting the imperative in the PR the way you propose is that you make the PR between the rebased branch and what you rebased it against, rather than the actual feature branch. If I made a branch called |
Also I am having a hard time understanding "like git was intended" because we are not proposing using commands that are not part of Git. Can you clarify? |
I think the question was -- why not operate like this:
Where
Where the |
It doesn't work for documentation workflows where two different branches are moving forward at one time, and branch B needs to have all the work from branch A underneath all of branch B's work at all times. Kubernetes docs are continuously improved and published, in a separate stream from not-yet-published features. The stream of not-yet-published features also needs the continuous improvements to go underneath it. In sort, docs work differently from code, unless you want us to hold all continuous improvement and publish it simultaneous with a new Kubernetes release. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
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. |
Yesterday, @chenopis and I met with @fejta to discuss the workflows used by sig-docs, and started to discuss how Prow might be used to accomplish the rebase/force-push workflow to keep the base of a feature branch up to date, while obeying the CLA requirements and other testing requirements. Here is a potential workflow that could be enabled by Prow. I'm putting this here for discussion. @fejta said that other teams also really need this workflow.
The person maintaining the feature branch rebases it on its parent (perhaps
master
) locally and pushes the rebased branch to their fork.The person then creates a pull request comparing the rebased branch, not to the current state of the feature branch, but on the thing it was based on. For instance, a
release-1.11
branch that was based onmaster
might be namedrebase-release-1.11
on the person's fork, and the PR is raised betweenrebase-release-1.11
andmaster
. This exposes the commits that differ from its base and allows people to review the state of the commits and the resulting branch after the rebase / conflict resolution.An approver issues a prow command like /force-push , which directs Prow to force-push the feature branch to reflect the state of the branch in the PR. Probably there should be some protection against Prow being able to force-push into
master
itself, or maybe a list of forbidden branches.When the PR is approved (maybe an extra approval bit is needed beyond the lgtm and approve ones now, maybe force-push-approve), Prow temporarily unprotects the branch, does the force-push, adds an extra commit to document that the force-push happened and what PR it was requested from, then reprotects the branch.
The PR itself is closed since it was only a vehicle for review and for controlling Prow.
cc/ @kubernetes/sig-docs-maintainers for visibility.
The text was updated successfully, but these errors were encountered: