Harden Gadget deploy and drop the redundant test job - #180
Harden Gadget deploy and drop the redundant test job#180kai-nguyen-aligent wants to merge 1 commit into
Conversation
|
@Zigr1 @aligent-phil It would be good if you can setup your workflows to use this so we no longer need to do things in Gadget console. |
| - name: Wait for environment provisioning to settle | ||
| # `ggt env create` returns as soon as the environment record exists, but Gadget | ||
| # keeps copying files in the background. Pushing immediately can cause | ||
| # "Your environment's files have changed since we last checked." error. |
There was a problem hiding this comment.
Is there no way to make the command wait for it to be complete or some way to actually tell if it's complete? An arbitrary sleep isn't ideal.
There was a problem hiding this comment.
@tmthrgd-aligent as documented, ggt env create returns as soon as the environment record exists. It's an async command. You either wait then push in the pipeline like this or write a custom script which do the same thing. I would prefer do it in the pipeline for clarity.
There was a problem hiding this comment.
@kai-nguyen-aligent Right I get that it's async, what I'm asking is do they really not provide any way or any command, any API or any flag to actually wait for it to complete?
Description of the proposed changes
gadget-deploy.yml'sdeployjob, so pushing to the freshly-created temp environment doesn't race Gadget's background file copytestjob, thetestinput, and thegadget-test-api-keysecret fromgadget-deploy.yml, since the job did nothing beyond invokingyarn testwhich is redundant.gadget-api-tokentoggt-cli-tokenbecause they are different thing in Gadget.docs/gadget-deploy.mdandREADME.mdto matchNotes to reviewers