Skip to content

[CI] API diff: 'Publish GitHub comment for change detection' fails with git ancestry error #26107

Closed

Description

@rolfbjarne

CI Issue Report (automated)

Error: Publish GitHub comment for change detection step fails
Pipeline: xamarin-macios-pr-apidiff
Category: Infrastructure / Script bug
Period: July 8–15, 2026

Problem

The "Publish GitHub comment for change detection" step in the API diff pipeline fails with a git ancestry check error. The script attempts to determine whether the build commit is an ancestor of the target branch, but this check fails, causing the task to exit with code 1.

Since the task has continueOnError: true, builds are marked partiallySucceeded rather than failed, but API diff comments are not posted on the affected PRs.

Error Message

Error checking if current commit is latest in PR: Failed to determine whether '<commit>' is an ancestor of 'origin/<target_branch>'.

Occurrence Summary

PR Build Target Branch Date
#26035 14628527 xcode27.0 2026-07-10
#26059 14638206 (unknown) 2026-07-13
#26087 14664254 main 2026-07-15

Total: Failed in 3 builds across 3 PRs

Analysis

The failure occurs across multiple target branches (xcode27.0, main), suggesting the git ancestry check script has a general bug rather than a branch-specific issue. The script runs on Azure Pipelines hosted Windows agents (not macOS bots), and the git fetch may not be retrieving enough history for the ancestry check to work.


This issue was automatically generated by CI post-mortem analysis.

Activity

  1. added
    bugIf an issue is a bug or a pull request a bug fix
    ci-failureThe issue only affects CI
    ci-postmortemCI post-mortem analysis: flaky tests, infrastructure failures, shared regressions
    on Jul 15, 2026
  2. added this to the Future milestone on Jul 16, 2026
  3. added a commit that references this issue on Jul 22, 2026
    b464f3a
  4. rolfbjarne commented on Jul 27, 2026

    @rolfbjarne
    MemberAuthor

    CI Post-Mortem Update (July 20–27, 2026)

    This failure recurred once after the fix was merged:

    PR Build Date Error
    #26242 14733989 Jul 22 16:56 UTC Failed to determine whether 'f3442a10...' is an ancestor of 'origin/net11.0'

    Not reopening — the fix in #26144 was merged Jul 22 01:07 UTC (less than 2 weeks ago). PR#26242 was created at 16:18 UTC the same day, so it should have the fix in its target branch. Possible explanations:

    • The PR branch was created before a git fetch that picked up the fix
    • The shallow checkout in CI didn't have enough history for the ancestry check

    No further occurrences after Jul 22 (4 apidiff builds on Jul 27 all succeeded). Likely resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIf an issue is a bug or a pull request a bug fixci-failureThe issue only affects CIci-postmortemCI post-mortem analysis: flaky tests, infrastructure failures, shared regressionscopilot

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions