-
Notifications
You must be signed in to change notification settings - Fork 171
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
POC: Adds azd hooks run <name>
command
#2385
Conversation
/cc @Austinauth from the UX side (I think this is basically following most of the conventions you have laid out for us, but the explanation about what the command is doing having context specific information and color in it is a little new (it also looks like some of the intermediate text is a different color than it should be) and @savannahostrowski from the product side. I'm a little nervous about having an I also wonder if in practice Very happy to see we are investing in making these hooks a little easier to write and maintain! Thanks for kicking this off, @wbreza! |
Outside the color to show the significance of hook name and environment it is using our standard header
I'm open to this but hesitant that users would expect something else to make it under
We see many template authors creating templates and specifying both Since you can run new powershell and bash across all platforms this allows devs to easily test out their scripts without having to update their azure.yaml configuration assuming you're not using any real OS/platform scripting.
😊 |
Adding my 5-cents here... I don't think (and I am against) that azd should expose a command to run the hooks. Here's why I think like that: |
Thanks for the tag, I'm not seeing any glaring issues. In the future I think we'll want to be more consistent with the items we highlight in blue vs the ones we do not. That's on me. Agree with @ellismg's observation the text |
I've been thinking about this over the past couple days...and I think I'm in the same camp as @vhvb1989 right now in terms of "developers have the tools/means to do this today". I'm not sure that we have enough of a signal to warrant exposing a new command for this quite yet. |
There have been many instances of the need for being able to "just run the hook and have the azd env context" when working on the open ai and build related demos. Today we have to manually load the azd context into the script because we don't support running the hooks. Here are the related issues I filed while working with those customers: This is especially helpful for folks that just want to run the hook for ML purposes. Right now, we have to tell them to go a completely different route, which is something like "open a terminal, load the azd env values, pass right parameters to the hook, run the hook". With this feature, we'd be able to tell them to run "azd hooks run postprovision". |
I think those are viable scenarios but these are all self-filed issues. I'd love to hear more from the community, partner teams etc. before exposing this as a new command. If these were coming from teams you've been chatting with, can you tag them for further input/point them in my direction? |
This brings a good and powerful feature for the customers and use-cases you have mentioned @jongio , but at the same time it opens the door to more questions and future issues, like:
I can see a next request in the future to make azd to create mocked-operations to be used by the hooks, so I can run/tests the hooks with fake azd-execution... Anyway, I think azd should not be the one used to evolve the story arounds hooks... I think there should be a different tool for that matter, like a hooks-studio or something :) |
I see this feature very similar to npm scripts with run-script command There are well known scripts/hooks that run during lifecycle events of an NPM based application but it is also extensible to allow the user to run arbitrary user defined scripts/hooks that help them with their day to day development. It would be an oversight to not think about the development of an overall solution and how they got to their final deployable product. Having a nice set of hooks/scripts that the user wants to use should not be ignored. |
There's a slight difference here that npm scripts are largely stateless. azd |
In many cases hook scripts would be stateless. The env state usage is optional and only there if you need it. |
As @jongio brought that to my attention here my 5 cent: This functionality makes total sense to me especially for development and testing of the hooks (I would use them especially for hooks after infrastructure setup- that saves precious time). |
Waiting for more customer feedback before exploring this feature. |
Reopening. Please see above comments from Christian. I also created a video that demonstrates why this feature is helpful. https://www.youtube.com/watch?v=8TBlgIvyL-0&ab_channel=JonGallant |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSIContainer
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
azd hooks run <name>
commandazd hooks run <name>
command
Hi @wbreza. Thank you for your interest in helping to improve the Azure Developer CLI experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
1 similar comment
Hi @wbreza. Thank you for your interest in helping to improve the Azure Developer CLI experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
Hi @wbreza. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing "/reopen" if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the "no-recent-activity" label; otherwise, this is likely to be closed again with the next cleanup pass. |
/reopen |
POC that Adds
azd hooks run <name>
command to help develop, test and run hooks for an azd project & services.Resolves #1642
Features
Example
Dev wants to validate their deployment to run a series of UX smoke test across their services
vaildate
hook in each service that they want to test. These tests could run playwright or some other UX test frameworkpostdeploy
hook that callsazd hooks run validate
validate
hook would run for each service after deployment completesazd hooks run validate
at any time.Docs and Parameters
Output