Skip to content

test(health): stop asserting wall-clock ping budgets - #14069

Merged
ChiragAgg5k merged 1 commit into
mainfrom
fix/health-ping-latency
Oct 3, 2026
Merged

ChiragAgg5k merged 1 commit into
mainfrom
fix/health-ping-latency

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

What does this PR do?

The health e2e tests (Cache, DB, HTTP, PubSub, StorageLocal, Storage) asserted that each ping took under 100ms. That bound measures the CI runner, not the endpoint, and it flakes under load: appwrite-labs/cloud#6241 failed on Health\StorageTest::testStorage with a 119ms ping, on a change unrelated to storage.

The tests keep the actual contract: status 200, status: pass, and an integer ping, now asserted non-negative instead of under 100ms.

Test Plan

  • Pint and PHPStan clean on tests/e2e/Services/Health.
  • CI runs the health suite.

Related PRs and Issues

  • appwrite-labs/cloud#6241 (failing job: Tests / CE / E2E / Project (dedicated))

A 100ms bound on health pings measures the CI runner, not the endpoint,
and fails under load (cloud CI saw 119ms on storage). The contract is the
pass status and an integer ping.
@ghost

ghost commented Oct 3, 2026

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The assertion changes match the intended contract and introduce no identified defects.

The six health E2E tests replace the under-100ms ping assertion with a non-negative ping assertion. They retain the existing checks for HTTP 200, passing health status, and integer ping values.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 6
File Change
tests/e2e/Services/Health/CacheTest.php Checks cache ping is non-negative instead of under 100ms.
tests/e2e/Services/Health/DBTest.php Checks database ping is non-negative instead of under 100ms.
tests/e2e/Services/Health/HTTPTest.php Checks HTTP ping is non-negative instead of under 100ms.
tests/e2e/Services/Health/PubSubTest.php Checks pub/sub ping is non-negative instead of under 100ms.
tests/e2e/Services/Health/StorageLocalTest.php Checks local storage ping is non-negative instead of under 100ms.
tests/e2e/Services/Health/StorageTest.php Checks storage ping is non-negative instead of under 100ms.

Reviewed 79e79ff · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → fix/health-ping-latency (after).

Metric Before After Change
🚀 Requests/sec 185.91 202.94 🟢 +9.2%
⏱️ Latency P50 92.11 ms 85.98 ms 🟢 -6.7%
⏱️ Latency P95 223.63 ms 199.32 ms 🟢 -10.9%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 85.98 199.32 12,540 202.94 -24.31
Account 159.3 309.18 660 11.27 -39.16
TablesDB 82.66 155 6,820 112.45 -16.78
Storage 81.8 180.44 3,300 56.37 -11.66
Functions 119.29 233.03 1,760 30.97 -40.33

Top API waits (after)

API request Max wait (ms)
account.prefs.update 437.74
storage.files.create 412.66
account.name.update 409.65
storage.buckets.create 376.25
functions.variables.update 362.92

@ChiragAgg5k
ChiragAgg5k merged commit a38fccb into main Oct 3, 2026
50 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/health-ping-latency branch October 3, 2026 06:01
abnegate added a commit that referenced this pull request Oct 5, 2026
cloud#5410 re-pins server-ce to this branch and needs main at or past
ee75768: the health tests that stop asserting wall-clock ping budgets
(#14069), Content-Length: 0 on empty client bodies for OAuth token
requests (#14072) and the SDK task no longer calling setters removed in
sdk-generator 5.3.4 (#14073). Also brings the GitHub OAuth missing-user
fix (#14093) and appwrite/geo 0.3.2 (#14100). The merge is clean and the
lock is untouched; both sides still resolve appwrite/sdk-generator 5.0.1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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