Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 28, 2025

The LoadDeploymentState method was checking the wrong configuration key, causing the --clear-cache flag to be ignored during deployment state loading.

Changes

  • Updated DistributedApplicationBuilder.LoadDeploymentState() to read from Pipeline:ClearCache instead of Publishing:ClearCache

Context

The --clear-cache command-line switch maps to Pipeline:ClearCache in the configuration system. The rest of the codebase (FileDeploymentStateManager, PipelineOptions, tests) already uses Pipeline:ClearCache, but LoadDeploymentState was checking a non-existent Publishing:ClearCache key, causing it to always return false and load cached state even when --clear-cache was specified.

- var clearCache = _innerBuilder.Configuration.GetValue<bool>("Publishing:ClearCache");
+ var clearCache = _innerBuilder.Configuration.GetValue<bool>("Pipeline:ClearCache");

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: /usr/local/bin/bicep build /tmp/aspirebEQr20/teststorage.module.bicep --stdout (dns block)
    • Triggering command: /usr/local/bin/bicep build /tmp/aspireHAKv39/teststorage.module.bicep --stdout (dns block)
    • Triggering command: /usr/local/bin/bicep build /tmp/aspirehKoUIN/env.module.bicep --stdout (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Fix clear cache handling for deployment state loading</issue_title>
<issue_description>The code below needs to be updated to check for the configuration value in the Pipeline:ClearCache.

var clearCache = _innerBuilder.Configuration.GetValue<bool>("Publishing:ClearCache");

</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 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.

Copilot AI changed the title [WIP] Fix clear cache handling for deployment state loading Fix LoadDeploymentState to check Pipeline:ClearCache instead of Publishing:ClearCache Oct 28, 2025
Copilot AI requested a review from captainsafia October 28, 2025 16:04
Copilot finished work on behalf of captainsafia October 28, 2025 16:04
@github-actions
Copy link
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12452

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12452"

1 similar comment
@github-actions
Copy link
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12452

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12452"

@davidfowl davidfowl marked this pull request as ready for review October 28, 2025 16:22
Copilot AI review requested due to automatic review settings October 28, 2025 16:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where the --clear-cache command-line flag was being ignored during deployment state loading. The LoadDeploymentState method was checking the wrong configuration key (Publishing:ClearCache) instead of the correct key (Pipeline:ClearCache), which is where the --clear-cache flag actually maps to in the configuration system.

Key Changes

  • Updated LoadDeploymentState() to check Pipeline:ClearCache configuration key instead of Publishing:ClearCache

@captainsafia captainsafia enabled auto-merge (squash) October 29, 2025 00:22
@captainsafia captainsafia merged commit 361db49 into main Oct 29, 2025
596 of 610 checks passed
@captainsafia captainsafia deleted the copilot/fix-clear-cache-handling branch October 29, 2025 00:44
@dotnet-policy-service dotnet-policy-service bot added this to the 13.0 milestone Oct 29, 2025
radical pushed a commit that referenced this pull request Oct 29, 2025
…shing:ClearCache (#12452)

* Initial plan

* Fix clear cache handling to use Pipeline:ClearCache configuration key

Co-authored-by: captainsafia <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: captainsafia <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix clear cache handling for deployment state loading

3 participants