[FF] ci_timed_out_builds_worker_timeout -- Add iteration timeout to DropRunningWorker

Summary

This issue is to roll out the feature on production, that is currently behind the ci_timed_out_builds_worker_timeout feature flag.

Introduced in: !223223

Owners

  • Most appropriate Slack channel to reach out to: #g_pipeline_execution
  • Best individual to reach out to: @hfyngvason

Expectations

What are we expecting to happen?

When enabled, the Ci::TimedOutBuilds::DropRunningWorker will stop processing builds after 25 minutes (5 minutes before the deduplication TTL of 30 minutes expires). This prevents overlapping runs of the worker when processing takes longer than the TTL.

What can go wrong and how would we detect it?

  • If the timeout is too aggressive, some timed-out builds may not be dropped in a single run. They will be picked up in the next scheduled run.
  • Monitor the Timeout reached, exiting early log message to see how often the timeout is triggered.
  • Relevant dashboard: https://dashboards.gitlab.net/d/stage-groups-pipeline_execution/stage-groups-group-dashboard-pipeline-execution

Rollout Steps

Note: Please make sure to run the chatops commands in the Slack channel that gets impacted by the command.

Rollout on non-production environments

  • Verify the MR with the feature flag is merged to master and has been deployed to non-production environments with /chatops run auto_deploy status <merge-commit-of-your-feature>
  • Enable the feature globally on non-production environments with /chatops run feature set ci_timed_out_builds_worker_timeout true --dev --pre --staging --staging-ref
  • Verify that the feature works as expected. The best environment to validate the feature in is staging-canary as this is the first environment deployed to. Make sure you are configured to use canary.
  • If the feature flag causes end-to-end tests to fail, disable the feature flag on staging to avoid blocking deployments.

Preparation before global rollout

  • Set a milestone to this rollout issue to signal for enabling and removing the feature flag when it is stable.
  • Ensure that you or a representative in development can be available for at least 2 hours after feature flag updates in production.
  • Notify the #support_gitlab-com Slack channel and your team channel.

Global rollout on production

For visibility, all /chatops commands that target production must be executed in the #production Slack channel and cross-posted (with the command results) to the responsible team's Slack channel.

  • Enable the feature globally on production with /chatops run feature set ci_timed_out_builds_worker_timeout true
  • Monitor the appropriate graphs on https://dashboards.gitlab.net.
  • After the feature has been enabled, wait for at least one day before releasing the feature.

Release the feature

After the feature has been deemed stable, the clean up should be done as soon as possible to permanently enable the feature.

  • Create a merge request to remove the ci_timed_out_builds_worker_timeout feature flag:
    • Remove all references to the feature flag from the codebase.
    • Remove the YAML definitions for the feature from the repository.
  • Ensure that the cleanup MR has been included in the release package.
  • Once the cleanup MR has been deployed to production, clean up the feature flag from all environments: /chatops run feature delete ci_timed_out_builds_worker_timeout --dev --pre --staging --staging-ref --production
  • Close this rollout issue.

Rollback Steps

  • This feature can be disabled on production by running the following Chatops command:
/chatops run feature set ci_timed_out_builds_worker_timeout false
  • Disable the feature flag on non-production environments:
/chatops run feature set ci_timed_out_builds_worker_timeout false --dev --pre --staging --staging-ref
Assignee Loading
Time tracking Loading