Azure / Azure/azure-rest-api-specs

[TypeSpec] Improve process to test PRs to TypeSpec before merging

Open
#28,059 0 comments 1 reaction 1 assignee Claimed by @mikeharder View on GitHub
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

We currently have a manual process to test PRs to TypeSpec in `azure-rest-api-specs` (`main` or `typespec-next`) before merging:

https://github.com/Azure/typespec-azure/blob/main/CONTRIBUTING.md#testing-a-change-in-repo-azure-rest-api-specs

The most painful part is needing to copy the tarball link from the TSP PR pipeline artifacts (steps 3-4). Especially if you need to iterate on the TSP PR and re-test after every commit.

Ideally, the PR to `azure-rest-api-specs` would automatically pick up the latest changes to the TSP PR. Two options:

1. Pipeline `typespec-azure - Verify PR` publishes the packages to an internal NPM feed, with a tag like `pr-12345` that always points to the latest build from the PR.
- PR to `azure-rest-api-specs` points to tag `pr-12345` instead of a specific tarball, so it always uses the latest build.
2. Pipeline `TypeSpec Validation - All` could download the pipeline or build artifacts from pipeline `typespec-azure - Verify PR`.

We might be able to use a similar mechanism as the process to test changes from TSP in the emitter repos.

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.