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

Ensure CI workflow fails when psql restore encounters an error #5465

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

ethax-ross
Copy link
Collaborator

@ethax-ross ethax-ross commented Jan 22, 2025

Jira-3954

Context

We have an issue with our snapsort restore workflow whereby if the psql operation errors it will continue and the workflow will succeed, even though it was not successful.

We want to fail the workflow if the restore has errors.

Changes proposed in this pull request

  • Ensure CI workflow fails when psql restore encounters an error

We can do this by passing the ON_ERROR_STOP flag.

Guidance to review

I ran the restore a couple of times off this branch and it was successful, I haven't been able to trigger an error - its something I think we'll just need to keep an eye out for after its merged to ensure its behaving as expected.

Currently, if `psql` encounters an error when restoring the database it will continue with the rest of the restore operation. Instead, we want it to stop and return an exit code that will trigger the workflow to fail. We can do this by passing the `ON_ERROR_STOP` flag.
Copy link

Review app deployed to https://cpd-ecf-review-5465-web.test.teacherservices.cloud

@ethax-ross ethax-ross marked this pull request as ready for review January 22, 2025 13:34
@ethax-ross ethax-ross requested a review from a team January 22, 2025 13:34
Copy link
Contributor

@leandroalemao leandroalemao left a comment

Choose a reason for hiding this comment

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

Hi @ethax-ross Ran the action and saw no errors.. so after merging this.. let's keep an eye out to ensure its behaving as expected.. as you said. tks

@ethax-ross ethax-ross added this pull request to the merge queue Jan 27, 2025
Merged via the queue into main with commit de9170a Jan 27, 2025
39 checks passed
@ethax-ross ethax-ross deleted the 3954-fail-ci-when-restore-fails branch January 27, 2025 10:45
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