feat(ir): add typed builder for DownloadPackage@1#1108
Merged
jamesadevine merged 1 commit intoJun 18, 2026
Conversation
Adds a typed builder struct for `DownloadPackage@1` to the ado-aw IR.
Introduces `PackageType` enum (NuGet, Npm, PyPi, Maven, UPack, Cargo)
and a `DownloadPackage` builder with a `nuget()` convenience constructor.
Migrates `download_package_step` in `agentic_pipeline.rs` from a raw
`TaskStep::new("DownloadPackage@1", ...)` call to the new typed builder,
eliminating stringly-typed input keys at the call site.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jamesadevine
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a typed builder struct for
DownloadPackage@1to the ado-aw IR, and migrates the existing rawTaskStep::new("DownloadPackage@1", ...)call inagentic_pipeline.rsto use it.Motivation
The
download_package_stephelper inagentic_pipeline.rshand-crafted aTaskStepusing raw string keys ("packageType","feed","definition","version","downloadPath"). A typo in any key would silently produce invalid pipeline YAML. The new typed builder makes required inputs positional, constrainspackageTypeto a typed enum, and ensures optional inputs are only emitted when explicitly set.Changes
src/compile/ir/tasks/download_package.rs: newDownloadPackagebuilder struct +PackageTypeenum (NuGet,Npm,PyPi,Maven,UPack,Cargo) +#[cfg(test)] mod tests(5 test cases)src/compile/ir/tasks/mod.rs:pub mod download_package;declaration (alphabetical order)src/compile/agentic_pipeline.rs: importsDownloadPackage; replaces rawTaskStep::new(...)body indownload_package_stepwithDownloadPackage::nuget(...).with_display_name(...).into_step()ADO Task Reference
DownloadPackage@1https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/download-package-v1-taskpackageType,feed,definition(package name),version,downloadPathview(feed view),files(glob filter, default**),extract(bool, defaulttrue)Validation
cargo build --all-targetscargo testcargo clippy --all-targets --all-features --workspace -- -D warningsCreated by the ado-task-ir-contributor workflow.
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
spsprodeus21.vssps.visualstudio.comspsprodweu4.vssps.visualstudio.comSee Network Configuration for more information.