-
Notifications
You must be signed in to change notification settings - Fork 188
Replaced python container launcher with GHA service #85
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good % extract trino version to a constant somewhere so that it's easier to know where to change it when running tests against a different version.
2ca9253
to
2f16666
Compare
@hashhar just pushed it as a global variable in |
The global var looks good to me, I don't think we need an ENV var yet. The only reason to change the version could be to reproduce a bug with an older version or to test with a newer version. |
Does it affect running tests from an IDE like PyCharm? How? |
IDK how this would affect an IDE. The same tests are ran, but they assume that you start up a Trino container before running. So you might have an extra step, but integration test runs are way faster given that they don't have to pull down and run a container each time. Timing it locally, I got roughly a 5x improvement. # jh/test-refactor
pytest integration_tests 1.12s user 0.15s system 25% cpu 5.003 total
# master
pytest integration_tests 1.36s user 0.27s system 6% cpu 26.703 total |
In Trino we have two kinds of integrations tests
The second type of the tests is usually regarded as simple and easy to use, while the first one is regarded as hard to use and work with. Are we basically converting "unit tests" into "product tests" here? |
I see where you are going, but it's not a fair comparison. The tradeoffs are below. Pros:
Cons:
|
Hi @joshthoward, is there any way to mount trino configs (e.g catalog files) to that service? |
You can add volume mounts, but I would probably build a separate container for testing if needed. Tests should rely on TPC-H tiny if possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_eager_loading_cursor_description
will fail after rebase on upstream. Version up (351 → 355) looks unrelated for the failure, but I didn't investigate the detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good % unresolved comments.
However I do think we'll end up back at code-defined environments once we start adding integration tests for things like auth mechanisms etc. We'll think about it when we get there.
4555b15
to
ff7aa8c
Compare
GH is deciding not to accept the second half of this commit... SMH
|
ff7aa8c
to
601a08a
Compare
Turns out we'll need the ability to have programmatic integration test environments since we want to test a matrix of versions now to make sure newer clients are compatible with older ones (and different server versions). @joshthoward I'm closing this accordingly. |
Was able to remove a couple hundred lines of
integration_tests/conftest.py
by making use of GitHub Actions Service feature. I think it's cleaner with the change.