Azure / Azure/typespec-azure

Trigger downstream language emitter CI checks when upstream dependencies change

Open
#4,860 2 comments 0 reactions 2 assignees Claimed by @iscai-msft View on GitHub
design:needed eng triaged:core
Dominant language
TypeScript
Stars
27
Forks
90
Avg merge
1d 22h
Merged PRs (30d)
156

Description

## Context

More language emitters have moved into the `typespec-azure` repo. As a result, a change to an upstream dependency (e.g. the compiler / core libraries) can now cause a regression in a downstream language emitter that lives in the same repo.

Today there is **no mechanism** in CI that triggers the checks of the language emitters when a change is detected in one of their upstream dependencies. This means regressions in downstream emitters can slip through unnoticed until much later.

## Proposal

To make `typespec-azure` behave like a true mono-repo, we should optimize the CI system so that:

- When CI detects a change in an upstream dependency, it automatically triggers the checks of the affected downstream language emitters.

This will guard against upstream changes silently breaking downstream emitters.

### Trade-off & mitigation

Triggering downstream emitter checks on every upstream compiler change will make the upstream compiler CI heavier. To reduce unnecessary checks, we can add **skip logic** (e.g. a label): when a specific label is applied to a PR, the emitter checks can be skipped.

## Open questions

- Which dependency graph / affected-project detection mechanism should we rely on (e.g. existing tooling in the repo)?
- What should the exact skip label(s) be named, and who is allowed to apply them?
- Should skipped checks be reported as neutral/skipped or omitted entirely?

Feedback and questions welcome.

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.