FastVideo icon indicating copy to clipboard operation
FastVideo copied to clipboard

[CI] Add detect-changes and conditional Docker rebuild with concurrency

Open Nabhya1807 opened this issue 7 months ago โ€ข 2 comments

This PR improves the Docker image build workflow by adding conditional execution and concurrency control.

Changes:

  • Added a detect-changes job using dorny/paths-filter to detect modified Dockerfiles
  • Updated build jobs to run only when:
    • manually triggered via workflow_dispatch, OR
    • corresponding Dockerfile changes are detected
  • Added workflow-level concurrency to prevent overlapping builds: group: docker-image-build cancel-in-progress: true

Validation:

  • Verified workflow_dispatch triggers correct jobs
  • Confirmed detect-changes outputs match modified file paths
  • Verified conditional job execution using needs + if logic

Note: Docker build failures observed in CI are unrelated to this change and originate from existing build scripts.

Nabhya1807 avatar Apr 14 '26 08:04 Nabhya1807

Merge Protections

๐Ÿ”ด 1 of 1 protections blocking ยท waiting on ๐Ÿ‘€ reviews and ๐Ÿค– CI

Protection Waiting on
๐Ÿ”ด PR merge requirements ๐Ÿ‘€ reviews and ๐Ÿค– CI

๐Ÿ”ด PR merge requirements

Waiting for

  • [ ] #approved-reviews-by>=1
  • [ ] check-success=full-suite-passed
  • [ ] check-success~=pre-commit
This rule is failing.
  • [ ] #approved-reviews-by>=1
  • [ ] check-success=full-suite-passed
  • [ ] check-success~=pre-commit
  • [X] check-success=fastcheck-passed
  • [X] title~=(?i)^\[(feat|feature|bugfix|fix|refactor|perf|ci|doc|docs|misc|chore|kernel|new.?model|skill|skills|infra)\]

mergify[bot] avatar Apr 14 '26 08:04 mergify[bot]

Concern: Auto-building on every push to main is too expensive

The current push trigger fires on every commit to main that touches docker/Dockerfile.*. Docker image builds are expensive (time, compute, registry storage), and most Dockerfile changes don't warrant an immediate image publish โ€” they may be part of a larger set of changes that aren't ready for release yet.

Proposal: Trigger automatic Docker builds on version tags instead of push-to-main. For example:

on:
  push:
    tags:
      - 'v[0-9]+.[0-9]+.[0-9]+'

This way:

  • Images are only published at intentional release points (e.g., v0.5.0).
  • The workflow_dispatch path still allows manual rebuilds when needed outside of a release.
  • You avoid burning CI minutes on every merged PR that happens to touch a Dockerfile.

Happy to discuss if there's a different cadence that makes more sense for this project.

Eigensystem avatar Apr 18 '26 03:04 Eigensystem

This PR has merge conflicts with the base branch. Please rebase:

git fetch origin main
git rebase origin/main
# Resolve any conflicts, then:
git push --force-with-lease

mergify[bot] avatar Jul 03 '26 20:07 mergify[bot]

Closing as superseded by #1447 and #1526, which provide path-scoped CUDA matrix/manifest builds and non-cancelling concurrency in the current single-Dockerfile workflow.

SolitaryThinker avatar Jul 15 '26 22:07 SolitaryThinker