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

scylla_repository: setup: allow debug in version string #598

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

cezarmoise
Copy link
Contributor

Add support for optional [:debug] flag following the version string to specify debug mode.

Closes: #590
Follow-up on: #591, simple version of that. Just check for the debug flag, and if it exists, add "-debug" where appropiate.

Tested locally

➜ pytest -s --scylla-version='unstable/master:latest:debug' --tablets  materialized_views_test.py::TestMaterializedViews::test_do_not_finish_view_building_with_hints
S3 download: scylla-debug-unified-6.2.0~dev-0.20240816.afee3924b3dc.x86_64.tar.gz100%|██████████| 245M/245M [00:11<00:00, 21.7MB/s]
Extracting /tmp/ccm-nfwvr5ro.tar.gz (http://s3.amazonaws.com/downloads.scylladb.com/unstable/scylla/master/relocatable/2024-08-16T01:33:28Z/scylla-debug-unified-6.2.0~dev-0.20240816.afee3924b3dc.x86_64.tar.gz, /tmp/tmprl4krzl2) as version unstable/master/latest-debug ...
Relocatable package format version 3.0 detected.
Completed to install Scylla in the folder '/home/cezar/.ccm/scylla-repository/unstable/master/latest-debug'

Comment on lines 252 to 254
scylla_debug = version.split(':')[-1] == "debug"
if scylla_debug:
version = version[:-6]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the debug flag is found, remove if from the version string to the rest of the logic in the function is not impacted

else:
_, branch = type_n_version[0].split("/")
s3_url = get_relocatable_s3_url(branch, s3_version, RELOCATABLE_URLS_BASE)

try:
build_manifest = read_build_manifest(s3_url)
url = build_manifest.get(f'unified-pack-url-{scylla_arch}')
assert url, "didn't found the url for unified package"
url = build_manifest.get(f'unified-pack-url-{scylla_arch}') or build_manifest.get('unified-pack-url')
Copy link

Choose a reason for hiding this comment

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

Can something simlar be used for debug as well? I would like that better than replacing it in the final URL

Copy link
Member

Choose a reason for hiding this comment

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

cc @fruch ☝️

ccmlib/scylla_repository.py Outdated Show resolved Hide resolved
@fruch
Copy link
Contributor

fruch commented Aug 19, 2024

One thing we should take for a spin at least with gating tests (what we missed with the last PR)

@cezarmoise
Copy link
Contributor Author

One thing we should take for a spin at least with gating tests (what we missed with the last PR)

https://jenkins.scylladb.com/view/master/job/scylla-master/job/byo/job/dtest-byo/550/
https://jenkins.scylladb.com/view/master/job/scylla-master/job/byo/job/dtest-byo/551/

looks ok at first glance

@bhalevy
Copy link
Member

bhalevy commented Aug 20, 2024

@fruch is on PTO, @tchaikov can you please review too?

Add support for optional [:debug] flag following the version string
to specify debug mode.
@bhalevy
Copy link
Member

bhalevy commented Aug 21, 2024

One thing we should take for a spin at least with gating tests (what we missed with the last PR)

@cezarmoise did you run verify this PR with next_gating?
Link to dtest-byo job?

@bhalevy
Copy link
Member

bhalevy commented Aug 21, 2024

One thing we should take for a spin at least with gating tests (what we missed with the last PR)

@cezarmoise did you run verify this PR with next_gating? Link to dtest-byo job?

@pehala pointed me to #598 (comment)

@cezarmoise
Copy link
Contributor Author

@fruch @tchaikov ping

Copy link
Contributor

@fruch fruch left a comment

Choose a reason for hiding this comment

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

LGTM

@fruch fruch merged commit 7721ac7 into scylladb:next Sep 3, 2024
4 checks passed
@cezarmoise cezarmoise deleted the allow-download-debug branch September 3, 2024 10:24
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.

scylla_repository setup should support scylla-debug in the version format
5 participants