Skip to content

fix(ci): set git identity before re-merging target branch in PR workflows#1002

Closed
IvanaGyro wants to merge 1 commit into
masterfrom
claude/commit-c07f1fea-check-dzwmt6
Closed

fix(ci): set git identity before re-merging target branch in PR workflows#1002
IvanaGyro wants to merge 1 commit into
masterfrom
claude/commit-c07f1fea-check-dzwmt6

Conversation

@IvanaGyro

@IvanaGyro IvanaGyro commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

Several PR workflows re-merge the base branch at job start so CI tests against the latest target branch, rather than a stale merge-preview commit:

git fetch origin ${{ github.event.pull_request.base.ref }}
git merge --no-edit origin/${{ github.event.pull_request.base.ref }}

When the base branch has advanced since GitHub computed the PR's merge-preview commit, this is a non-fast-forward merge, so git needs to create a real merge commit — which requires a committer identity. Ubuntu-hosted runners don't have one configured, while macOS-hosted runners do (a ~/.gitconfig is baked into that image), so this fails intermittently and only on Ubuntu with:

Committer identity unknown
fatal: empty ident name (for <runner@...>) not allowed

This was observed on PR #987, where BuildAndTest-ubuntu-latest, DownstreamFindPackage, and Formatting Check all failed this way after master advanced mid-run, while the macOS legs of the same run succeeded.

release_pypi.yml already sets a bot git identity before this same merge step. This PR applies the identical fix to the other four workflows that have the same unguarded pattern:

  • ci-cmake_tests.yml
  • ci-downstream-find-package.yml
  • clang-format-check.yml
  • conda_build.yml

Test plan

  • CI passes on this PR (Ubuntu legs in particular)

Generated by Claude Code

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

…lows

The "Merge with latest target branch" step needs to create a real merge
commit whenever the base branch has advanced past the PR's cached
merge-preview commit, which requires a committer identity. Ubuntu
runners have none configured, unlike macOS runners, so this fails
intermittently with "fatal: empty ident name" depending on push timing.
release_pypi.yml already set a bot identity here; apply the same fix to
ci-cmake_tests.yml, ci-downstream-find-package.yml,
clang-format-check.yml, and conda_build.yml.

Co-Authored-By: Claude <noreply@anthropic.com>
@IvanaGyro
IvanaGyro force-pushed the claude/commit-c07f1fea-check-dzwmt6 branch from 0b67a0e to fde8d73 Compare July 6, 2026 14:30
@IvanaGyro
IvanaGyro requested review from pcchen and yingjerkao July 6, 2026 14:30
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 30.92%. Comparing base (b5db6b8) to head (fde8d73).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1002   +/-   ##
=======================================
  Coverage   30.92%   30.92%           
=======================================
  Files         229      229           
  Lines       34760    34760           
  Branches    14398    14398           
=======================================
  Hits        10749    10749           
  Misses      16708    16708           
  Partials     7303     7303           
Flag Coverage Δ
cpp 30.43% <ø> (ø)
python 59.41% <ø> (ø)

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

Components Coverage Δ
C++ backend 32.25% <ø> (ø)
Python bindings 17.28% <ø> (ø)
Python package 59.41% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b5db6b8...fde8d73. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pcchen

pcchen commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Thanks for this, @IvanaGyro — it's a correct fix. It's essentially identical to #1007 (same 4 workflow files, same git config user.name/user.email lines before the target-branch merge; the only difference is comment wrapping/indentation). To avoid duplicate changes we're going with #1007 — could you close this one in favor of it? The fix itself is equally valid either way.

Posted by Claude Code on behalf of @pcchen

@pcchen

pcchen commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

I will close this.

@pcchen pcchen closed this Jul 7, 2026
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.

2 participants