Skip to content

Skip scheduled nightly prerelease when no changes have been merged to main #3376

@shouples

Description

@shouples

The prerelease-multi-arch-packaging Semaphore pipeline runs on a nightly schedule and always produces a new prerelease build, even when no commits have been merged to main since the previous run. This wastes CI capacity on a 5-target packaging matrix and clobbers the existing v${VERSION}-pre assets with functionally-identical artifacts.

https://github.com/confluentinc/vscode/blob/bc18eb97076289fdbb1bc144fc061d41543ed6c5/.semaphore/prerelease-multi-arch-packaging.yml#L1-L71

The pipeline should short-circuit early when main's HEAD matches the commit that the current v${VERSION}-pre tag points at, skipping the Package VSIX Files and Upload Prerelease VSIX Files to GitHub blocks without failing the run.

Suggested approach:

  • Add a preflight block (before the packaging matrix) that runs git rev-parse HEAD and git rev-parse v${VERSION}-pre and exits 0 early if they match.
  • Gate the skip on the scheduled-trigger case only (e.g., via a SEMAPHORE_WORKFLOW_TRIGGERED_BY_SCHEDULE check, or an explicit FORCE=1 escape hatch) so manual re-runs still package unconditionally.
  • The existing prerelease tag may not exist on first run - the preflight should treat "tag not found" as "proceed with build" rather than as an error.

Metadata

Metadata

Labels

CI/CDRelating to our CI/CD pipelines (build+test, packaging, etc)

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions