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

[Issue] package hooks order #3855

Closed
1 task done
justinyoo opened this issue May 5, 2024 · 5 comments
Closed
1 task done

[Issue] package hooks order #3855

justinyoo opened this issue May 5, 2024 · 5 comments

Comments

@justinyoo
Copy link

Output from azd version

pwsh> azd version                                                                                                                                                                       
azd version 1.8.2 (commit 14600c7a54edac4f54397413f8638431f5c16327)

Describe the bug

Currently, both prepackage and postpackage hooks are run after the up hook and before the provisioning step.

Can we run both package hooks after the postprovision hook and before the predeploy hook so that we can apply results to the deployment step, which are taken from the provisioning?

Here's an example:

I'd like to get a URL of a provisioned resource and update a config.json of a frontend app to be deployed to Static Web App. It's not possible to update config.json because the prepackage hook occurs before the provisioning step.

As a workaround, I have to run the predeploy hook script to update the config.json file.

As long as it's a plain JSON file, it's OK. However, if we need to compile binaries, the package hooks should be run in between provisioning and deployment instead of before provisioning, which makes more sense to me.

To Reproduce

N/A

Expected behavior

I was expecting that the package step would occur after the provisioning. However, it actually occurred before the provisioning.

Environment

Information on your environment:

  • OS: Windows 11
@justinyoo
Copy link
Author

justinyoo commented May 5, 2024

The prepackage hook doesn't even get invoked if I run azd provision or azd deploy.

@rajeshkamal5050
Copy link

@justinyoo have you take a look at customizable azd up workflow.

@rajeshkamal5050 rajeshkamal5050 added this to the Backlog milestone May 10, 2024
@justinyoo
Copy link
Author

@rajeshkamal5050 Thanks for the link! I found it a few days back and applied it to mine.

Copy link
Contributor

Hi @justinyoo. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

Copy link
Contributor

Hi @justinyoo, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants