Skip to content

SSBC: src batch remote preview link returns 404 if batch change did not already exist #780

@courier-new

Description

@courier-new

In src/batch_remote.go we create the batch spec but we forget to make sure the batch change exists first. 🙃 It was previously possible to view a remote execution in isolation without a parent batch change, but this is no longer possible. However, with src-cli, it's possible to run a remote execution for a batch change that already exists or doesn't yet exist, whilst the mutation that the frontend UI uses to create the empty batch change (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 like allowUpsert 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.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions