Skip to content

Harden Gadget deploy and drop the redundant test job - #180

Open
kai-nguyen-aligent wants to merge 1 commit into
mainfrom
feat/PJH-146-gadget-workflow-improvements
Open

Harden Gadget deploy and drop the redundant test job#180
kai-nguyen-aligent wants to merge 1 commit into
mainfrom
feat/PJH-146-gadget-workflow-improvements

Conversation

@kai-nguyen-aligent

@kai-nguyen-aligent kai-nguyen-aligent commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Description of the proposed changes

  • Add a settle-wait step and retry-on-push loop (matching the pattern already used in the PR-preview workflow) to gadget-deploy.yml's deploy job, so pushing to the freshly-created temp environment doesn't race Gadget's background file copy
  • Remove the test job, the test input, and the gadget-test-api-key secret from gadget-deploy.yml, since the job did nothing beyond invoking yarn test which is redundant.
  • Rename gadget-api-token to ggt-cli-token because they are different thing in Gadget.
  • Update docs/gadget-deploy.md and README.md to match

Notes to reviewers

  • Toggl Code: PJH-146: Code Review
  • We only have couple of projects that use Gadget and only 2 of them are using this reusable workflow so updating is easy.
  • When you've finished leaving feedback, please add a final comment to the PR tagging the author, letting them know that you have finished leaving feedback

@kai-nguyen-aligent

Copy link
Copy Markdown
Contributor Author

@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.
@jackmacaa @michael-west-aligent tag you 2 for updating yours.

- 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmthrgd-aligent Unfortunately not.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants