Skip to content

fix(ci): remove excessive SHA tag from Docker image releases#278

Merged
AbdelrhmanHamouda merged 1 commit intomasterfrom
fix/remove-sha-docker-tags
Feb 13, 2026
Merged

fix(ci): remove excessive SHA tag from Docker image releases#278
AbdelrhmanHamouda merged 1 commit intomasterfrom
fix/remove-sha-docker-tags

Conversation

@AbdelrhmanHamouda
Copy link
Owner

Summary

Remove the full commit SHA tag from the release workflow's Docker image tagging strategy to eliminate registry pollution while maintaining full traceability.

Changes

  • Remove ,${{ github.sha }} from ko build tags parameter in .github/workflows/release.yaml
  • Future releases will only create two tags: version tag (e.g., v2.0.0) and latest

Rationale

The SHA tag was introduced in commit c68b6311 (Jan 20, 2026) during the Go operator CI/CD rewrite. While SHA tags can provide traceability, they create unnecessary registry pollution because:

  1. Version tags already provide full traceability - Git tags are immutable and point to specific commits
  2. Docker images have SHA256 digests - For absolute immutability needs, use image digests
  3. Users prefer semantic versions - For rollbacks and deployments, version tags are more practical
  4. SHA tags clutter DockerHub - 40-character tags accumulate without adding practical value

Impact

  • Risk Level: LOW
  • Single-line removal (not modification)
  • No downstream dependencies on SHA tags
  • Easy rollback if needed
  • Only affects future releases (existing images unchanged)
  • Multi-platform build functionality unaffected

Verification Plan

After merge, verify with next release:

  • Build completes successfully
  • Multi-platform images created (linux/amd64, linux/arm64)
  • Only version + latest tags appear on DockerHub
  • No SHA-based tag created
  • Image pull works: docker pull lotest/locust-k8s-operator:<version-tag>

Optional Follow-up

Consider cleaning up existing SHA-based tags from DockerHub manually or via API to reduce clutter.

Remove the full commit SHA tag from the release workflow's Docker image
tagging strategy. This eliminates registry pollution while maintaining
full traceability through version tags and Docker image digests.

Changes:
- Remove `,${{ github.sha }}` from ko build tags parameter
- Future releases will only create version and latest tags

Rationale:
- Version tags already provide full traceability (immutable Git tags)
- Docker images have SHA256 digests for absolute immutability needs
- SHA tags (40-char) clutter DockerHub without adding practical value
- Users prefer semantic versions for deployments and rollbacks

Introduced in: c68b631 (Go operator CI/CD rewrite, Jan 2026)
@codacy-production
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.28%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (419c011) 2118 1804 85.17%
Head commit (65a1afb) 2118 (+0) 1798 (-6) 84.89% (-0.28%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#278) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@AbdelrhmanHamouda AbdelrhmanHamouda merged commit bc748d0 into master Feb 13, 2026
6 checks passed
@AbdelrhmanHamouda AbdelrhmanHamouda deleted the fix/remove-sha-docker-tags branch February 13, 2026 21:57
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.

1 participant