Skip to content

Fail loudly when the Pi4J/download push fails - #772

Merged
eitch merged 2 commits into
mainfrom
fix/loud-failure-download-deploy
Oct 1, 2026
Merged

eitch merged 2 commits into
mainfrom
fix/loud-failure-download-deploy

Conversation

@FDelporte

Copy link
Copy Markdown
Member

Summary

ci-main-snapshot.yml's "Deploy to Download Repo" job retry loop never propagated a final failure. When all 3 git push attempts fail, the script fell through to the loop's last command (git pull --rebase, which succeeds trivially when there's nothing new to rebase), so the step — and the whole job — reported success while never actually pushing anything.

This is exactly what's been silently happening since 2026-07-02: every snapshot build's deploy-to-download step has been green, but Pi4J/download hasn't received a real commit since then, because API_TOKEN_GITHUB has been failing auth on every push attempt:

fatal: could not read Password for 'https://***@github.com': No such device or address

(Separately being investigated — this PR only fixes the silent-failure part so the real problem surfaces instead of being masked.)

Fix

  • Exit 0 only on an actual successful push.
  • Exit 1 with a clear ::error:: annotation if all 3 attempts fail, so the job goes red and shows up in notifications/status checks instead of silently doing nothing.

Test plan

  • Once API_TOKEN_GITHUB is confirmed valid, verify the next snapshot build actually pushes to Pi4J/download and the job stays green.
  • If the token is still broken, verify the job now correctly fails red instead of reporting a false success.

🤖 Generated with Claude Code

The retry loop's "git push origin main && break" never propagated a
final failure: when all 3 attempts failed, the script fell through to
the loop's last command (git pull --rebase, which succeeds trivially
when there's nothing to rebase), so the step - and the whole job -
reported success while never actually pushing anything.

This is exactly what's been happening since 2026-07-02: every
snapshot build's "Deploy to Download Repo" job has reported green,
but Pi4J/download hasn't received a real commit since, because
API_TOKEN_GITHUB has been failing auth
("fatal: could not read Password ... No such device or address")
on every push attempt, silently.

Now exits 0 only on an actual successful push, and exits 1 with a
clear ::error:: annotation if all 3 attempts fail.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@FDelporte
FDelporte requested review from eitch and a balanced review from Copilot October 1, 2026 08:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The final rebase can fail before the new error annotation is emitted.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Ensures failed snapshot pushes to Pi4J/download no longer report success.

Changes:

  • Exits successfully only after a successful push.
  • Reports an error after exhausting retries.
File Description
.github/​workflows/​ci-main-snapshot.yml Corrects snapshot push failure propagation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/ci-main-snapshot.yml Resolved
Add retry logic for push attempts in CI workflow

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

@eitch
eitch merged commit c8d77b6 into main Oct 1, 2026
5 checks passed
@eitch
eitch deleted the fix/loud-failure-download-deploy branch October 1, 2026 08:50
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.

3 participants