Skip to content

Fix issue with --dest-dir for CI usage#47792

Merged
tjprescott merged 8 commits into
mainfrom
FixApiStubCIBehavior
Jul 1, 2026
Merged

Fix issue with --dest-dir for CI usage#47792
tjprescott merged 8 commits into
mainfrom
FixApiStubCIBehavior

Conversation

@tjprescott

Copy link
Copy Markdown
Member

Updates the CI package checks so that it targets the right folder which maintaining the contract that apistub --dest-dir X actually targets X.

Copilot AI review requested due to automatic review settings July 1, 2026 17:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes how the CI check dispatcher (eng/scripts/dispatch_checks.py) computes the --dest-dir passed to the apistub check. Previously it passed the shared artifact staging directory directly, but the downstream Create-APIReview.ps1 step looks for the generated APIView token file under a per-package subfolder ($ArtifactPath/$packageName/${packageName}_python.json). The fix appends the package name to the destination for apistub only, keeping the apistub --dest-dir X contract intact (it still writes exactly where told) while producing the folder layout CI consumers expect.

Changes:

  • Add get_check_dest_dir helper that appends the resolved package name to dest_dir for the apistub check and returns it unchanged otherwise.
  • Wire the helper into run_check so the apistub command targets the per-package subdirectory.
  • Add unit tests for the new helper and for the generate_api_for_package command construction in the API-review workflow.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
eng/scripts/dispatch_checks.py Imports ParsedSetup, adds get_check_dest_dir, and uses it to compute the per-package --dest-dir for apistub.
eng/tools/azure-sdk-tools/tests/test_dispatch_checks.py New tests covering apistub subfolder behavior, non-apistub pass-through, and empty dest-dir handling.
scripts/api_md_workflow/create_api_review_pr_test.py Adds tests asserting generate_api_for_package builds the apistub --dest-dir <package_dir> command for both azpysdk and runtime-executable paths.

Comment thread eng/scripts/dispatch_checks.py Outdated
Co-authored-by: tjprescott <5723682+tjprescott@users.noreply.github.com>
Co-authored-by: tjprescott <5723682+tjprescott@users.noreply.github.com>
Copilot AI requested a review from a team as a code owner July 1, 2026 18:43

@danieljurek danieljurek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the issue it intended to fix: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6508343&view=logs&j=b70e5e73-bbb6-5567-0939-8415943fadb9&t=f14f2bed-72ab-5062-192c-a977bd0d104b&l=58

There are other failures, but they look related to mypy and azure-template... so I would not consider those blocking based on what I'm seeing.

@tjprescott
tjprescott merged commit 28ab242 into main Jul 1, 2026
19 of 20 checks passed
@tjprescott
tjprescott deleted the FixApiStubCIBehavior branch July 1, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants