Skip to content

fix:run-multimodtag-cmd-multipletimes#1539

Open
AnubhavPurohit691 wants to merge 3 commits intoopen-telemetry:mainfrom
AnubhavPurohit691:fix/run-multimodtag-multipletimes
Open

fix:run-multimodtag-cmd-multipletimes#1539
AnubhavPurohit691 wants to merge 3 commits intoopen-telemetry:mainfrom
AnubhavPurohit691:fix/run-multimodtag-multipletimes

Conversation

@AnubhavPurohit691
Copy link

@AnubhavPurohit691 AnubhavPurohit691 commented Jan 25, 2026

Resolves #205

Make multimod tag idempotent for tags on the same commit

Summary

Enhances multimod tag to skip tags that already exist on the specified commit, allowing the command to be re-run safely. This enables dry-run git push workflows using --print-tags output.

Changes

  • Added commit-aware tag checking: distinguishes between tags on same commit vs. different commits
  • Skip existing tags on target commit (no error)
  • Still error if tags exist on different commit (safety check)
  • Updated tests to reflect new behavior

results

  • ✅ Idempotent: safe to re-run on same commit
  • ✅ Enables dry-run workflows: multimod tag --print-tags | xargs git push --dry-run
  • ✅ Backward compatible: all existing tests pass

Testing

All tests pass, including new test for tags on different commits.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 25, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: AnubhavPurohit691 / name: Anubhav Purohit (f23cc0b)

@AnubhavPurohit691 AnubhavPurohit691 force-pushed the fix/run-multimodtag-multipletimes branch from 72d8c9f to 3517734 Compare January 25, 2026 13:16
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 78.12500% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.49%. Comparing base (660858d) to head (f23cc0b).

Files with missing lines Patch % Lines
multimod/internal/tag/tag.go 78.12% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1539      +/-   ##
==========================================
+ Coverage   63.43%   63.49%   +0.05%     
==========================================
  Files          66       66              
  Lines        3397     3427      +30     
==========================================
+ Hits         2155     2176      +21     
- Misses       1006     1012       +6     
- Partials      236      239       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Make it possible to run the same multimod tag command multiple times

1 participant