Skip to content

fix: Deflake RemovingTenantStopsSnapshots by waiting for CleanupTenant - #4385

Merged
igor-kupczynski merged 1 commit into
mainfrom
harden-removing-tenant-stops-snapshots
Jul 9, 2026
Merged

fix: Deflake RemovingTenantStopsSnapshots by waiting for CleanupTenant#4385
igor-kupczynski merged 1 commit into
mainfrom
harden-removing-tenant-stops-snapshots

Conversation

@igor-kupczynski

Copy link
Copy Markdown
Contributor

Description

Follow up to #4257 (comment) -- a flaky test fix

Fixes # (issue)

Type of change

  • Chore (changes which are not directly related to any business logic)
  • Test changes (add, refactor, improve or change a test)

What's Changed

  • Deflake TestScheduler_PoolIntegration_RemovingTenantStopsSnapshots by waiting for CleanupTenant before checking that removed-tenant snapshots stop.
  • Replace the fixed 50ms sleep / 350ms strict no-snapshot check with a 2s quiet window and 5s overall timeout, so in-flight snapshot callbacks after removal do not fail the test.

Checklist

Changes have been:

  • Tested (unit, integration, or manually with steps specified)
  • Linted and formatted
  • Documented (where applicable)
  • Added to CHANGELOG (where applicable) -- see Keep a Changelog
🤖 AI Disclosure
  • I acknowledge that an LLM was used in the creation of this Pull Request, in accordance with Hatchet's AI_POLICY.md.
  • Details: Cursor drafted the plan and wrote the code with a mix of GPT-5.5 and composer-2.5

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hatchet-docs Ready Ready Preview, Comment Jul 9, 2026 12:48pm

Request Review

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Benchmark results

goos: linux
goarch: amd64
pkg: github.com/hatchet-dev/hatchet/pkg/scheduling/v1
cpu: AMD Ryzen 9 7950X3D 16-Core Processor          
              │ /tmp/old.txt │         /tmp/new.txt          │
              │    sec/op    │    sec/op     vs base         │
RateLimiter-8   47.28µ ± 14%   55.05µ ± 25%  ~ (p=0.310 n=6)

              │ /tmp/old.txt │         /tmp/new.txt          │
              │     B/op     │     B/op      vs base         │
RateLimiter-8   137.7Ki ± 0%   137.7Ki ± 0%  ~ (p=0.623 n=6)

              │ /tmp/old.txt │          /tmp/new.txt          │
              │  allocs/op   │  allocs/op   vs base           │
RateLimiter-8    1.022k ± 0%   1.022k ± 0%  ~ (p=1.000 n=6) ¹
¹ all samples are equal

Compared against main (9c2ef1c)

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ Optional test failure: The load-deadlock job failed on this PR (optimistic-scheduling=false). This check is non-mandatory and does not block merging, but may be worth investigating. View logs

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ Optional test failure: The old-engine-new-sdk (Python) job failed on this PR. This check is non-mandatory and does not block merging, but may be worth investigating. View logs

@igor-kupczynski
igor-kupczynski merged commit e959a60 into main Jul 9, 2026
45 of 54 checks passed
@igor-kupczynski
igor-kupczynski deleted the harden-removing-tenant-stops-snapshots branch July 9, 2026 13:39
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