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

refactor: wrap drush commands in error capture #3542

Merged
merged 1 commit into from
Sep 11, 2023
Merged

Conversation

shreddedbacon
Copy link
Member

@shreddedbacon shreddedbacon commented Sep 7, 2023

Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for inclusion in changelog

If the drush command fails, tasks still shows as complete. This wraps the drush commands in a statement to capture the errors so that tasks are marked as failed properly. It doesn't address the whole failure cases though as it could fail generating the token, and also during the file upload step. Lagoon CLI has a possible solution to handling the tokengeneration and file upload steps using uselagoon/lagoon-cli#275, as it would capture errors in both the generation and upload steps

closes #3541

@shreddedbacon shreddedbacon marked this pull request as ready for review September 10, 2023 22:49
Copy link
Member

@tobybellwood tobybellwood left a comment

Choose a reason for hiding this comment

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

makes sense

@tobybellwood tobybellwood merged commit afc5996 into main Sep 11, 2023
@tobybellwood tobybellwood deleted the better-task-errors branch September 11, 2023 00:16
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.

Lagoon sql-dump task should inherit the exit code of the drush command
2 participants