Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
402 stars 195 forks source link

Finalize `azd package` design #2079

Open weikanglim opened 1 year ago

weikanglim commented 1 year ago

Note: azd package is currently a beta feature. This issue is created to capture the current design and remaining items.

Current

We've added a barebones azd package command, this has served two purposes:

  1. Allow users to iterate locally by running azd package to ensure that the service projects can be built and packaged.
  2. Allow users to have a better azd up experience. The local build will fail immediately before proceeding with Azure state changes.

Remaining items

  1. Allow users to run azd package and examine the packaged outputs easily. An example of this perhaps is to not archive artifacts until we need to, since it's easier for users to not have to deal with unzipping archives.
  2. Allow users to upload packaged artifacts in CD. Once again, archiving here may hinder the artifacts tooling ability to provide better UX experiences to examine files uploaded.
  3. Ensure that azd deploy --from-package <pkg_folder> works correctly with these changes. Note that it should be possible for azd deploy --from-package to reject a folder that isn't packaged correctly (i.e., incorrect host, or not a valid understood azd artifact).
  4. With the requirements above, we would need to package the service into a stable location. We would need to ensure that proper checks are in-place to retain idempotency requirements (clean + rebuild comes to mind, which is the current behavior when writing to temp).

Questions

  1. How do artifacts like docker image show up with the proposed designs?
  2. What would future artifacts look like? Do these designs work well with future considerations?
weikanglim commented 1 year ago

One thing we possibly want to think about: Ideally, azd is designed with correct dependency management in-mind, and azd deploy --from-package would not require validation of a project folder amongst other things. See #1957

savannahostrowski commented 1 year ago

@rajeshkamal5050 Not sure that we are going to get to this in Gallium. Should we move to Germanium? Backlog?

rajeshkamal5050 commented 1 year ago

Moving this to Backlog. Since we have other big ticket items to handle. Any improvements to build/packaging areas can be handled based on users feedback/concerns.

savannahostrowski commented 1 year ago

Consider https://github.com/Azure/azure-dev/issues/1698 and https://github.com/Azure/azure-dev/issues/1810 via azd package