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

get_relocatable_s3_url: support :debug suffix in s3_version #608

Closed

Conversation

bhalevy
Copy link
Member

@bhalevy bhalevy commented Sep 12, 2024

Following up on 7721ac7 the :debug suffix may end up in s3_version
when passed to get_relocatable_s3_url.

Comment on lines 181 to 182
if s3_version.endswith(":debug"):
s3_version = s3_version[:-6]
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
if s3_version.endswith(":debug"):
s3_version = s3_version[:-6]
debug_tag = ':debug'
if s3_version.endswith(debug_tag):
s3_version = s3_version[:-len(debug_tag)]

also python 3.9 and up, has: https://docs.python.org/3.9/library/stdtypes.html?highlight=removeprefix#str.removesuffix
but we'll need first deprecate 3.8 in ccm, python-driver still support 3.8, so it would need ccm to support it as well.

Following up on 7721ac7
the :debug suffix may end up in s3_version
when passed to get_relocatable_s3_url.

Signed-off-by: Benny Halevy <[email protected]>
@bhalevy bhalevy force-pushed the get_relocatable_s3_url-debug-mode branch from b3c3be7 to e1cd93a Compare September 12, 2024 09:32
@bhalevy
Copy link
Member Author

bhalevy commented Sep 12, 2024

@cezarmoise
Copy link
Contributor

If get_relocatable_s3_url called from somewhere else other that the setup function? Another repo?
I don't understand how the :debug suffix gets there.

@bhalevy
Copy link
Member Author

bhalevy commented Sep 12, 2024

If get_relocatable_s3_url called from somewhere else other that the setup function? Another repo? I don't understand how the :debug suffix gets there.

(dtest-3.12.3) bhalevy@lt scylla-dtest$ pytest --scylla-version=unstable/master:latest:debug --tablets materialized_views_test.py::TestMaterializedViews::test_mv_resurrected_rows_after_decommission_interrupt
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/bhalevy/.pyenv/versions/3.12.3/envs/dtest-3.12.3/lib/python3.12/site-packages/_pytest/main.py", line 268, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>   File "/home/bhalevy/.pyenv/versions/3.12.3/envs/dtest-3.12.3/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__
INTERNALERROR>     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/home/bhalevy/.pyenv/versions/3.12.3/envs/dtest-3.12.3/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/home/bhalevy/.pyenv/versions/3.12.3/envs/dtest-3.12.3/lib/python3.12/site-packages/pluggy/_callers.py", line 182, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/home/bhalevy/.pyenv/versions/3.12.3/envs/dtest-3.12.3/lib/python3.12/site-packages/pluggy/_result.py", line 100, in get_result
INTERNALERROR>     raise exc.with_traceback(exc.__traceback__)
INTERNALERROR>   File "/home/bhalevy/.pyenv/versions/3.12.3/envs/dtest-3.12.3/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>           ^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/home/bhalevy/dev/scylla-dtest/conftest.py", line 359, in pytest_sessionstart
INTERNALERROR>     _scylla_mode = scylla_mode(cassandra_dir, scylla_version)
INTERNALERROR>                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/home/bhalevy/dev/scylla-dtest/tools/marks.py", line 57, in scylla_mode
INTERNALERROR>     return dtest_config.get_scylla_mode()
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/home/bhalevy/dev/scylla-dtest/dtest_config.py", line 90, in get_scylla_mode
INTERNALERROR>     ccm_repo_cache_dir, _ = ccmlib.scylla_repository.setup(self.scylla_version)
INTERNALERROR>                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/home/bhalevy/.pyenv/versions/3.12.3/envs/dtest-3.12.3/lib/python3.12/site-packages/ccmlib/scylla_repository.py", line 276, in setup
INTERNALERROR>     s3_url = get_relocatable_s3_url(branch, s3_version, RELOCATABLE_URLS_BASE)
INTERNALERROR>              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/home/bhalevy/.pyenv/versions/3.12.3/envs/dtest-3.12.3/lib/python3.12/site-packages/ccmlib/scylla_repository.py", line 186, in get_relocatable_s3_url
INTERNALERROR>     raise CCMError(f"s3 url was not found for {branch}:{s3_version}")
INTERNALERROR> ccmlib.common.CCMError: s3 url was not found for master:latest:debug

@fruch
Copy link
Contributor

fruch commented Sep 12, 2024

@bhalevy

which branch of ccm you faced this ? @cezarmoise has a point.

I think you might be using old installed version inside your env

try installing ccm like:

pip install ../scylla-ccm -e

@bhalevy
Copy link
Member Author

bhalevy commented Sep 12, 2024

@bhalevy

which branch of ccm you faced this ? @cezarmoise has a point.

I think you might be using old installed version inside your env

try installing ccm like:

pip install ../scylla-ccm -e

Hmm, maybe I made a pilot error.
I now fail to reproduce this with 7721ac7.
So closing the PR. Sorry about the noise

@bhalevy bhalevy closed this Sep 12, 2024
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.

3 participants