This repository was archived by the owner on Feb 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Standalone push does not error on existing invoice #335
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Scenario:
- A Bindle server already contains an invoice named
foo/1.0.0 - Unaware of this, I create a new bindle named
foo/1.0.0and prepare it locally as a standalone bindle - I use
bindle pushor theStandaloneRead::pushmethod to push my bindle to the server
Expected behaviour: an error saying "that invoice already exists"
Actual behaviour: no error and my push is silently ignored
It seems that a standalone push checks if the invoice exists, and if it does, it attempts to upload any of the existing invoice's missing parcels from the standalone bindle. In this case, the invoice in the standalone bindle is entirely ignored.
The "fill in what's missing" behaviour is convenient when it's, say, retrying an interrupted operation. But the side effect of "silently do nothing" when someone reuses an ID is not.
Options:
- If the ID exists, compare the server and standalone invoices (somehow) and error if they are not the same, otherwise use existing behaviour
- Error by default if the invoice exists (without checking), but provide an option so the user can express "it's okay if the invoice exists because I'm confident it's the same"
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working