| status | draft |
|---|---|
| domain | framework |
| created | 2026-01-12 |
| last_updated | 2026-03-15 |
| owner | fruch |
Currently, scylla_version parameter supports:
- Simple versions:
5.2.1,2024.2.0 - Branch versions:
branch-2019.1:latest,master:latest
Need to support full version tags like: 2024.2.5-0.20250221.cb9e2a54ae6d-1
This format includes:
- Base version:
2024.2.5 - Build number:
0 - Date:
20250221 - Commit ID:
cb9e2a54ae6d - Extra suffix:
-1
- Location:
sdcm/utils/common.py - Functions:
get_scylla_ami_versions(),get_branched_ami() - Current behavior:
- Uses tag filter:
tag:scylla_versionwith version pattern matching - Supports prefix matching for versions like
4.6.4* - Branch format:
branch-name:build-id
- Uses tag filter:
- Location:
sdcm/utils/common.py - Functions:
get_scylla_gce_images_versions(),get_branched_gce_images() - Current behavior:
- Uses label filter:
labels.scylla_version - Replaces
.with-for label matching - Branch format:
branch:build-id
- Uses label filter:
- Location:
sdcm/provision/azure/utils.py - Functions:
get_scylla_images(),get_scylla_images_private_galleries() - Current behavior:
- Uses tag:
scylla_version - Supports prefix matching
- Uses
SCYLLA_VERSION_GROUPED_REfor parsing - Branch format:
branch:build-id
- Uses tag:
- Location:
sdcm/utils/version_utils.py - Functions:
get_scylla_docker_repo_from_version(),get_specific_tag_of_docker_image() - Current behavior:
- Resolves repo based on version
- For
latest, fetches specific tag from S3 - Tags format:
5.2.0-dev-0.20220829.67c91e8bcd61
Rationale: Minimal changes, leverages existing infrastructure
Implementation:
-
Update
sct_config.pyversion detection- Add detection for full version tag format
- Extract base version from full tag for lookup
- Pattern:
(?P<base_version>[\d.]+)-(?P<build>\d+)\.(?P<date>\d+)\.(?P<commit>\w+).*
-
Enhance AWS lookup (
sdcm/utils/common.py)- In
get_scylla_ami_versions():- Detect full version tag format
- Extract base version and commit ID
- Add filter for
tag:build-idortag:commit-id
- Keep backward compatibility with simple versions
- In
-
Enhance GCE lookup (
sdcm/utils/common.py)- In
get_scylla_gce_images_versions():- Parse full version tag
- Use
labels.scylla_versionwith full tag (dots→dashes) - Filter by commit hash if needed
- In
-
Enhance Azure lookup (
sdcm/provision/azure/utils.py)- In
get_scylla_images():- Already uses
SCYLLA_VERSION_GROUPED_RE- leverage this - Add exact match support for full tags
- Filter by tags:
scylla_version,build-id,commit-id
- Already uses
- In
-
Enhance Docker lookup (
sdcm/utils/version_utils.py)- In
get_scylla_docker_repo_from_version():- Parse full version tag to extract base version
- Determine correct repo (scylla vs enterprise)
- Docker tags already support this format
- In
Rationale: Clean separation, but requires more changes
Implementation:
- Create new functions:
get_*_by_full_version_tag() - Separate code path in
sct_config.py - More code duplication
Decision: Choose Option 1 (minimal changes, backward compatible)
- Add full version tag regex pattern to
version_utils.py - Create helper function to parse full version tags
- Extract base version, build ID, date, commit ID
- Add unit tests for version parsing
- Update
get_scylla_ami_versions()to handle full tags - Add commit ID and build ID filtering
- Update
sct_config.pyAWS section - Add unit tests for AWS image lookup
- Update
get_scylla_gce_images_versions()for full tags - Handle label format conversion
- Update
sct_config.pyGCE section - Add unit tests for GCE image lookup
- Update
get_scylla_images()for exact tag matching - Leverage existing
SCYLLA_VERSION_GROUPED_RE - Update
sct_config.pyAzure section - Add unit tests for Azure image lookup
- Update
get_scylla_docker_repo_from_version() - Handle full tag format in repo detection
- Update
sct_config.pyDocker section - Add unit tests for Docker tag handling
- Update configuration documentation
- Add examples to test configs
- Integration testing across all backends
- Update README with examples
| Format | Example | AWS | GCE | Azure | Docker |
|---|---|---|---|---|---|
| Simple | 5.2.1 |
✓ | ✓ | ✓ | ✓ |
| Branch | master:latest |
✓ | ✓ | ✓ | ✓ |
| Full Tag (NEW) | 2024.2.5-0.20250221.cb9e2a54ae6d-1 |
✓ | ✓ | ✓ | ✓ |
FULL_VERSION_TAG_RE = re.compile(
r"(?P<base_version>[\d.]+)"
r"-(?P<build>\d+|rc\d+)"
r"\.(?P<date>\d{8})"
r"\.(?P<commit>[a-f0-9]+)"
r"(?P<suffix>.*)"
)- AMI tags:
scylla_version,build-id,commit-id - Filter strategy: Exact match on scylla_version OR match base + commit
- Labels:
scylla_version(dots become dashes) - Filter: Exact label match after normalization
- Tags:
scylla_version,build-id - Already has version parsing via
SCYLLA_VERSION_GROUPED_RE - Enhance to support exact matching
- Tags already in this format
- Parse to determine repo (scylla vs enterprise vs nightly)
✅ All existing formats remain supported:
- Simple versions:
5.2.1,2024.2.0 - Branch versions:
master:latest,branch-2019.1:all - Prefix matching: Will be attempted as fallback
- Version parsing
- Each backend's image lookup function
- Edge cases (malformed versions, missing images)
- Mock AWS/GCE/Azure APIs
- Test with real version tags
- Verify correct image selection
- Documented in PR for each backend
- Real provisioning with full version tags
sdcm/utils/version_utils.py- Add regex and parsersdcm/utils/common.py- Update AWS/GCE functionssdcm/provision/azure/utils.py- Update Azure functionssdcm/sct_config.py- Update version handling logicunit_tests/test_version_utils.py- Add testsunit_tests/provisioner/test_azure_get_scylla_images.py- Add testsdefaults/test_default.yaml- Add examples (if needed)
- Changes are additive (new format support)
- Existing code paths remain unchanged
- Comprehensive unit tests will validate
- Feature flag to enable/disable if needed
- Thorough testing before merge
- Gradual rollout per backend
✅ Users can specify scylla_version: 2024.2.5-0.20250221.cb9e2a54ae6d-1
✅ System correctly identifies and provisions images on AWS, GCE, Azure, Docker
✅ All existing version formats continue to work
✅ Unit tests pass with >90% coverage
✅ Documentation updated with examples
Implementation complete - All 6 phases completed successfully.
- ✅ Phase 1: Core Version Parsing Enhancement
- ✅ Phase 2: AWS Implementation
- ✅ Phase 3: GCE Implementation
- ✅ Phase 4: Azure Implementation
- ✅ Phase 5: Docker Implementation
- ✅ Phase 6: Integration & Documentation
docs/full-version-tag-usage.md- Comprehensive usage guidedocs/full-version-tag-example.yaml- Example configuration- Updated
docs/configuration_options.mdwith full version tag details - Updated
README.mdwith version format examples
- 26 new unit tests added (all passing)
- Coverage across all backends: AWS, GCE, Azure, Docker
- Tested with multiple version formats including
~devand-devseparators - Critical bug fixes applied for wildcard handling
- Exact Matching: Full version tags use exact string matching (no wildcards)
- Backend Support: All backends (AWS, GCE, Azure, Docker) fully supported
- Backward Compatible: Existing version formats continue to work
- Format Validation: Strict regex validation prevents false positives
- Comprehensive Docs: Complete usage guide and examples