private-mirrors icon indicating copy to clipboard operation
private-mirrors copied to clipboard

Simplify/rethink branch->mirror relationship

Open ahpook opened this issue 1 year ago • 6 comments

Is your feature request related to a problem?

We've gotten feedback that the relationship between mirrors and branches is both confusing and counter to user expectations. We may need to adapt the current implementation to make this easier to understand and work with.

Describe the solution you'd like

The current state can be described as:

A public fork has N [ fork's topic branch -> main on private mirror ] relationships that ICF manages. The private mirrors may have work in flight in their own branches but when that work is merged to main, the sync to their topic branch on the public fork ( middle column in the diagram ) happens - and that topic branch becomes the basis for a PR upstream.

But this results in a proliferation of mirrors and a mix of branches on the fork that might map to upstream, might map to work directly on the fork, or might be part of a ICF-managed mirror. Additionally, at least one user says they expected a mapping of [ fork topic branch -> mirror topic branch ] and was surprised at the current implementation.

So this at least requires better explanation if not some additional work to simplify this mapping.

Image

Describe alternatives you've considered

No response

Additional context

No response

ahpook avatar May 09 '24 19:05 ahpook

This has come up a lot for people who want to maintain long-running private mirrors that are effectively their internal fork of an upstream project. One typical use-case is that there's an upstream project which has some additional "secret sauce" added locally - code which will never be contributed upstream - but the internal team that owns the fork needs a way to continue to update their fork to keep current with upstream and continually rebase their local modifications. Currently this is a painful process; PMA doesn't directly address it because we expect that private mirror branches are ephemeral and will be closed out as soon as the contribution is merged upstream.

ahpook avatar Aug 29 '24 06:08 ahpook

Given the interest here, I wanted to share out a potential alternative branch-based contribution model that I drew up. It makes use of "magic words" in this example being "sync_" but would greatly help with user experience of the contribution process through private-mirrors.

Screenshot 2024-06-06 at 2 26 39 PM

riley-kohler avatar Aug 29 '24 15:08 riley-kohler

I don't mind sync_ as a magic branch prefix necessarily. It's more clear and shorter than contrib_ which was something I was thinking about.

wrslatz avatar Aug 29 '24 16:08 wrslatz

Would a user create a branch on the public fork and then instruct Private Mirrors to sync that through the UI? So branch name would be an additional input in the process, maybe with a default to the default branch?

wrslatz avatar Aug 29 '24 16:08 wrslatz

In my mind branch name would be the only input to the process (through the UI) and private-mirrors would create all of the necessary branches for you.

riley-kohler avatar Aug 29 '24 17:08 riley-kohler

In my mind branch name would be the only input to the process (through the UI) and private-mirrors would create all of the necessary branches for you.

If this could support the branch already existing on the public fork, that would be best. This would help in cases where someone wants to sync and work on changes from upstream that aren't in the default branch.

wrslatz avatar Aug 29 '24 20:08 wrslatz