Open weikanglim opened 4 months ago
Based on your example and comment it looks like in this scenario step 1 should actually be a package step and not build? If they are just validating that everything builds then that seems appropriate to me.
This is the current/expected behavior that deploy api
should use the package generated in step 1 rather than re-package the application.
azd
currently stores and reuses implicit caching when runningazd up
. Consider a workflow that looks like:In this scenario,
deploy api
will actually reuse the prepackaged results from step 1 and fail to observe the app settings change due to implicit state being cached and reused across the execution.Caching was originally done so that
azd deploy
would reuse results fromazd package
if invoked in a single command execution. Now thatup
is also exposed as a workflow, this type of caching can start leading to unintended consequences.I also wonder if we should revisit how
azd up
does packaging first in the default flow. With provision caching, rerunningazd up
when provision succeeds will only incur the cost of state checking. The model that we have personally feels unnatural to what a user expects.