a8n: Updating partially published Campaigns is not supported
Created by: mrnugget
Right now we don't support updating a Campaign's changesets when they've only been partially published. We have an explicit check in the code that makes sure to only update changesets if the Campaign has been published.
But that means that we don't support the following scenario:
- Create Campaign with 10 changesets in draft mode
- Publish 2 of 10 changesets, creating them on code hosts
- Update Campaign to change name, description or arguments (
scopeQuery
,matchTemplate
, ...) - 2 already-published changesets are updated/closed on code hosts.
Supporting this is not trivial, since we'd effectively need to detect whether we're in this subset-published mode and depending on that, do a different update than we'd do otherwise.
Option A
In the normal update path (all or no changesets are published), we create "missing changesets" on codehosts that haven't been created before.
But in this new subset-update path (where only subset of changesets is published), we haven't created ChangesetJobs
for all repositories yet, so we shouldn't create those now.
Instead, we should only update the Changesets that have already been published, but only if the updated Campaign would create them again.
If the updated Campaign would not create them again, we'd need to close them.
Option B
Another possibility: when you update a Campaign, all already-published changesets are closed by default and only recreated/updated when you re-publish them individually or publish the whole Campaign.