-
Notifications
You must be signed in to change notification settings - Fork 134
Implement GetConnectionProperties for new connection string formatting #916
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
base: main
Are you sure you want to change the base?
Conversation
…ng resources Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
| /// <inheritdoc /> | ||
| public ReferenceExpression ConnectionStringExpression => | ||
| ReferenceExpression.Create( | ||
| $"{scheme}://{UserNameReference}:{PasswordParameter}@{PrimaryEndpoint.Property(EndpointProperty.Host)}:{PrimaryEndpoint.Property(EndpointProperty.Port)}"); |
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.
At what point will it be able to use the encoding from 13.0 (Password:uri)?
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.
@sebastienros sorry, I'm not sure I'm following
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.
You can add :uri formatter suffix on values that need to be url-encoded:
ReferenceExpression.Create(
$"{scheme}://{UserNameReference}:{PasswordParameter:uri}@{PrimaryEndpoint.Property(EndpointProperty.Host)}:{PrimaryEndpoint.Property(EndpointProperty.Port)}");
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.
Well, TIL.
@copilot can you do this
* Initial plan * Replace IDistributedApplicationLifecycleHook with event-based patterns Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> * Add tests for installer resources and update Dapr tests Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> * Refactor Dapr to use IDistributedApplicationEventingSubscriber Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> * Fixing build issue * Updating the endpoint port * Disabling some tests so we can move forward in other parts of the Aspire 13 update --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> Co-authored-by: Aaron Powell <me@aaron-powell.com>
Minimum allowed line rate is |
* Initial plan * Remove AddViteApp and npm-specific functionality (moved to Aspire 13) Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> * Update comments and tests to reflect npm removal Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> * Update MONOREPO.md to remove npm references Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> * Adding missing types * Bad copilot code * Fixing missing namespace * Handling port forwarding * removing more stuff that has been migrated to aspire core * Reworking how package installing is handled * daily update * Adding back the annotation that is no longer moving to core * Forgot to install packages * adding a bunch more annotations to provide enough metadata * Removing old demo apps * Disabling python tests * Removing a testing change * Updating to the latest nightly and dealing with type name changes * Removing type that was can repurpose from aspire core * breaking the tests down so they are easier to read * Removing legacy docs * Fixing failing tests --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> Co-authored-by: Aaron Powell <me@aaron-powell.com>
|
@copilot we have some failing tests, can you fix them |
I'd be happy to fix the failing tests, but I need more information about which tests are failing and what the error messages are. Could you provide:
Without access to the preview Aspire packages (13.0.0-preview.1.25531.6) in my environment, I cannot restore, build, or run the tests locally to diagnose the issue. 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot the tests are for Hosting.Minio and Hosting.SurrealDb, with example logs https://github.com/CommunityToolkit/Aspire/actions/runs/19058298930/job/54432972325?pr=916 and https://github.com/CommunityToolkit/Aspire/actions/runs/19058298930/job/54432972317?pr=916 |
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Fixed the failing tests. The issue was that Added implementations in commits:
All resources now properly implement the connection properties interface following the same patterns as the upstream Aspire resources. |
|
|
||
| builder.Append($";AccessKey={RootUser}"); | ||
| builder.Append($";SecretKey={PasswordParameter}"); | ||
| builder.Append($";SecretKey={PasswordParameter:uri}"); |
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 shouldn't be URL-encoded, right?
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.
My understanding from this thread #916 (comment) with @sebastienros was that passwords should be.
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 one should not be "URL" encoded because it's not an url. We are not encoding connection string segments for now.
Adapt connection string generation to support new formatting
This PR implements the new
GetConnectionProperties()method from the upstream Aspire PR #11938 for all CommunityToolkit resources that implementIResourceWithConnectionString.Progress
IResourceWithConnectionStringGetConnectionProperties()for each resource following the patterns from upstreamOriginal prompt
Fixes #889
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.