dotnet / dotnet/macios

[CI] Flaky: LinkAll Pasteboard_ImagesTest reports HasImages false

Open
#26,426 1 comment 0 reactions 0 assignees View on GitHub
bug ci-failure ci-postmortem copilot iOS test-only-issue
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 13h
Merged PRs (30d)
96

Description

## Flaky test report

**Stable signature:** `linkall-uipasteboard-hasimages-false`
**Test:** `LinkAll.LinkAllRegressionTest.Pasteboard_ImagesTest`
**Platform/job:** iOS simulator, `T: linker_ios`
**Classification:** Genuinely flaky test
**First observed:** 2026-07-21 22:40:27 UTC
**Latest observed:** 2026-08-08 03:16:28 UTC

### Failure

The test assigns an image to `UIPasteboard.General.Images` and immediately observes:

```text
HasImages
Expected: True
But was: False
```

### Confirmed occurrences

| PR / head | Azure run / attempt | Job / task | Outcome |
|---|---|---|---|
| [#26146](https://github.com/dotnet/macios/pull/26146) / `f447dd24780dc6c6e0274723f10648c932af6324` | [14720461](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=14720461), attempt 1 | [`T: linker_ios`](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=14720461&view=logs&j=3f6ef66d-5190-5708-a885-35d26e0e0d89) | Failed with the exact assertion; rerun attempt 2 succeeded. The original task metadata is no longer retained. |
| [#26356](https://github.com/dotnet/macios/pull/26356) / `ccace789c2d7e5a48e1c00749d9244acb8c77528` | [14914057](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=14914057), attempt 1 | [`T: linker_ios` / `Run tests`](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=14914057&view=logs&j=3f6ef66d-5190-5708-a885-35d26e0e0d89&t=b9f07791-45f9-584d-6ecc-bf5dae611e17) | Failed; build was still running when recorded, so no retry had been requested. |

**Recurrence:** 2 confirmed occurrences across 2 distinct PRs.

### Investigation

- The current TestSummary reports one failed and 30 passed linker configurations; the HtmlReport identifies this as the sole failed test in `link all/iOS - simulator/Release`.
- The earlier occurrence cleared on the same-head Azure rerun, while the PR changes were unrelated to pasteboard behavior.
- `tests/monotouch-test/UIKit/PasteboardTest.cs` already documents random clipboard/image behavior and ignores its equivalent image test even after retries.
- Closed issue #6254 was inspected but tracks a different `Images.Length == 1` assertion and an Xcode 11 workaround, not this `HasImages == false` signature.

### Impact and workaround

This blocks the iOS linker job and can fail the simulator pipeline. The observed workaround is to rerun the failed job after the pipeline is terminal and normal head, mergeability, retry-budget, and duplicate-attempt gates pass.

Artifacts and historical Azure logs are retention-limited; the current TestSummary and HtmlReport were available when this issue was created.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with tests/monotouch-test/UIKit/PasteboardTest.cs and the LinkAll.LinkAllRegressionTest.Pasteboard_ImagesTest entry point. Compare the flaky HasImages assertion with the equivalent image test that already documents random clipboard behavior, then review the linker_ios simulator results. Done means the test no longer intermittently reports HasImages as false and the linker job passes reliably.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, ios
Domain
mobile-dev, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.