Skip to content

fix(ci): make release tag push idempotent under concurrent runs#8

Merged
JerrettDavis merged 1 commit into
mainfrom
fix/idempotent-tag-push
Jun 22, 2026
Merged

fix(ci): make release tag push idempotent under concurrent runs#8
JerrettDavis merged 1 commit into
mainfrom
fix/idempotent-tag-push

Conversation

@JerrettDavis

Copy link
Copy Markdown
Owner

Summary

  • Wraps git push origin "v${PACKAGE_VERSION}" in a failure handler so concurrent CI runs pushing the same GitVersion tag no longer fail the job
  • On push failure, fetches all tags and verifies the tag landed on the remote — if yes, treats as success; if no, still exits 1
  • Only this step is changed; surrounding YAML structure and all other steps are untouched

Problem

Under set -euo pipefail, two near-simultaneous CI runs on main with the same GitVersion tag will race. The loser's git push returns a non-zero exit code and aborts the entire job, producing a spurious CI failure for an otherwise-passing build.

Test plan

  • Verify PR checks pass on this branch
  • After merge, confirm the post-merge main CI run concludes success
  • Manually inspect that the tag step either pushes cleanly or no-ops if the tag already exists

🤖 Generated with Claude Code

When two CI runs race to push the same GitVersion tag, the loser's
`git push` fails and aborts the job under `set -euo pipefail`. Now the
push failure is caught, followed by a `git fetch --tags` verification:
if the tag landed on the remote, the step succeeds; if the tag is
genuinely absent, it still exits 1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Code Coverage

Summary
  Generated on: 06/22/2026 - 23:22:41
  Coverage date: 06/22/2026 - 23:22:35 - 06/22/2026 - 23:22:39
  Parser: MultiReport (3x Cobertura)
  Assemblies: 1
  Classes: 6
  Files: 7
  Line coverage: 98%
  Covered lines: 457
  Uncovered lines: 9
  Coverable lines: 466
  Total lines: 922
  Branch coverage: 84% (343 of 408)
  Covered branches: 343
  Total branches: 408
  Method coverage: 100% (84 of 84)
  Full method coverage: 95.2% (80 of 84)
  Covered methods: 84
  Fully covered methods: 80
  Total methods: 84

TaskDsl                                           98%
  TaskDsl.Extensions.RecurrenceExtensions       92.2%
  TaskDsl.Parser                                98.8%
  TaskDsl.Recurrence                             100%
  TaskDsl.TaskAttributes.AttributeBuilder        100%
  TaskDsl.TaskAttributes.TaskAttributeBuilder    100%
  TaskDsl.TodoTask                               100%

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@d592dd4). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage        ?   98.06%           
=======================================
  Files           ?        7           
  Lines           ?      466           
  Branches        ?      111           
=======================================
  Hits            ?      457           
  Misses          ?        9           
  Partials        ?        0           
Flag Coverage Δ
unittests 98.06% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@JerrettDavis JerrettDavis merged commit 826c6bb into main Jun 22, 2026
6 checks passed
@JerrettDavis JerrettDavis deleted the fix/idempotent-tag-push branch June 22, 2026 23:25
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