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?
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #11286 into master will increase coverage by
0.01%
. The diff coverage is68.96%
.@@ Coverage Diff @@ ## master #11286 +/- ## ========================================== + Coverage 46.54% 46.56% +0.01% ========================================== Files 1380 1380 Lines 77675 77734 +59 Branches 6606 6667 +61 ========================================== + Hits 36154 36197 +43 - Misses 38070 38079 +9 - Partials 3451 3458 +7
Flag Coverage Δ #go 50.68% <71.42%> (+0.02%)
#storybook 6.92% <0.00%> (ø)
#typescript 35.80% <0.00%> (ø)
#unit 46.41% <68.96%> (+0.02%)
Impacted Files Coverage Δ cmd/frontend/graphqlbackend/campaigns.go 0.00% <0.00%> (ø)
enterprise/internal/campaigns/store.go 85.44% <ø> (+0.19%)
...src/enterprise/campaigns/detail/CampaignStatus.tsx 81.08% <0.00%> (ø)
web/src/enterprise/campaigns/detail/backend.ts 11.11% <0.00%> (ø)
...terprise/internal/campaigns/resolvers/campaigns.go 69.69% <60.00%> (-0.52%)
enterprise/internal/campaigns/service.go 68.25% <75.92%> (+0.67%)
...nterprise/internal/campaigns/resolvers/resolver.go 63.37% <76.47%> (+0.37%)
Created by: ryanslade
I'm a bit unsure about
publishCampaignChangesets
. In its current implementation it does not reset failed changeset jobs — which is contrary to whatpublishChangeset
does. What it does is to create all the remaining ChangesetJobs. If a ChangesetJob for a patch already exists, we simply skip it.Maybe make the naming a bit more explicit? Something like
publishRemainingCampaignChangesets
?