Skip to content
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

Error earlier on azd provision #2201

Open
savannahostrowski opened this issue May 12, 2023 · 4 comments
Open

Error earlier on azd provision #2201

savannahostrowski opened this issue May 12, 2023 · 4 comments
Assignees
Labels
Milestone

Comments

@savannahostrowski
Copy link

savannahostrowski commented May 12, 2023

When running azd up, I ran into a "Sorry we are experiencing high demand" error for Cosmos.

image

I saw that the provisioning of Cosmos failed minutes before the command errored out as a whole. We should probably:

  • Try to error out earlier (and not continue to try to provision subsequent resources)
  • Better direct users on what they need to do to try again (e.g. today, we require them to remove the .azure/ and run up again...we might want a gesture like azd env delete or similar to also wipe the variables in the .env/)

Related to #191

@savannahostrowski savannahostrowski added this to the Gallium milestone May 12, 2023
@ellismg
Copy link
Member

ellismg commented May 22, 2023

Try to error out earlier (and not continue to try to provision subsequent resources)

The way this works internally is we submit a single request to ARM (deploy everything in main.bicep) and then wait for that operation to complete. We're at the mercy of ARM's behavior here. We could, however, detect when we've seen at least one error and then try to cancel (https://learn.microsoft.com/en-us/rest/api/resources/Deployments/Cancel) the inflight deployment. That cancel could speed things up here (we'd be giving up the opportunity to continue to provision infrastructure from the other parts of your app, and perhaps, find additional errors).

Better direct users on what they need to do to try again (e.g. today, we require them to remove the .azure/ and run up again...we might want a gesture like azd env delete or similar to also wipe the variables in the .env/)

Just checking - the need to delete the .env folder here is because what you want to do the location prompt again right, and that's hard to do?

I suspect what folks really want to do when they hit this error would be something like:

  1. azd down This will delete any existing infrastructure I did provision.
  2. azd env unset AZURE_LOCATION. While azd env unset or a similar command doesn't exist today, but we should probably add it? Maybe it could be spelled azd env set --delete <key> if we hated the top level now in the env namespace?
  3. azd provision This causes the bicep provider to ask you for a new value of AZURE_LOCATION and I'll pick some other place.

Understanding that (2) works is sort of a jump, but we could help guide folks down this path. You could imagine something more "first class" like azd provision --reconfigure which would give the provider a chance to ask questions like AZURE_SUBSCRIPTION_ID and AZURE_LOCATION (and in the future, AZURE_RESOURCE_GROUP) next?

@rajeshkamal5050
Copy link
Contributor

@ellismg can you update the minor message improvements we can do here?

@rajeshkamal5050
Copy link
Contributor

@ellismg @savannahostrowski adding it to the Germanium bucket. We can pull it into iterations/sprints as part of planning.

@rajeshkamal5050
Copy link
Contributor

Should be covered as part of #468

@rajeshkamal5050 rajeshkamal5050 modified the milestones: Germanium, Backlog Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants