-
Notifications
You must be signed in to change notification settings - Fork 176
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
Set DOTNET_ENVIRONMENT
when running AppHost
#3425
Conversation
@weikanglim - When #3420 lands, I suspect I need to go through and make the importer cache conditional on these two values? Would you agree? I expect the cache key is now I will hold off on landing these changes until I can go make that fix. Also need to write some small tests to validate the value is getting set in the process environment when we launch, but wanted to get your eyes on the shape of the change. |
4b19828
to
a417b06
Compare
I realized I could include this as part of this PR without waiting for your changes, so I did that. Note the new |
@ellismg Was initially going to suggest maybe we just shouldn't cache, or that we should let it be, but the changes here don't look bad either, so I think this is an OK compromise. |
I believe VS has already removed
Does it also address this issue? |
Unsure - but that was the next issue on my list to investigate after I had made these changes, so I will know more shortly :-). |
2fee892
to
7ae719a
Compare
{DOTNET|ASPNETCORE}_ENVIRONMENT
when running AppHostDOTNET_ENVIRONMENT
when running AppHost
- Flow `DOTNET_ENVIRONMENT` into the process environment from the `.env` file when running the app host program to generate the manifest. - Use `ASPIRE_ENVIRONMENT` (when set, VS will likely remove it soon as we have decided to not introduce yet another concept) to influence `DOTNET_ENVIRONMENT` during environment creation in the VS Server RPC. - When caching manifests in the `DotNetImporter`, use the tuple of `{app-host-path, DOTNET_ENVIRONMENT}` as the cache key, instead of just the path to the manifest as the output of these manifest can depend on these values. Fixes: Azure#3233
7ae719a
to
d4f7d5a
Compare
Indeed this does - I wrote up some information on the issue based on my results with this change. |
Removed the parts of the PR concerned with setting |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSIContainer
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Flow
DOTNET_ENVIRONMENT
into the process environment from the.env
file when running the app host program to generate the manifest.Use
ASPIRE_ENVIRONMENT
(when set, VS will likely remove it soon as we have decided to not introduce yet another concept) to influenceDOTNET_ENVIRONMENT
during environment creation in the VS Server RPC.When caching manifests in the
DotNetImporter
, use the tuple of{app-host-path, DOTNET_ENVIRONMENT}
as the cache key, instead of just the path to the manifest as the output of these manifest can depend on these values.Fixes: #3233