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

azd up behaviour is not as documented #2853

Closed
CMeeg opened this issue Oct 7, 2023 · 4 comments
Closed

azd up behaviour is not as documented #2853

CMeeg opened this issue Oct 7, 2023 · 4 comments
Assignees
Labels
command core customer-reported identify a customer issue documentation Improvements or additions to documentation question
Milestone

Comments

@CMeeg
Copy link

CMeeg commented Oct 7, 2023

Describe the bug
The docs describe azd up as: "You can run azd up to perform both azd provision and azd deploy in a single step".

When I run azd up it seems to run azd package before it runs azd provision though, which is not what I was expecting based on the documentation, and does not work if the outputs from azd provision are required as inputs to your azd package/azd deploy step as is the case for the template I have been developing.

It would be good if the behaviour of azd up aligned with the documentation or that azd package was run after azd provision when running azd up. It seems like packaging after the infrastructure is provisioned would make sense i.e. provision -> package -> deploy.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the CMeeg/nextjs-aca template repo
  2. Open the repo in a new Codespace
  3. In the Codespace Terminal, run:
    • npm i
    • npm run env:init
    • azd auth login
    • azd up
  4. See error

Expected behavior
I expected azd up to run azd provision before azd package (or not run azd package at all).

If you run azd provision then azd deploy in sequence both commands will succeed, which is how the documentation describes the behaviour of azd up . You can then run azd down as normal to delete the resources from Azure.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10 (in my local development environment), Linux (in GitHub Codespaces)
  • Browser: N/A
  • Version: N/A

Smartphone (please complete the following information):

  • Device: N/A
  • OS: N/A
  • Browser: N/A
  • Version: N/A

Additional context
Add any other context about the problem here.

@savannahostrowski savannahostrowski transferred this issue from Azure/awesome-azd Oct 10, 2023
@savannahostrowski
Copy link
Contributor

savannahostrowski commented Oct 10, 2023

Transferred this issue as this relates to #2850 (ongoing convos about this experience). We will need to think about documentation implications here as well - @gkulin to update in the meantime

Today, azd calls package before provision and deploy as part of azd up. However, if you were to call azd deploy on its own, it'd inherently call package ahead of deploy.

@CMeeg
Copy link
Author

CMeeg commented Oct 11, 2023

Sorry - I totally logged this issue on the wrong repo so thank you for moving it over!

That makes sense and I assumed azd deploy ran azd package, but didn't see that confirmed in the docs.

It seems then that if azd up is supposed to be a shortcut for azd provision -> azd deploy, but azd deploy is itself a shortcut for azd package -> azd deploy, that azd up would make more sense if it ran azd provision -> azd package -> azd deploy.

Appreciate I'm probably missing a lot of context on why it currently works as it does though!

I will read through the linked issue as well - thanks for that - and I will try to log to the right repo if there's a next time!

@savannahostrowski
Copy link
Contributor

Yeah - the scenario we were trying to unblock by moving package before provision in up is the case where folks might be generating their infrastructure as code. Unfortunately, this can break the workflow for other scenarios. I'm hoping we can introduce some extensibility in the near term that will make it so that everyone can use azd up (#2850)

@wbreza wbreza self-assigned this Oct 11, 2023
@rajeshkamal5050 rajeshkamal5050 added documentation Improvements or additions to documentation command core labels Oct 16, 2023
@wbreza wbreza linked a pull request Nov 14, 2023 that will close this issue
@rajeshkamal5050
Copy link

Closing this as a duplicate of #2850(ability to customize the azd up)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command core customer-reported identify a customer issue documentation Improvements or additions to documentation question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants