Closed nick-redfearn closed 2 days ago
Nick,
Thank you for contributing to the DVT code base. I am not clear specifically the issue you are trying to address. Our preferred approach is to first create an issue that clearly states the problem. Using that description, we should be able to write a test case that demonstrates the problem. We often do that and use that as a means of testing fixes.
Today, when an exception is raised, a non zero status code is returned. Of course the exception trace is also included. For a tool like DVT which is used primarily by programmers and database admins, returning a non zero status along with the exception trace is sufficient, I think.
Sundar Mudupalli
/gcbrun
Hi @nick-redfearn! Unit tests failed in our Cloud Build execution, could you please take a look in the error below? Tks!
__________________ ERROR collecting tests/unit/test__main.py ___________________
tests/unit/test__main.py:46: in <module>
CONFIG_RUNNER_ARGS_1 = BASE_RUNNER_ARGS | {
E TypeError: unsupported operand type(s) for |: 'dict' and 'dict'
Thanks @helensilva14 - I think its because Python 3.8 doesnt support the | operand type, oops
Ive pushed this commit, I think it should be fine now -> https://github.com/GoogleCloudPlatform/professional-services-data-validator/pull/1329/commits/15b09907da4942de06aa5e3dc7475f1d5f199bc6
/gcbrun
All good @nick-redfearn, thanks for the timely fix! Starting build again and let's see if all will pass!
/gcbrun
/gcbrun
/gcbrun
I originally started this PR with exit codes in mind, but I can see now that this is not needed.
Along the way, I added a bunch of unit test coverage to
__main__.py
. I feel like this is a useful addition for the future so I'm keeping the PR.