Skip to content
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

[release/8.0] Implement IResourceWithArgs on ProjectResource #3559

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Apr 10, 2024

Backport of #3545 to release/8.0

/cc @eerhardt

Customer Impact

This is fixing 2 issues that impact customers:

  1. Allows developers to call .WithArgs on a Project. The args get passed to the app at runtime and written to the manifest. (Note that azd doesn't handle this correctly yet - tracking with [Issue] azd doesn't support args with Aspire on project.v0 resource Azure/azure-dev#3678)
  2. When we parse the launchSettings command line args string into a collection, we are not parsing double quotes correctly. This fixes the parsing to be consistent with VS's command line args parsing.

Testing

Manually tested that the .WithArgs args compose with the launchSettings.json command line args correctly in both VS and dotnet run.
Added new automated tests for parsing.

Risk

Low to Medium-Low. It shouldn't affect any existing scenario, and fixes command line args parsing. The new scenario of specifying args to a Project may uncover more bugs than just the azd bug.

Regression?

No

Microsoft Reviewers: Open in CodeFlow

Also fix the command line arg parsing to be the same as .NET Process's:
* double quotes around single arguments
* consecutive double quotes inside a quoted argument means one double quote

Fix #3306
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Apr 10, 2024
@dotnet-policy-service dotnet-policy-service bot added the Servicing-consider Issue for next servicing release review label Apr 10, 2024
@danmoseley danmoseley added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Apr 10, 2024
@davidfowl davidfowl merged commit f1b9c55 into release/8.0 Apr 10, 2024
7 checks passed
@davidfowl davidfowl deleted the backport/pr-3545-to-release/8.0 branch April 10, 2024 19:15
@danmoseley danmoseley mentioned this pull request Apr 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants