8000 Fix existing resources with the azure publisher by davidfowl · Pull Request #8622 · dotnet/aspire · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix existing resources with the azure publisher #8622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

davidfowl
Copy link
Member

Description

  • Explore the ExistingAzureResourceAnnotation when looking for parameters.
  • Added existing resources to baseline tests

Fixes #8619

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
  • Did you add public API?
    • No
  • Does the change make any security assumptions or guarantees?
    • No
  • Does the change require an update in our Aspire docs?
    • No

- Added existing resources to baseline tests
@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Apr 8, 2025
Copy link
Contributor
@Copilot 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.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

tests/Aspire.Hosting.Azure.Tests/AzurePublisherTests.cs:46

  • [nitpick] Consider extracting the hard-coded resource group 'rg-shared' into a constant or variable to avoid duplication and improve maintainability.
builder.AddAzureStorage("existing-storage").PublishAsExisting("images", "rg-shared");

src/Aspire.Hosting.Azure/AzurePublishingContext.cs:196

  • Verify that wrapping the parameter map value in a FunctionCallExpression maintains the intended behavior, as this change alters how the resource group is referenced.
ParameterResource p => new FunctionCallExpression(new IdentifierExpression("resourceGroup"), parameterMap[p].Value.Compile()),

Copy link
Member
@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

LGTM

@davidfowl davidfowl merged commit 7804aea into main Apr 8, 2025
176 checks passed
@davidfowl davidfowl deleted the davidfowl/discover-params branch April 8, 2025 16:04
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AzurePublisher unable to resolve parameters
2 participants
0