Skip to content

Fix rare test flake - #716

Open
vlovich wants to merge 1 commit into
DataDog:masterfrom
vlovich:deflake-test
Open

vlovich wants to merge 1 commit into
DataDog:masterfrom
vlovich:deflake-test

Conversation

@vlovich

@vlovich vlovich commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Deflakes a rare test flake

Motivation

Saw this false-positive test failure:

failures:
---- channels::shared_channel::test::shared_drop_cascade_drop_executor_reverse stdout ----
thread 'unnamed-67' (3258883) panicked at glommio/src/channels/shared_channel.rs:140:63:
called Option::unwrap() on a None value
thread 'channels::shared_channel::test::shared_drop_cascade_drop_executor_reverse' (3258791) panicked at glommio/src/channels/shared_channel.rs:944:20:
called Result::unwrap() on an Err value: Thread panicked { .. }
failures:
channels::shared_channel::test::shared_drop_cascade_drop_executor_reverse

Related issues

N/A

Additional Notes

Couldn't reproduce but Codex explained the issue. The fix seems sensible.

Checklist

[X] I have added unit tests to the code I am submitting
[X] My unit tests cover both failure and success scenarios
[] If applicable, I have discussed my architecture

Cargo test locally failed for me with

```
failures:
---- channels::shared_channel::test::shared_drop_cascade_drop_executor_reverse stdout ----
thread 'unnamed-67' (3258883) panicked at glommio/src/channels/shared_channel.rs:140:63:
called Option::unwrap() on a None value
thread 'channels::shared_channel::test::shared_drop_cascade_drop_executor_reverse' (3258791) panicked at glommio/src/channels/shared_channel.rs:944:20:
called Result::unwrap() on an Err value: Thread panicked { .. }
failures:
channels::shared_channel::test::shared_drop_cascade_drop_executor_reverse
```

Couldn't reproduce but Codex explained the issue. The fix seems
sensible.
@datadog-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Pipelines

✨ Unblock PR with BitsAI

⚠️ Warnings

❌ Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 2 Pipeline jobs failed

Rust | build — 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

Compilation error: no method named 'random_range' found for struct 'ThreadRng' in the current scope. Consider importing trait 'RngExt'.

Rust | test — 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

15 failed tests due to unsupported operations with DMA file tests: EnhancedIoError { source: Os { code: 95, kind: Unsupported, message: "Operation not supported" }, op: "Reading" }

📋 Copy fix prompt
CI on my pull request is failing. Help me find and fix the root cause of each failing job below — they were flagged as caused by changes in this PR, so focus on the diff. For each job, explain the failure and propose a fix.

Before you start, set up the Datadog software-delivery tooling so you can
query the CI data yourself:

1. Check whether you already have the Datadog software-delivery MCP tools
   (e.g. a `search_datadog_ci_pipeline_events` tool) and the `unblock-pr` skill.
2. If either is missing, STOP and ask me for permission before installing
   anything. Do not install or run anything until I have said yes.
3. Only with my explicit approval, set up the Datadog software-delivery MCP
   server and skills by following:
     https://docs.datadoghq.com/getting_started/software_delivery_mcp_tools/
   then restart so the skill is picked up.
4. If I decline, skip all of the above and work from the context below alone.

Then run /unblock-pr — it will pull the CI data itself. The job context below is what we already know.

If /unblock-pr is not available — because I declined the setup above, or it did not install — work from the context below instead.

Datadog has already classified this failure as caused by changes in this PR.
Take that as given and work the fix:

1. Locate the change. Diff this branch against its base and find the change
   that produces this error. Explain the mechanism, don't just name a file:
     git fetch origin && git diff $(git merge-base origin/master HEAD)...HEAD
2. Reproduce it locally. Run the failing job's command or test before
   proposing anything.
3. Propose the smallest fix that addresses the root cause — not a workaround,
   not a broadened assertion, not a disabled or skipped test.
4. Re-run the same command to confirm, and say exactly what you ran.
5. If the failure turns out to be intermittent rather than deterministic, say
   so plainly instead of "fixing" it — that is a flaky test, and patching it
   hides the problem.

If the right move is to re-run the job rather than change code, use the job
link in the context below. For GitHub Actions: `gh run rerun <run-id> --failed`,
where the run ID is the number after `/runs/` in that URL (not the trailing
number, which is the job ID).

Branch: deflake-test

Rust | build
Commit: 9a16d56a6dda601cb227e40474f03014de664a3d
Error (code / build):
Compilation error: no method named 'random_range' found for struct 'ThreadRng' in the current scope. Consider importing trait 'RngExt'.
CI job: https://github.com/DataDog/glommio/actions/runs/33825058181/job/100875822934

Rust | test
Commit: 9a16d56a6dda601cb227e40474f03014de664a3d
Error (code / test):
15 failed tests due to unsupported operations with DMA file tests: EnhancedIoError { source: Os { code: 95, kind: Unsupported, message: "Operation not supported" }, op: "Reading" }
CI job: https://github.com/DataDog/glommio/actions/runs/33825058181/job/100875823021

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 9a16d56 | Docs | View more details | Give us feedback!

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