Finish removal of draft campaigns
Created by: mrnugget
After https://github.com/sourcegraph/sourcegraph/pull/11095 this is part 2 of 2 to fix https://github.com/sourcegraph/sourcegraph/issues/10953.
This PR does some cleanup after #11095 and also:
- renames
retryCampaign
toretryCampaignChangesets
- adds
publishCampaignChangesets
mutation
I'm a bit unsure about publishCampaignChangesets
. In its current implementation it does not reset failed changeset jobs — which is contrary to what publishChangeset
does. What it does is to create all the remaining ChangesetJobs. If a ChangesetJob for a patch already exists, we simply skip it.
I was unsure because it would make sense to copy the behavior of publishChangeset
and reset failed jobs. But we also have retryCAmpaignChangesets
to retry failed ones.
And with the current implementation it allows the following workflow:
- publish 2/5 changesets individually with
publishChangeset
- then publish the rest with
publishCampaignChangesets
without interferring with the first 2.
What do others think?