Skip to content
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

#150 wait for Pantheon deployment #395

Merged
merged 5 commits into from
Feb 15, 2024

Conversation

beto-aveiga
Copy link
Collaborator

@beto-aveiga beto-aveiga commented Feb 5, 2024

Description

Improves the waiting mechanism after a deployment to Pantheon.

  • Waits up to 5 minutes; otherwise, exits with an error.
  • Exits with an error if the state differs from pending or succeeded.
  • When the status is succeeded, the script continues as usual.

Related issue

#159

@github-actions github-actions bot temporarily deployed to pantheon-pr-395 February 5, 2024 17:01 Destroyed
@beto-aveiga beto-aveiga force-pushed the 159-replace-sleep-30-with-terminus-wait branch from b55e475 to c855884 Compare February 5, 2024 18:03
@github-actions github-actions bot temporarily deployed to pantheon-pr-395 February 5, 2024 18:06 Destroyed
@beto-aveiga
Copy link
Collaborator Author

I have yet to test this with a deployment.
Would you provide me quick feedback on how you usually test this?
Thanks!

@justafish @mrdavidburns

@mrdavidburns
Copy link
Member

@beto-aveiga I believe we have the Test GitHub Actions workflow doing this for us.

Here's an example build that passed where it builds and pushes to Pantheon MultiDev.
https://github.com/Lullabot/drainpipe/actions/runs/7831957935/job/21373672972#step:15:1

We may still want to check out this branch on a project where we've had this job flaky failing due to MultiDev timeouts. Ping me in Slack and I'll let you know which project that is.

Copy link
Member

@deviantintegral deviantintegral left a comment

Choose a reason for hiding this comment

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

Please see my comment at #159 (comment) as this is still fragile if deployments take longer than 5 minutes. Terminus has a plugin command we can use that handles all of the waiting and retry logic for us.

@beto-aveiga
Copy link
Collaborator Author

Please see my comment at #159 (comment) as this is still fragile if deployments take longer than 5 minutes. Terminus has a plugin command we can use that handles all of the waiting and retry logic for us.

I will work on it. Thanks!

@github-actions github-actions bot temporarily deployed to pantheon-pr-395 February 14, 2024 20:42 Destroyed
@mrdavidburns
Copy link
Member

mrdavidburns commented Feb 14, 2024

Looks like the version of Drush we're running might not have the command that @deviantintegral suggested.

  There are no commands defined in the "build:workflow" namespace.  


Failed to execute command terminus build:workflow:wait ***: exit status 1

Nevermind! It looks like we would get this command when terminus-build-tools extension gets added as @deviantintegral mentioned in the comment.

# Install build tools for features like waiting on workflows.
# Setting XDEBUG_MODE=off can be removed once the March 2023 release of ddev is
# out.
RUN sudo -u $username /bin/sh -c 'XDEBUG_MODE=off terminus self:plugin:install terminus-build-tools-plugin'

@github-actions github-actions bot temporarily deployed to pantheon-pr-395 February 14, 2024 22:56 Destroyed
@github-actions github-actions bot temporarily deployed to pantheon-pr-395 February 15, 2024 11:26 Destroyed
@justafish justafish marked this pull request as ready for review February 15, 2024 11:29
@justafish justafish merged commit b971ae6 into main Feb 15, 2024
24 of 27 checks passed
@justafish justafish deleted the 159-replace-sleep-30-with-terminus-wait branch February 15, 2024 11:29
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.

4 participants