Skip to content

Fix "changesets processing?" checks in CloseCampaign/DeleteCampaign methods

Administrator requested to merge mrn/fix-processing-checks into main

Created by: mrnugget

This fixes #12643 by fixing the checks and updating the methods to the new workflow model.

  1. DeleteCampaign won't have a check anymore, since it also doesn't accept the closeChangesets: bool parameter anymore. That's documented in the GraphQL API and we should make that visible in the UI.
  2. CloseCampaign now only returns an error if the user wants to close the open changesets and the changesets are processing.

Why do we return an error? Because if the user wants to close the open changesets, we can't guarantee that we close all of them if they're currently processing.

In the future, when we move the closing of changesets to the reconciler, we can revisit this. But even then it'll be hard to mark a changeset as closed and enqueue it for the reconciler while the reconciler is working on it. Since the reconciler would overwrite the the reconciler_state field. But that can be worked around by, say, introducing a to_be_closed field and a cron-like job enqueuing these changesets again and again until the field is false and the external_state is closed.

Merge request reports

Loading