feat(ir): add typed builder for DownloadSecureFile@1#1174
Draft
github-actions[bot] wants to merge 1 commit into
Draft
feat(ir): add typed builder for DownloadSecureFile@1#1174github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
Add DownloadSecureFile builder struct to src/compile/ir/tasks/download_secure_file.rs. The builder exposes: - new(secure_file) — required secureFile input (name or GUID from ADO Secure Files library) - retry_count(value) — optional retryCount setter - socket_timeout(value) — optional socketTimeout setter - with_display_name(value) — displayName override - into_step() — lowers to TaskStep, emitting only set inputs Four unit tests cover: required-only, all optionals, display name override, and GUID input. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
DownloadSecureFile@1to the ado-aw IR.Motivation
Previously, any code that needed to emit a
DownloadSecureFile@1step had tohand-craft
TaskStep::new("DownloadSecureFile@1", ...)with raw string inputkeys. This PR introduces a typed builder struct (
new(<required>)+ typedoptional setters +
into_step()) so the requiredsecureFileinput ispositional and optional inputs are type-checked, preventing silent key-name
mistakes.
Changes
src/compile/ir/tasks/download_secure_file.rs: newDownloadSecureFilebuilder struct and its
#[cfg(test)] mod tests(4 unit tests)src/compile/ir/tasks/mod.rs:pub mod download_secure_file;declaration(inserted alphabetically between
download_pipeline_artifactandextract_files)ADO Task Reference
DownloadSecureFile@1secureFile— name or GUID of the secure file in the ADO Secure Files libraryretryCount(default"8"),socketTimeout$(DownloadSecureFile.secureFilePath)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.