amplify-cli
amplify-cli copied to clipboard
pre-build-function hook does not invoke on push
How did you install the Amplify CLI?
No response
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
12.0.3
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
no
Describe the bug
According to https://docs.amplify.aws/cli/project/command-hooks/#how-to-name-command-hook-scripts, amplify CLI supports hook for pre build function hooks.
When running amplify build function
this works as expected
but when running push which does also run function build does not invoke the hook
Expected behavior
run function hooks
Reproduction steps
- create sample function
- create a sample hook with a simple console log
- run
amplify function build
to verify the hook runs - then run
amplify push
observe the hook does not invoke
Project Identifier
No response
Log output
# Put your logs below this line
Additional information
No response
Before submitting, please confirm:
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
It would be great to have a fix for this. Is there a recommended workaround in the meantime?
Hi 👋 @martoncsikos
Could you confirm the version? Is that 12.0.3 or 12.10.3? Have you happened to try 12.10.2 as well?
Hi 👋 @martoncsikos
Could you confirm the version? Is that 12.0.3 or 12.10.3? Have you happened to try 12.10.2 as well?
We ended up moving away from using hooks because of this. I did a quick test now. We were on 12.8.2, this was still happening. 12.10.1 is currently the latest, I upgraded to it, still there. I also tried 12.10.2, still there.
Can you point me to what was released that was meant to fix it please?