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

Minor fix to prevent failures of database migrations tests #156

Merged

Conversation

ptzianos
Copy link
Contributor

Stacked on top of #155

In the last couple of days the migrations test have failed locally for no apparent reason, since no code related to them has changed, the dependency versions have not changed and neither have the migrations themselves. After a little bit of digging it looks like something in the ubuntu container is causing the 'OutOrStderr' function call in the migrations inspect command to return the stderr instead of stdout which in turn causes the jq check in the migrations bash script to get an empty input instead of the JSON doc which in turn causes it to fail immediately. Changing the 'OutOrStderr' to 'OutOrStdout' ensures that the code will always output to stdout as expected or whatever is the out stream.

In the last couple of days the migrations test have failed locally for
no apparent reason, since no code related to them has changed, the
dependency versions have not changed and neither have the migrations
themselves. After a little bit of digging it looks like something in the
ubuntu container is causing the 'OutOrStderr' function call in the
migrations inspect command to return the stderr instead of stdout which
in turn causes the jq check in the migrations bash script to get an
empty input instead of the JSON doc which in turn causes it to fail
immediately. Changing the 'OutOrStderr' to 'OutOrStdout' ensures that
the code will always output to stdout as expected or whatever is the out
stream.
@ptzianos ptzianos force-pushed the ptzianos/fix-database-migrations-tests branch from 09df28a to 2cebdcf Compare April 30, 2024 12:42
@ptzianos
Copy link
Contributor Author

Raised an issue about the issue of reviewdog reporting errors in replaced lines: reviewdog/reviewdog#1725

@ptzianos ptzianos merged commit 2cebdcf into ocurity:main Apr 30, 2024
2 of 3 checks passed
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