Skip to content

🚀 Cancel stale CI pipelines - #211

Open
kikoveiga wants to merge 1 commit into
mainfrom
kikoveiga/cancel-stale-ci-pipelines
Open

🚀 Cancel stale CI pipelines#211
kikoveiga wants to merge 1 commit into
mainfrom
kikoveiga/cancel-stale-ci-pipelines

Conversation

@kikoveiga

Copy link
Copy Markdown
Contributor

Motivation

Stale branch pipelines keep consuming CI capacity after newer commits supersede them.

Changes

  • Default CI jobs to interruptible: true.
  • Auto-cancel interruptible jobs on non-main branches when a new commit is pushed.
  • Preserve existing pipelines on main and tags.
  • Keep manual container-image builds non-interruptible.

This follows the configuration already used in dd-sdk-android and DataDog/shopist-android#257.

Test instructions

  • yarn prettier --check .gitlab-ci.yml
  • Parsed .gitlab-ci.yml with Ruby YAML.
  • Asserted the workflow cancellation modes and container-image exception from the parsed configuration.

Checklist

  • Tested locally (CI configuration validation; playground is not applicable).
  • Added unit tests for this change. Not applicable: CI-only configuration.
  • Added e2e/integration tests for this change. Not applicable: CI-only configuration.
  • Updated related documentation. Not applicable: behavior is documented inline in .gitlab-ci.yml.
  • Agentic code review findings addressed or explicitly dismissed.

@kikoveiga
kikoveiga requested a review from a team as a code owner August 28, 2026 17:49

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review — Score: 4.9 / 5

This is a focused CI hygiene change: default jobs are interruptible, superseded branch pipelines auto-cancel, and main/tags plus the manual build-container-image job are explicitly protected. The workflow rules are correctly scoped and align with the established dd-sdk-android pattern. I would approve.

Why 4.9: Minimal, well-commented diff with the right exception for long-running manual Docker builds, and the author validated YAML structure locally. No SDK or customer-facing impact.

Why not 5: CI-only configuration changes inherently lack in-repo regression tests beyond static parsing; operational correctness depends on GitLab runtime behavior. Several dd-gitlab/* jobs were still running when this review was posted (not a merge blocker).

Open in Web View Automation 

Sent by Cursor Automation: electron-sdk reviews

@kikoveiga
kikoveiga force-pushed the kikoveiga/cancel-stale-ci-pipelines branch from cd7e4c8 to 6b110e7 Compare August 28, 2026 17:51
@sbarrio
sbarrio requested a review from bcaudan September 1, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant