-
Notifications
You must be signed in to change notification settings - Fork 720
Render resource formatting in manifest #12216
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
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12216Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12216" |
There was a problem hiding this 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 updates the manifest generation to include information about formatting applied to ReferenceExpression values, specifically introducing a new annotated.string resource type that captures URI encoding transformations. The change ensures that password parameters used in connection strings are properly represented in the manifest with their encoding format.
Key Changes:
- Enhanced manifest publishing to track and generate formatted parameter resources
- Updated connection strings to reference URI-encoded parameter variants
- Introduced
annotated.stringresource type withfilterfield in manifests
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/Aspire.Hosting/Publishing/ManifestPublishingContext.cs |
Core implementation of formatted parameter tracking and manifest generation |
tests/Aspire.Hosting.Tests/ManifestGenerationTests.cs |
Updated test expectations to include URI-encoded password references |
tests/Aspire.Hosting.RabbitMQ.Tests/AddRabbitMQTests.cs |
Updated RabbitMQ manifest test expectations for URI-encoded credentials |
tests/Aspire.Hosting.Nats.Tests/AddNatsTests.cs |
Updated NATS manifest test expectations for URI-encoded credentials |
tests/Aspire.Hosting.MongoDB.Tests/AddMongoDBTests.cs |
Updated MongoDB manifest test expectations for URI-encoded credentials |
playground/*/aspire-manifest.json |
Multiple playground manifests updated to use URI-encoded password references |
|
Do we want to add a switch to revert to the previous behavior in order not to break existing tooling? |
| foreach (var (format, resourceName) in formats) | ||
| { | ||
| Writer.WriteStartObject(resourceName); | ||
| Writer.WriteString("type", "annotated.string"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better name may look like parameter.filter.v0 to match what has been used so far.
| { | ||
| "type": "object", | ||
| "description": "Represents a formatted projection of a parameter value, produced by applying the specified filter to the parameter.", | ||
| "required": [ "type", "value", "filter" ], | ||
| "properties": { | ||
| "type": { | ||
| "const": "annotated.string" | ||
| }, | ||
| "value": { | ||
| "$ref": "#/definitions/value" | ||
| }, | ||
| "filter": { | ||
| "$ref": "#/definitions/annotatedStringFilter" | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the new section compared to aspire-8.0.json
vhvb1989
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖💝
Description
Updates the manifest format to provide the information about each
ReferenceExpressionformat.Fixes #3117
Checklist
<remarks />and<code />elements on your triple slash comments?