feat(ir): add typed builder for AzureKeyVault@2#1132
Merged
Conversation
Introduces `AzureKeyVault` builder struct in `src/compile/ir/tasks/azure_key_vault.rs` with: - `new(connected_service_name, key_vault_name)` for the two required inputs - `secrets_filter()` for comma-separated secret names (ADO default `*`) - `run_as_pre_job()` to execute the task before the job starts - `with_display_name()` display name override - Five unit tests covering required inputs, optionals, wildcard filter, bool false, and display name override Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open
Collaborator
|
@copilot resolve merge conflicts. |
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Contributor
Addressed in |
jamesadevine
approved these changes
Jun 21, 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
AzureKeyVault@2to the ado-aw IR.Motivation
Previously, any code that needed to emit an
AzureKeyVault@2step had to hand-craftTaskStep::new(...)with raw string input keys. This PR introduces a typed builder struct (new(<required>)+ typed optional setters +into_step()) so required inputs are positional, optional inputs are type-checked, and call sites stop using stringly-typed keys.AzureKeyVault@2is one of the most commonly used enterprise ADO tasks — it downloads secrets from Azure Key Vault into pipeline variables so subsequent steps can reference them via$(secret-name). Having a typed builder makes it easy to emit this step from ado-aw compiler extensions and runtime code without error-prone string literals.Changes
src/compile/ir/tasks/azure_key_vault.rs: newAzureKeyVaultbuilder struct and its#[cfg(test)] mod testssrc/compile/ir/tasks/mod.rs:pub mod azure_key_vault;declaration (alphabetical order)Builder API
ADO Task Reference
AzureKeyVault@2ConnectedServiceName,KeyVaultNameSecretsFilter(ADO default*),RunAsPreJob(ADO defaultfalse)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.