Harden Gadget deploy and drop the redundant test job - #180
kai-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?
There was a problem hiding this comment.
@tmthrgd-aligent can you re-look into this. would be so good to get this over the line for PJ
There was a problem hiding this comment.
I still don't really like this, but I guess if they just don't offer an alternative (which is pretty crap from them).
@kai-nguyen-aligent Why do we need this sleep for? It just makes all workflow runs slower even if they finish before then? Why not just up the retry limit on the next step?
| secrets: | ||
| gadget-api-token: | ||
| description: "Gadget API token" | ||
| ggt-cli-token: |
There was a problem hiding this comment.
If we make this change, we will need to be update LL and the kazillo repos as well.
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