Skip to content

Commit 7eda3e9

Browse files
dkropachevclaude
andcommitted
Add hotfix relocatable URL support
Add support for `hotfix/<name>:<date>` version strings in scylla_repository.setup(), enabling installation of hotfix relocatable packages hosted at downloads.scylladb.com/hotfix/<name>/relocatable/<date>/. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5392dd6 commit 7eda3e9

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

ccmlib/scylla_repository.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
'https://s3.amazonaws.com/downloads.scylladb.com/enterprise/relocatable/unstable/{0}/{1}']
3737
RELEASE_RELOCATABLE_URLS_BASE = ['https://s3.amazonaws.com/downloads.scylladb.com/downloads/scylla/relocatable/scylladb-{1}',
3838
'https://s3.amazonaws.com/downloads.scylladb.com/downloads/scylla-enterprise/relocatable/scylladb-{1}']
39+
HOTFIX_RELOCATABLE_URLS_BASE = ['https://s3.amazonaws.com/downloads.scylladb.com/hotfix/{0}/relocatable/{1}']
3940

4041

4142
def run(cmd, cwd=None):
@@ -282,8 +283,11 @@ def setup(version, verbose=True, skip_downloads=False):
282283

283284
packages, type_n_version[1] = release_packages(s3_url=s3_url, version=s3_version, arch=scylla_arch, scylla_product=scylla_product + scylla_mode_suffix)
284285
else:
285-
_, branch = type_n_version[0].split("/")
286-
s3_url = get_relocatable_s3_url(branch, s3_version, RELOCATABLE_URLS_BASE)
286+
type_prefix, branch = type_n_version[0].split("/", 1)
287+
if type_prefix == 'hotfix':
288+
s3_url = get_relocatable_s3_url(branch, s3_version, HOTFIX_RELOCATABLE_URLS_BASE)
289+
else:
290+
s3_url = get_relocatable_s3_url(branch, s3_version, RELOCATABLE_URLS_BASE)
287291

288292
try:
289293
build_manifest = read_build_manifest(s3_url)

tests/test_scylla_repository.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,17 @@ def test_setup_unstable_enterprise_new_url(self, version, expected_cdir, scylla_
145145
assert re.sub(":", "_", expected_cdir) in cdir
146146
assert packages.scylla_unified_package == f'http://s3.amazonaws.com/downloads.scylladb.com/unstable/scylla-enterprise/enterprise/relocatable/{expected_cdir}/scylla-enterprise{"-debug" if scylla_debug else ""}-unified-2023.3.0~dev-0.20230910.4629201aceec.x86_64.tar.gz'
147147

148+
@pytest.mark.repo_tests
149+
class TestScyllaRepositoryHotfix:
150+
@pytest.mark.parametrize(argnames=['version', 'expected_cdir'], argvalues=[
151+
("hotfix/privateLinkTest.v.0.0.12:2026-01-30T23:27:33Z", "hotfix/privateLinkTest.v.0.0.12/2026-01-30T23_27_33Z"),
152+
])
153+
def test_setup_hotfix(self, version, expected_cdir):
154+
cdir, packages = scylla_setup(version=version, verbose=True, skip_downloads=True)
155+
assert expected_cdir in cdir
156+
assert packages.scylla_unified_package or packages.scylla_package
157+
158+
148159
class TestReinstallPackages:
149160
@staticmethod
150161
def corrupt_hash_value(source_file):

0 commit comments

Comments
 (0)