Skip to content

Check incident status before archiving channel

Igor requested to merge smart-archiving into master

The existing behaviour is to archive channels based on channel creation time. We should only archive channels for incidents that were actually closed.

This change requires a couple new CI variables to be set on the woodhouse ops mirror (which runs the archiving pipeline).

  • GITLAB_API_TOKEN
  • GITLAB_PRODUCTION_PROJECT_PATH

And once this is active, we can also remove INCIDENT_CHANNEL_MAX_AGE and fall back to the default of 14 days.

The new behaviour: Scan list of channels once per day, find incident channels, and archive them if the corresponding incident issue is closed.

Alternatively, if the channel has been open for 14 days, we will also close it. This catches edge cases such as incident channels being created with a timestamp name, and never getting the issue id. Those will get closed out eventually.

refs https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/13852

Merge request reports