Skip to content

feat(ir): add typed builder for DownloadPackage@1#1108

Merged
jamesadevine merged 1 commit into
mainfrom
feat/ir-download-package-task-ab24fae39cc652b3
Jun 18, 2026
Merged

feat(ir): add typed builder for DownloadPackage@1#1108
jamesadevine merged 1 commit into
mainfrom
feat/ir-download-package-task-ab24fae39cc652b3

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds a typed builder struct for DownloadPackage@1 to the ado-aw IR, and migrates the existing raw TaskStep::new("DownloadPackage@1", ...) call in agentic_pipeline.rs to use it.

Motivation

The download_package_step helper in agentic_pipeline.rs hand-crafted a TaskStep using 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, constrains packageType to a typed enum, and ensures optional inputs are only emitted when explicitly set.

Changes

  • src/compile/ir/tasks/download_package.rs: new DownloadPackage builder struct + PackageType enum (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: imports DownloadPackage; replaces raw TaskStep::new(...) body in download_package_step with DownloadPackage::nuget(...).with_display_name(...).into_step()

ADO Task Reference

  • Task: DownloadPackage@1
  • Docs: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/download-package-v1-task
  • Required inputs: packageType, feed, definition (package name), version, downloadPath
  • Optional inputs: view (feed view), files (glob filter, default **), extract (bool, default true)

Validation

  • cargo build --all-targets
  • cargo test
  • cargo clippy --all-targets --all-features --workspace -- -D warnings

Created 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.com
  • spsprodweu4.vssps.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "spsprodeus21.vssps.visualstudio.com"
    - "spsprodweu4.vssps.visualstudio.com"

See Network Configuration for more information.

Generated by ADO Task IR Contributor · 528.1 AIC · ⌖ 29.9 AIC · ⊞ 38.1K ·

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 jamesadevine marked this pull request as ready for review June 18, 2026 23:08
@jamesadevine jamesadevine merged commit b690c5c into main Jun 18, 2026
This was referenced Jun 18, 2026
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.

1 participant