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

Workspace push #838

Closed
lrewega opened this issue Jan 7, 2022 · 1 comment
Closed

Workspace push #838

lrewega opened this issue Jan 7, 2022 · 1 comment
Labels
Feature New feature or request

Comments

@lrewega
Copy link
Contributor

lrewega commented Jan 7, 2022

Problem

From the docs:

When you are ready to push updates you've made in a local workspace, you'll need to push each module independently, starting with the upstream modules first (buf.build/acme/paymentapis in this case). Once the upstream module's changes are published, you can run the buf mod update command in the downstream module to fetch the latest version, and continue to push each of your modules until all of your local changes are published to the BSR.

It's not difficult to imagine this becoming tedious with many modules, and automating it involves tracking the dependency graph outside of buf, which is a poor user experience and prone to error.

Proposal

Just as buf lint and buf build support operating on a workspace, it would be ideal to be able to buf mod update && buf push recursively for the workspace. Without an atomic way to perform multiple commits, this is still fragile. We would have to be pretty careful here.

Implementation ideas

One option might be to "stage" all of the commits locally and then perform a batch of commits atomically. For comparison, git push offers a feature to do this:

--[no-]atomic
  Use an atomic transaction on the remote side if available. Either all refs are updated, or on error, no refs
  are updated. If the server does not support atomic pushes the push will fail.

e.g. git push --atomic $REMOTE HEAD:some/ref HEAD~1:some/other/ref ...

Perhaps we could offer a batch commit service which does something similar.

@doriable
Copy link
Member

Now that we have workspace push in for v2 workspaces and modules, going to close this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants