Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 14, 2025

Description

Default pipeline steps in DistributedApplicationPipeline were not tagged, preventing them from being queried by tag in pipeline configuration callbacks. This made it difficult to create dependencies on groups of default steps (e.g., "run after all build steps complete").

Changes:

  • Tagged Deploy and DeployPrereq with DeployCompute and ProvisionInfrastructure respectively
  • Tagged Build and BuildPrereq with BuildCompute
  • Tagged Publish and PublishPrereq with PushContainerImage
  • Left Diagnostics step untagged (debugging/troubleshooting step, not part of deployment workflow)
  • Added test to verify tag assignments
  • Renamed GetSteps(string tag) to GetStepsByTag(string tag) for clarity when multiple overloads exist

Usage:

pipeline.AddPipelineConfiguration((context) =>
{
    // Can now query default steps by tag
    var buildSteps = context.GetStepsByTag(WellKnownPipelineTags.BuildCompute);
    var provisionSteps = context.GetStepsByTag(WellKnownPipelineTags.ProvisionInfrastructure);
    
    // Create dependencies on groups of steps
    myStep.DependsOn(buildSteps);
});

Aligns default steps with tagging pattern already used by resource-specific steps (e.g., ProjectResource, AzureBicepResource).

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
Original prompt

Add tags to all the steps that are registered by default in the DistributedApplicationPipeline and have a WellKnownPipelineTag.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Add appropriate WellKnownPipelineTag tags to all default steps registered in DistributedApplicationPipeline:
- Deploy step: DeployCompute tag
- DeployPrereq step: ProvisionInfrastructure tag
- Build step: BuildCompute tag
- BuildPrereq step: BuildCompute tag
- Publish step: PushContainerImage tag
- PublishPrereq step: PushContainerImage tag
- Diagnostics step: No tag (diagnostic step)

Also added test to verify tags are correctly assigned to default steps.

Co-authored-by: captainsafia <[email protected]>
Copilot AI changed the title [WIP] Add tags to default steps in DistributedApplicationPipeline Add WellKnownPipelineTags to default pipeline steps Nov 14, 2025
Copilot AI requested a review from captainsafia November 14, 2025 01:23
Copilot finished work on behalf of captainsafia November 14, 2025 01:23
@davidfowl
Copy link
Member

@copilot Lets rename this to GetStepsByTag since it's a string overload.

Renamed the method to be more explicit that it's querying by tag rather than by resource. This makes the API clearer when multiple overloads exist.

Updated all usages in tests to use the new method name.

Co-authored-by: davidfowl <[email protected]>
Copy link
Contributor Author

Copilot AI commented Nov 14, 2025

@copilot Lets rename this to GetStepsByTag since it's a string overload.

Done in ddc23a1. Renamed GetSteps(string tag) to GetStepsByTag(string tag) and updated all test usages.

Copilot AI changed the title Add WellKnownPipelineTags to default pipeline steps Add WellKnownPipelineTags to default pipeline steps and rename GetSteps to GetStepsByTag Nov 14, 2025
Copilot AI requested a review from davidfowl November 14, 2025 23:23
Copilot finished work on behalf of davidfowl November 14, 2025 23:23
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.

3 participants