2525
2626SCYLLA_OSS = (DOCKER_HUB_SCYLLA_NAMESPACE , 'scylla' )
2727SCYLLA_OSS_RELEASED_VERSION_REGEX = re .compile (r'(\d+)\.(\d+)\.(\d+)' )
28- SCYLLA_OSS_RC_VERSION_REGEX = re .compile (r'(\d+)\.(\d+)\.rc(\d+)' )
28+ SCYLLA_OSS_RC_VERSION_REGEX = re .compile (r'(\d+)\.(\d+)\.(?:0-)? rc(\d+)' )
2929
3030SCYLLA_ENTERPRISE = (DOCKER_HUB_SCYLLA_NAMESPACE , 'scylla-enterprise' )
3131SCYLLA_ENTERPRISE_RELEASED_VERSION_REGEX = re .compile (r'(\d{4})\.(\d+)\.(\d+)' )
32- SCYLLA_ENTERPRISE_RC_VERSION_REGEX = re .compile (r'(\d{4})\.(\d+)\.rc(\d+)' )
32+ SCYLLA_ENTERPRISE_RC_VERSION_REGEX = re .compile (
33+ r'(\d{4})\.(\d+)\.(?:0-)?rc(\d+)' )
3334
3435CASSANDRA_ENDPOINT = 'https://dlcdn.apache.org/cassandra/'
3536
@@ -87,7 +88,7 @@ def fetch_all_scylla_oss_rc_versions():
8788 # Download Docker tags for repository
8889 tags_data = fetch_docker_hub_tags (* SCYLLA_OSS )
8990
90- # Parse only those tags which match 'NUM.NUM.rcNUM'
91+ # Parse only those tags which match 'NUM.NUM.rcNUM' or 'NUM.NUM.0-rcNUM'
9192 # into tuple (NUM, NUM, NUM)
9293 rc_tags_data = filter (SCYLLA_OSS_RC_VERSION_REGEX .fullmatch , tags_data )
9394 rc_tags_data = map (lambda e : SCYLLA_OSS_RC_VERSION_REGEX .match (
@@ -112,7 +113,9 @@ def fetch_all_scylla_oss_rc_versions():
112113 # Filter out those RCs that are obsoleted by released stable version
113114 rc_tags_data = filter (lambda e : (
114115 e [0 ], e [1 ]) not in stable_tags_data , rc_tags_data )
115- rc_tags_data = [f'{ e [0 ]} .{ e [1 ]} .rc{ e [2 ]} ' for e in rc_tags_data ]
116+ rc_tags_data = [
117+ f'{ e [0 ]} .{ e [1 ]} .0-rc{ e [2 ]} ' if (e [0 ], e [1 ]) >= (5 , 1 ) else
118+ f'{ e [0 ]} .{ e [1 ]} .rc{ e [2 ]} ' for e in rc_tags_data ]
116119 return rc_tags_data
117120
118121
@@ -144,7 +147,7 @@ def fetch_all_scylla_enterprise_rc_versions():
144147 # Download Docker tags for repository
145148 tags_data = fetch_docker_hub_tags (* SCYLLA_ENTERPRISE )
146149
147- # Parse only those tags which match 'YEAR.NUM.rcNUM'
150+ # Parse only those tags which match 'YEAR.NUM.rcNUM' or 'YEAR.NUM.0-rcNUM'
148151 # into tuple (YEAR, NUM, NUM)
149152 rc_tags_data = filter (
150153 SCYLLA_ENTERPRISE_RC_VERSION_REGEX .fullmatch , tags_data )
@@ -169,7 +172,8 @@ def fetch_all_scylla_enterprise_rc_versions():
169172 # Filter out those RCs that are obsoleted by released stable version
170173 rc_tags_data = filter (lambda e : (
171174 e [0 ], e [1 ]) not in stable_tags_data , rc_tags_data )
172- rc_tags_data = [f'{ e [0 ]} .{ e [1 ]} .rc{ e [2 ]} ' for e in rc_tags_data ]
175+ rc_tags_data = [f'{ e [0 ]} .{ e [1 ]} .0-rc{ e [2 ]} ' if (e [0 ], e [1 ]) >=
176+ (2022 , 2 ) else f'{ e [0 ]} .{ e [1 ]} .rc{ e [2 ]} ' for e in rc_tags_data ]
173177 return rc_tags_data
174178
175179
0 commit comments