-
Notifications
You must be signed in to change notification settings - Fork 652
Refactor database explorer resource builders to not prefix their names the name of the first resource they are added to. #8237
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
…s the name of the first resource they are added to.
@paulomorgado You might need to follow the pattern here aspire/src/Aspire.Hosting.Azure.Functions/AzureFunctionsProjectResourceExtensions.cs Lines 230 to 234 in 8ad1d4b
This is to avoid conflicts with differnet apphosts. |
I'm sorry @davidfowl, but I don't get what you mean. I only changed the resource name, which is internal only to each instance of app host. |
You're right. I guess there's no volume associated here. |
Isn't it the current behavior? And if none is passed then a unique name is created by using the initiating resource. Now with you PR two resources will have the same name if |
No. If none is passed, the name is dependent on the name of the first resource adding this dependency.
There will only be 1 and only 1 resource of these. there's no way of duplicating the names that was not possible before. |
Is there anything missing here? |
I will take another look, assigning to 9.3 so I don't forget |
I reverted the changes for Milvus and MongoDB because they won't handle multiple calls (two resources are then declared with the same name). You can test it too, I did, and if you look at the other implementations (PgWeb, PhpMyAdmin, ...) where you did the change, you can see that the second call of the method return the existing container if there is one, so these work fine. These will also handle resources coming from other builders, meaning that if you create multiple dbs, a single explorer will render all these dbs. |
Description
Refactor database explorer resource builders to not prefix their names the name of the first resource they are added to.
Kept the behavior where, when a
containerName
is passed, that's the one that is used.Fixes #2060
Checklist
<remarks />
and<code />
elements on your triple slash comments?breaking-change
template):doc-idea
template):