Skip to content

Onboard Rust to API Review Hub - #5387

Open
Heath Stewart (heaths) wants to merge 12 commits into
mainfrom
api-review-hub
Open

Heath Stewart (heaths) wants to merge 12 commits into
mainfrom
api-review-hub

Conversation

@heaths

Copy link
Copy Markdown
Member

Resolves #5307

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

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.

🟡 Changes recommended

Noncanonical roots can break source navigation, and source-directory overrides leave helper imports pointing to the default checkout.

2 open findings
What changed in this PR

Integrates Rust with API Review Hub to generate review sidecars on demand, addressing #5307.

Changes:

  • Adds jobs to build tooling and generate review bundles.
  • Adds explicit repository-root support and consolidates package metadata.
  • Updates export options, documentation, and architecture-review ownership.
File Description
eng/​tools/​generate_api/​src/​output/​tests.rs Updates metadata expectations.
eng/​tools/​generate_api/​src/​output.rs Adds package path and renames hash field.
eng/​tools/​generate_api/​src/​main.rs Resolves repository roots; removes state files.
eng/​tools/​generate_api/​src/​driver.rs Pins Cargo metadata to the embedded toolchain.
eng/​tools/​generate_api/​src/​cli/​tests.rs Updates argument tests.
eng/​tools/​generate_api/​src/​cli.rs Adds --root; removes --working-dir.
eng/​tools/​generate_api/​README.md Documents revised outputs and Hub integration.
eng/​tools/​generate_api/​AGENTS.md Updates tool guidance.
eng/​scripts/​Export-API.ps1 Adds review mode and renames output parameter.
eng/​pipelines/​templates/​steps/​use-rust.yml Adds configurable source directory.
eng/​pipelines/​templates/​jobs/​apireview-hub-generate-artifact-rust.yml Generates package review bundles.
eng/​pipelines/​templates/​jobs/​apireview-hub-build-tools-rust.yml Builds and stages the generator.
.vscode/​settings.json Associates ARCHITECTS with ignore syntax.
.github/​ARCHITECTS Defines SDK architecture-review ownership.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread eng/pipelines/templates/steps/use-rust.yml
Comment thread eng/tools/generate_api/src/main.rs Outdated
Necessary after rebase on eng/common changes.
This commit deletes the PowerShell scripts
`Resolve-ApiReviewHubRustToolchain.ps1` and `ApiReviewHub.ps1`, which were
previously used for managing Rust toolchains in the API Review Hub. The
functionality has been replaced with a more streamlined approach using
YAML job wrappers in the pipeline.

Additionally, the `Cargo.ps1` script has been updated to remove references
to the now-removed working directory logic, simplifying the handling of
Cargo workspaces. The `generate_api` tool has also been refactored to
eliminate the working directory parameter, focusing on a more direct
output structure.

The changes aim to enhance maintainability and reduce complexity in the
toolchain management process.
Updated the use-rust.yml to use a parameterized source directory for better
flexibility in path handling. Introduced a new tests.rs file to validate
repository root resolution and ensure that the default output source root
is preserved correctly. This enhances the robustness of the API generation
process and improves maintainability.
Updated the build and artifact generation jobs to stage necessary setup files
from the specified language tools reference. This ensures historical checkouts
can operate without requiring current engineering helpers. The changes also
introduce new parameters for toolchain manifest and tools directory to improve
flexibility in managing Rust toolchains.
Bump the version number from 2.2.2 to 2.3.0 to reflect the latest changes
and improvements in the generate_api package.

This branch has not been deployed

No deployments
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.

Generate frequently changing API files only during ARH pull request creation

2 participants