SSBC: `src batch remote` preview link returns 404 if batch change did not already exist
Created by: courier-new
In src/batch_remote.go
we create the batch spec but we forget to make sure the batch change exists first. CreateEmptyBatchChange
) fails if a batch change by that name already exists, so we either need to:
- Create a new mutation like
UpsertEmptyBatchChange
that doesn't fail if a batch change by that name already exists, or - Add a new parameter to
CreateEmptyBatchChange
likeallowUpsert
that changes the behavior of the mutation so that it doesn't fail.
We should then call that mutation from src/batch_remote.go
before we call CreateBatchSpecFromRaw
, so that the batch change exists to load from for the preview link.