Azure-Samples / Azure-Samples/tutor

[P2] ci-cd: cancel-in-progress interrupts long provision and increases drift risk

Open
#113 0 comments 0 reactions 0 assignees View on GitHub
backend component:ci-cd priority:P2 tracking type:tech-debt
Dominant language
Python
Stars
17
Forks
8
PR merge metrics
No merged PRs in 30d

Description

## Problem
Workflow concurrency currently uses branch-level `cancel-in-progress: true`, which can terminate long-running `provision` executions and amplify state drift/retry churn.

## Type
- tech debt

## Evidence
- `.github/workflows/azd-deploy.yml` uses:
- `concurrency.group: azd-deploy-${{ github.ref }}`
- `cancel-in-progress: true`
- Recent runs:
- https://github.com/Azure-Samples/tutor/actions/runs/23126353038 (cancelled during `Provision infrastructure` after ~90m)
- https://github.com/Azure-Samples/tutor/actions/runs/23125888889 (cancelled)
- Repeated cancellations overlap with ongoing provision and obstruct clean convergence.

## Reproduction
1. Start a `workflow_dispatch` deploy on `main`.
2. Trigger another deploy/push on same ref before completion.
3. Observe prior in-flight run cancellation and interrupted provision.

## Acceptance Criteria
- [ ] Concurrency is scoped per environment and does not cancel active `provision` in-flight for same env.
- [ ] New runs queue or fail-fast with explicit message instead of interrupting active infra apply.
- [ ] Workflow summary surfaces cancellation reason and superseding run id.
- [ ] Document runbook guidance for safe re-run behavior.

## Suggested Owner
`platform-quality`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.