25
25
26
26
SCYLLA_OSS = (DOCKER_HUB_SCYLLA_NAMESPACE , 'scylla' )
27
27
SCYLLA_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+)' )
29
29
30
30
SCYLLA_ENTERPRISE = (DOCKER_HUB_SCYLLA_NAMESPACE , 'scylla-enterprise' )
31
31
SCYLLA_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+)' )
33
34
34
35
CASSANDRA_ENDPOINT = 'https://dlcdn.apache.org/cassandra/'
35
36
@@ -87,7 +88,7 @@ def fetch_all_scylla_oss_rc_versions():
87
88
# Download Docker tags for repository
88
89
tags_data = fetch_docker_hub_tags (* SCYLLA_OSS )
89
90
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'
91
92
# into tuple (NUM, NUM, NUM)
92
93
rc_tags_data = filter (SCYLLA_OSS_RC_VERSION_REGEX .fullmatch , tags_data )
93
94
rc_tags_data = map (lambda e : SCYLLA_OSS_RC_VERSION_REGEX .match (
@@ -112,7 +113,9 @@ def fetch_all_scylla_oss_rc_versions():
112
113
# Filter out those RCs that are obsoleted by released stable version
113
114
rc_tags_data = filter (lambda e : (
114
115
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 ]
116
119
return rc_tags_data
117
120
118
121
@@ -144,7 +147,7 @@ def fetch_all_scylla_enterprise_rc_versions():
144
147
# Download Docker tags for repository
145
148
tags_data = fetch_docker_hub_tags (* SCYLLA_ENTERPRISE )
146
149
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'
148
151
# into tuple (YEAR, NUM, NUM)
149
152
rc_tags_data = filter (
150
153
SCYLLA_ENTERPRISE_RC_VERSION_REGEX .fullmatch , tags_data )
@@ -169,7 +172,8 @@ def fetch_all_scylla_enterprise_rc_versions():
169
172
# Filter out those RCs that are obsoleted by released stable version
170
173
rc_tags_data = filter (lambda e : (
171
174
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 ]
173
177
return rc_tags_data
174
178
175
179
0 commit comments