Dvc: push: option to push to all remotes?

Created on 2 Apr 2020  路  9Comments  路  Source: iterative/dvc

To save time and avoid human error, a new option like dvc push --all|-A could be created to push to all remotes. Not sure it would make sense to also consider for fetch and pull.

I wish option --all-branches used letter -b instead -a so we could use lower case a here.

Somewhat related to #2095

awaiting response enhancement

All 9 comments

@jorgeorpinel Not sure what is the scenario for this. Could you elaborate?

If you have many remotes and want to push to all of them in a single command.

For pull/fetch it could be to get the data from any remote where it exists, in case one or another remote has incomplete an cache backup.

If you have many remotes and want to push to all of them in a single command.

I don't understand why anyone would do that though. Am I missing some good scenario?

For pull/fetch it could be to get the data from any remote where it exists, in case one or another remote has incomplete an cache backup.

We've discussed it in another ticket, it would require some cascading logic for remotes to be able to retrieve whatever it can from whichever remote is available.

why anyone would do that

I just wanted to recently when testing all kinds of GDrive URL types and formats (there's like 7 options haha). Not sure if there's an actual-use need for it but it's possible, say for a dataset registry repo that has a bunch of folders, each with it's own remote (for access permission purposes), but there's this one folder you want available in all remotes. It just increases the flexibility I think, but prob just a nice-to-have unless users actually request or imply the need for this. Up to you

@jorgeorpinel Good points, but that is quite a synthetic testing scenario :)

a bunch of folders, each with it's own remote

Sounds like a subrepo use case. They will simply have theirown default remote.

I would indeed wait for a user to ask for it, unless it is a blocker for you or significant improvement, of course.

No, I agree with you. Thanks

@efiop what do you think about renaming all-branches option -a -> -B since the other similar option (-T) stands for all tags? Or -b and -t (lower case), respectively. (Consistency)

@jorgeorpinel Not sure consistency there is worth so much trouble right now. Honestly, wouldn't bother right now with that.

Was this page helpful?
0 / 5 - 0 ratings