-
Notifications
You must be signed in to change notification settings - Fork 720
Provide optional arguments for password/port when running as a container #6886
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
Closed
dansiegel
wants to merge
1
commit into
dotnet:main
from
dansiegel:ds/azure-sql-container-configuration
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@davidfowl @sebastienros @ReubenBond @JamesNK @DamianEdwards - are we concerned with binary breaking changes like this in the Hosting integrations? Part of me thinks this is OK, but wanted to check what everyone else thinks.
If we didn't go with this approach, we could take one of 2 approaches:
nullexplicitly for the parameters they aren't supplying.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.
An alternative is to expose some methods that allow for configuring the port and the password during the
configureContainercallback.See 15e8a26 for an example:
The downside with just exposing it on these 3 containers is that it isn't consistent with the rest of the "top level" containers - like MongoDB, RabbitMQ, etc. If we go with this route, would we add it to all of them as well?
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.
I think we've generally been fine with adding new optional parameters to existing methods 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.
We haven't been fine in the client integration libraries, since it is a binary breaking change. But I'm not sure we care as much in the hosting integrations libraries.
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.
Yeah I guess I'm basing this on what we've done in ASP.NET Core itself and
Aspire.Hosting, or I'm totally misremembering 😄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.
Don't make binary breaking changes in minors. Just add overloads 😄
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.
I think I'm in favor of taking the alternative approach above:
This fits with our other "emulator" containers, and allows us to not have an explosion of overloads.
We would also then have a
.WithPassword(IResourceBuilder<ParameterResource>)extension as well that allows you to set the password after the constructor.Opinions on taking this approach?
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.
I thought about that as well but it would require more changes to the way that the underlying SqlServerResource is created/updated.
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.
I agree it would require some more changes throughout, but I think it provides a better API experience.