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

tests: fix scylla_version handling #282

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

fruch
Copy link

@fruch fruch commented Dec 25, 2023

test shouldn't assume SCYLLA_VERSION is an actual version and should be using ccmlib to read the actual versions strings

@fruch fruch requested review from Lorak-mmk and k0machi December 25, 2023 16:52
@@ -97,6 +98,12 @@ def get_server_versions():
return (cass_version, cql_version)


def get_scylla_version(scylla_ccm_version_string):
""" get scylla version from ccm before starting a cluster"""
ccm_repo_cache_dir, _ = ccmlib.scylla_repository.setup(version=scylla_ccm_version_string)

Choose a reason for hiding this comment

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

What actions does setup perform? Because it sounds like it actually creates a new cluster (maybewithout starting it, idk), which is quite a lot of work to just get a version.
Why is this PR necessary? Did CI fail because of this, is there some issue opened?

Copy link
Author

Choose a reason for hiding this comment

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

setup is making sure the version is downloaded and in place

It's failing at any time you don't use release:5.4

We are testing daily builds in the matrix, it was for quite some time a patch there.

Again the assumption test should only work correctly with released versions only us wrong

Choose a reason for hiding this comment

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

Are the actions performed by setup performed only once when it is called multiple times?
So if we call get_scylla_version and then some other place in the code calls setup will all this work be performed once or twice?

Copy link
Author

Choose a reason for hiding this comment

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

if the version argument stay the same, it would operate only one.
we can put a lru_cache ontop of it, if you are worried by that.

Choose a reason for hiding this comment

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

If the work is performed only once per argument then it is fine imo, no need to add any cache

@fruch
Copy link
Author

fruch commented Dec 26, 2023

Only failure is our unstable friend:

FAILED tests/integration/standard/test_udts.py::UDTTests::test_can_register_udt_before_connecting - cassandra.InvalidRequest: Error from server: code=2200 [Invalid query] message="Unknown field 'is_cool' in value of user defined type user"

@fruch fruch requested a review from Lorak-mmk February 20, 2024 11:26
@fruch
Copy link
Author

fruch commented Feb 20, 2024

@Lorak-mmk meanwhile I see that for tablet and running unstable/master version, the code has change, the PR was to address exactly that use case of using something with isn't a formal release

@Lorak-mmk
Copy link

Can you rebase? Then I'll merge

test shouldn't assume `SCYLLA_VERSION` is an actual version
and should be using ccmlib to read the actual versions strings
@fruch fruch force-pushed the fix_scylla_version_handling branch from 7530db1 to 6a88ac4 Compare February 20, 2024 14:56
@fruch
Copy link
Author

fruch commented Feb 20, 2024

Can you rebase? Then I'll merge

rebased

@Lorak-mmk Lorak-mmk merged commit 6b82872 into scylladb:master Feb 20, 2024
18 of 20 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