Allow customers to export their campaigns before upgrading to 3.19
Created by: mrnugget
Since Campaigns is still a beta-feature we decided that the release of the new workflow in 3.19 won't be backwards compatible.
Campaigns created with Sourcegraph <= 3.18 can technically still be read (viewed in the UI) after upgrading to 3.19, but not updated/edited.
From a technical perspective, it would be the best if we are able to delete all existing campaigns in a migration with 3.19 and start with a clean slate. Then we wouldn't have to care about missing/NULL database fields for all eternity and could reduce possible support requests, because we wouldn't run into weird bugs that are caused by incompatibilities between "old" and "new" campaigns.
So, what we could do (and @sqs already said that's an option) is to create a script that customers can run to export their campaigns.
The script could either be a bash script that uses curl to talk to our GraphQL API and list all campaigns and their changesets, or it could use src-cli
, or... something else.
What should it export to? Multiple options:
- A CSV file that contains the changesets of a campaign, their external status, external ID, URL, repository name, check status, review status.
- A markdown file that contains a campaign's name and description and a list of changesets with URL, external ID, repository, states etc.
- A new campaign-spec.yml that would
importChangesets
the list of changesets in the campaigns so that users could migrate to the new campaigns.