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

Bring python 3.13 into integration tests #363

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dkropachev
Copy link
Collaborator

@dkropachev dkropachev commented Aug 9, 2024

It is resurrection of #336
Brings python 3.13 to the integration tests.
Updates scylla to 5.4 and switches from gabrielfalcao/pyenv-action@v16 to actions/setup-python@v5

@dkropachev dkropachev marked this pull request as ready for review August 9, 2024 14:15
@dkropachev dkropachev requested review from Lorak-mmk, fruch and sylwiaszunejko and removed request for Lorak-mmk August 9, 2024 14:15
.github/workflows/integration-tests.yml Outdated Show resolved Hide resolved
Copy link

@Lorak-mmk Lorak-mmk left a comment

Choose a reason for hiding this comment

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

Nit: it is a good practice to have all commits passing tests. IIUC the first commit changes used Scylla version, which breaks some tests, and subsequent commits fix this breakage. If this is true, then could you move first commit to be the last? That would keep all commits passing.

.github/workflows/integration-tests.yml Outdated Show resolved Hide resolved
tests/integration/__init__.py Outdated Show resolved Hide resolved
tests/integration/standard/test_metadata.py Outdated Show resolved Hide resolved
tests/integration/standard/test_metadata.py Outdated Show resolved Hide resolved
tests/integration/standard/test_cluster.py Outdated Show resolved Hide resolved
@mykaul
Copy link

mykaul commented Aug 13, 2024

I've read somewhere that 3.13 optionally / experimentally removes the GIL. Would be good to test without it, to see where we are at.

so far the code assumed view can be name like:
```python
possible_names = [name, f'values({name})']
```

we have now one more option, that need to be considered:
```python
f'keys({name})'
```
some test that was marked with @xfail_scylla, are now passing
with newer release, i.e. some issue were fixed.

so this new decorator can xfail up to a certion scylla_version

note that it support both a oss version, and enterprise version
at some point scylla started validation of the arguments to compaction
and newer versions rejects the values passed from this test

chnaged it to something within the values expected
test is failing with the following:
```
cassandra.InvalidRequest: Error from server: code=2200 [Invalid query]
message="Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY"
```

seems like scylla doesn't support ordering by clustering keys

Ref: scylladb#343
since we want to start test the alpha/beta version of python
refactoring a bit the integration test workflow

the action for pyenv we are using isn't really getting updates
too much, and trying to switch back to the offical use python action
that can now have prerelease python versions
@dkropachev
Copy link
Collaborator Author

I've read somewhere that 3.13 optionally / experimentally removes the GIL. Would be good to test without it, to see where we are at.

#370

@dkropachev
Copy link
Collaborator Author

dkropachev commented Aug 16, 2024

Nit: it is a good practice to have all commits passing tests. IIUC the first commit changes used Scylla version, which breaks some tests, and subsequent commits fix this breakage. If this is true, then could you move first commit to be the last? That would keep all commits passing.

It is good idea, but, reality is that full test suit takes 30 minutes to complete, say you have 5 commits, it means that I have to spend 150 minutes on testing them.
Now, say I want to change something in the partilar commit, I have to go back to the commit I am changing, spend 30 minutes on testing it and, if code I have changed is not isolated, I have retest every commit that goes after it, does it worth it ? I think no

@Lorak-mmk
Copy link

Sure, it is not practical to run integration tests on each commit right now, because they take too long. But:

  • imo it is still worth it to try and have commits without braking tests - it makes it easier to read such commits and if there is a need to bisect something, there will be less fixing to do (even if there still is some fixing)
  • running unit tests will catch a lot of problems and is much faster.

Copy link

@Lorak-mmk Lorak-mmk left a comment

Choose a reason for hiding this comment

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

Note for the future: if you resolved an issue pointed by the comment, please mark the comment as resolved.

Comment on lines +408 to +409
if not isinstance(ent_scylla_version, (tuple, list)):
ent_scylla_version = (ent_scylla_version,)

Choose a reason for hiding this comment

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

What are possible forms of ent_scylla_version? You only pass it in a way that is obvious, e.g. '2023.1', but this code can also hold a tuple of tuple and a list - why?

Comment on lines +411 to +412
ent_scylla_version = [Version(v) for v in ent_scylla_version]

Choose a reason for hiding this comment

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

I'll write my comments as I try to understand this function - hopefully it will be at least a bit helpful with improving comments / changing code.

So here either ent_scylla_version was (tuple, list) - so this will be a [Version(tuple), Version(list)], or it was changed to 1-element tuple, so it will be Version(tuple)- I assume this is the case for passing a string like2023.1`, but I don't get what first variant is for. Why do we have an array of versions???

Choose a reason for hiding this comment

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

Actually it looks like Version only accepts string / bytes:

>>> from packaging.version import Version
>>> repr(Version((1, 2, 3)))

so I have no idea what the first variant is supposed to do, as it passes tuple and list to Version

Comment on lines +413 to +419
# Enterprise releases are tricky, here are the rules:
# 1. If something is fixed in `a.b.c` it is also fixed in `a.b.d` where c < d
# 2. If something is fixed in `a.1.1` it is also fixed in `c.d.f` where Version(a.b.1) < Version(`c.d.f`)
# To make version matching work properly of enterprise we need to have a first major version (`x.1.1`) where it was fixed, in addition to exact version.
for ent_v in ent_scylla_version:
if ent_v.minor in (1,0) and ent_v.micro in (1,0):
first_major = ent_v

Choose a reason for hiding this comment

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

I'm not sure I get point 2. The variable b appear without conext and I don't know how to understand it and how to quantify it.
If we quantify it existentially (If something is fixed in a.1.1 then it is also fixed in c.d.f if exists b such that Version(a.b.1) < Version(c.d.f)) it implies that if something is fixed in 2023.1.1 then it is also fixed in 2023.0.2 - because there exists such b (0) that Version(2023.b.1) < Version(2023.0.2).

If we quantify it universally (If something is fixed in a.1.1 then it is also fixed in c.d.f if for all b Version(a.b.1) < Version(c.d.f)) that means that if something is fixed in 2023.1.1 then it is not fixed in 2023.2.1. Why? Point 1 doesn't apply as minor versions don't match, and for b>=2 it is not true that Version(2023.b.1) < Version(2023.2.1)

Neither of those variants sounds probable.

Copy link

@Lorak-mmk Lorak-mmk left a comment

Choose a reason for hiding this comment

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

One more thing regarding comment tests/integration: introduced @xfail_scylla_version : commit message mentions xfail_scylla_version instead of xfail_scylla_version_lt

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