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
VSCode issue when running show
with no init'd project.
#2296
Comments
From the error it sounds like this was happening when an environment had not yet been created for the project (so I wonder what the behavior of |
We only run I like the idea of having it output as much info as it can; no environment isn't unlike an environment that just hasn't been deployed yet. |
Today, `azd show` is used by VS Code to get information about the current project, both the services that make it up (and information about where the code for these services is) as well as the target resources (if we can determine them) In the case where an environment didn't exist (which is hard to have happen during a normal course of action, but possible if you manually go mucking around in `.azure`) `azd show` would prompt the user if they wanted to go create an environment. This caused issues with the VS integration, since the editor would not expect `azd` to prompt in this case. `azd show` already handles the case where the infrastructure for a project has not been deployed. This change extends this behavior so that if for some reason we can not fetch the current environment, we just return information about the services that we can discover Fixes Azure#2296 Fixes Azure#851
Today, `azd show` is used by VS Code to get information about the current project, both the services that make it up (and information about where the code for these services is) as well as the target resources (if we can determine them) In the case where an environment didn't exist (which is hard to have happen during a normal course of action, but possible if you manually go mucking around in `.azure`) `azd show` would prompt the user if they wanted to go create an environment. This caused issues with the VS integration, since the editor would not expect `azd` to prompt in this case. `azd show` already handles the case where the infrastructure for a project has not been deployed. This change extends this behavior so that if for some reason we can not fetch the current environment, we just return information about the services that we can discover Fixes #2296 Fixes #851
Does this occur consistently?
Repro steps:
Action: azure-dev.views.workspace.application.resolve
Error type: 1
Error Message: Process 'azd show --no-prompt --cwd "/workspaces/openai-plu...' exited with code 1
Error: Error: loading environment: reading environment name: no default response for prompt 'Please enter a new environment name:'
Version: 0.6.0
OS: linux
OS Release: 5.4.0-1106-azure
Product: Visual Studio Code
Product Version: 1.78.2
Language: ru
Call Stack
The text was updated successfully, but these errors were encountered: