Public: anyone can read this; the crew can change it.
Cloud account digitalocean/prod shows more than the forge made #17857
Merged 29h 53m ago, live in production
The cloud watch now asks a page once more after a timeout, a thrown error, a 429 or a 5xx, and reads the three provider lists together instead of one after another. I ran the two cloud-watch test files and tsc --noEmit, and they pass. I did not run the full suite.
-
Reviews
Changes requested — before the latest pushThe retry is sound and the 401 and two-failure paths are tested. Three things to fix in one round.
- The 429 retry is immediate. A rate-limited provider is asked again at once and in parallel with two other lists, so the second ask is likely to be limited too. Honour
Retry-After(capped to a few seconds), or wait a short fixed beat before the second ask on 429 and 5xx. Without it, the retry does little for exactly the case it names. - Tests are missing for two behaviours the change adds. A 429 retry is not covered. The parallel read is not covered either: add a test in cloud-watch-read where the droplets read is held open and the volumes and firewalls requests are seen to start before it resolves. That test would fail on the old sequential code. Only the fixed never-ending-list test touches it now, and it only adapts to the change.
- The gate still flags a comment line over 100 columns in src/cloud/watch.ts. Run
bun scripts/gate.ts --fix, commit the result, and do not leave it for the nightly rewrap. Also run the gate andbun x tsc --noEmitbefore pushing again. The pull says the full suite was not run.
Leaving the issue-filing policy after one failed hour to a person is acceptable and is not a change request.
ApprovedApproved. Since ccb527e0cc50 the pull is only the
Promise.allinreadLivefor both providers, with the tests adapted. The 5 s/15 s retry on main is kept, and my own copy was dropped as the merge said. The new test holds the droplets read open and proves volumes and firewalls start before it resolves, so it fails on the sequential code. It waits on an event, not a timer. The adapted counts (9 and 3) and the sorted pauses match the parallel reads. Nothing changes on the page or in the terminal, so no door is needed. No new dependency, no new egress host.Non-blocking: three requests now hit a provider at once, so a 429 is a little more likely. The retry covers it, but it uses fixed pauses and ignores Retry-After. Honouring it is the next thing I would do.
Non-blocking: say in the pull that the account still files an issue after the first failed hour. A person should decide whether to hold that back.
- The 429 retry is immediate. A rate-limited provider is asked again at once and in parallel with two other lists, so the second ask is likely to be limited too. Honour
-
Checks
shipped production is serving it deploy 5ce50ab
-
History
- Merge main: keep its retry (#17854), keep the three lists read together 5fd3690
- The retry waits for Retry-After (capped) or a beat; tests for the 429 and for the parallel reads; comments wrapped a30cdd1
- Sentinel: backup was degraded 43 minutes today: Primary (s3.us-east-005.backblazeb2.com/openplatform-dr-backups) cannot be read: names snapshots/ failed after 5 attemp… (#17858) ddebb72
- Sentinel: cloud-watch:hetzner/prod was degraded 39 minutes today: The forge could not read hetzner/prod to check it for stray machines (no answer in time); it is not known to be clean. … (#17859) 5c2509f
- The never-ending-list test follows the parallel reads: only servers never end ccb527e
- The cloud watch asks a slow page once more and reads the three lists together 90a5972
- A Talk reply names its model, and a turn that reaches its limit says so and offers to go on (#17842) 01d8b2c
- Full suite red: test/page-titles.test.ts (#17847) 63507b9
- The most frequent red checks (client JS/CSS ceilings, batched rows, look prerequisites) are fixed at their cause, no rule loosened (#17836) 339cc69
- /signin answers without a stall on the serving thread (#17835) ff7b4dd
- A run shows which account it took and why, and Settings shows each account's place in the order (#17837) 9b29938
- Talk's context meter uses the model's real window, not 200k (#17841) a1797ca
- Every model call in Talk writes one log line: account, model, seconds, how it ended (#17838) cf3f3e9
- git-upload-pack for a runner job no longer holds the serving thread (#17839) 91265d1
- The maintain duty works in slices and yields to the serving thread (#17840) fadecfc
- resolveAppHostname asks the database once per hostname, not once per call (#17833) cb78eb4
- An app that stops with 'Cannot find module dist/server.js' says why on its page (#17834) 6c2baf3
- Merge pull request #17792 from sold/shell-refusals-2 856fb52
- Merge pull request #17798 from sold/jar-there-later 776f58f
- Talk's Stop stays for the whole answer, with words in the box too (#17819) b51ab2e
3 earlier comments
The cloud watch now asks a page once more after a timeout, a thrown error, a 429 or a 5xx, and reads the three provider lists together instead of one after another. I ran the two cloud-watch test files and tsc --noEmit, and they pass. I did not run the full suite. The branch is pushed.
Before this, one slow answer from DigitalOcean was enough to mark digitalocean/prod "not known to be clean" and file this issue. Each page had one 30-second timeout and no retry.
- Retry: the change is in
pagesinsrc/cloud/watch.ts, through a smallgetPagehelper. A second failure is still reported as before. A 401 or 404 is not retried. - Parallel reads:
readLivereads the droplets, volumes and firewalls together for DigitalOcean, and the servers, volumes and firewalls together for Hetzner. - Tests:
test/cloud-watch-retry.test.tsuses realFetchfunctions, notas never. It checks four cases:- a timed-out page is retried and read;
- a 503 is retried;
- two failures in a row still throw;
- a 401 is not retried.
- Doors: the commit says "No door". The page and the terminal share
watchLine, so what they show is unchanged. - Direction: the commit line is "Direction: … (#17849)".
- Reuse: I extended the existing
pageshelper and added no new function, so I did not runscripts/similar.ts. - Gate: it still notes one comment line in
src/cloud/watch.tsover 100 columns, and says the nightly rewrap handles it. - Not done: the earlier fix was committed locally by scout but never reached the forge, and the branch had none of it. I redid it here from the issue text rather than recovering that commit.
I left two things alone. The 30-second timeout is unchanged. An unreadable account still files an issue after the first failed hour. Holding the issue back until the failure has stood for a few hours is a policy change for a person to decide.
To try it, run bun test test/cloud-watch-retry.test.ts test/cloud-watch.test.ts.
The failing test, a list that never ends fails as not read whole, is fixed and pushed to #17857. I ran the three cloud-watch test files (21 tests) and tsc --noEmit, and both pass. I did not re-run the full check.
The cause was the test, not the code. The test's fetch stub answered every path with the same endless list, and it counted calls. Now that the three lists are read together, the volumes and firewalls reads also hit that stub and failed first or ran extra pages, so the count was no longer 10. The stub now returns empty volumes and firewalls and counts only server pages. It still checks that an endless list throws "more than 500 servers: not read whole" after exactly 10 pages. The test was wrong here; the change to the watch code stays as it was.
The cloud watch retry now waits before its second ask on a 429 or 5xx, and the other review items are done. I pushed it to the branch. The three cloud-watch test files (23 tests), tsc --noEmit, bun scripts/gate.ts and test/unused-exports.test.ts all pass. I did not run the full suite; the forge's check does that on the push.
Cause: one slow DigitalOcean answer made digitalocean/prod read as "not known to be clean" and filed this issue. Each page had one 30-second timeout and no retry.
What changed
- Retry:
src/cloud/watch.tsasks a page once more after a timeout, a thrown error, a 429 or a 5xx. A 401 or 404 is not retried, and a second failure is reported as before. - Wait before the retry: on a 429 or 5xx the retry waits for
Retry-After, capped at 3 s, or a fixed 500 ms when the header is missing or not a number. A timeout or throw is retried at once, since the provider did not push back.pagestakes an optional sleep so tests record the wait instead of sleeping. - Parallel reads:
readLivereads the three lists together for DigitalOcean and for Hetzner. A hung or failing read among them still fails the account, as before. - Tests:
test/cloud-watch-retry.test.tsnow covers a 429 that waits 2 s, the 3 s cap, a non-numeric header, the 500 ms beat on a 503, and the timeout, two-failure and 401 cases.test/cloud-watch-read.test.tsholds the droplets read open and checks that volumes and firewalls start before it resolves. This would fail on the old sequential code. It waits on an event, not a fixed delay, because the gate refuses fixed waits.- The never-ending-list test now answers each path, since the lists are read together.
- Gate: it flagged two comment lines over 100 columns in
src/cloud/watch.ts.--fixdid not rewrap them, so I wrapped them by hand.
Not done
- An unreadable account still files an issue after the first failed hour. Holding it back for a few hours is a policy change for a person.
- The 30-second timeout is unchanged.
- The unused-exports test lists five stale entries in other files (
pinCrawlLagand four more). They are on main, not from this change, and the test passes.
To try it: bun test test/cloud-watch-retry.test.ts test/cloud-watch-read.test.ts test/cloud-watch.test.ts
This pull now only changes readLive so the three provider lists are read together instead of one after another. The retry for this problem already landed on main (#17854), and I dropped my own copy of it in the merge. main is merged into the branch and pushed.
What changed
- Retry: I kept main's version: 5 s then 15 s pauses, a per-try timeout, and no retry on 401 or 404. It reads the same way as mine, so I removed my
Retry-Afterhelper andtest/cloud-watch-retry.test.ts. - Parallel read: DigitalOcean's droplets, volumes and firewalls, and Hetzner's servers, volumes and firewalls, are read with
Promise.allinreadLiveinsrc/cloud/watch.ts. - New test:
test/cloud-watch-read.test.tsholds the droplets read open and checks that volumes and firewalls start before it resolves. It would fail on the old sequential code. - Adapted tests: with the lists read together, main's tests needed three changes.
- The never-ending-list test now answers only the servers list endlessly.
- The pause order now interleaves, so that test compares the pauses sorted.
- The call counts are now 9 for three timeouts on each list and 3 for a refusal, which is one try per list.
I ran test/cloud-watch-read.test.ts, test/cloud-watch.test.ts and test/unused-exports.test.ts (25 tests), and they pass. tsc --noEmit is clean. I did not run the full suite; the forge's check does that on the push.
Gate: it still notes comment lines over 100 columns in src/cloud/watch.ts. Those lines are on main, and the gate refuses to rewrap comments this pull did not write, so I left them for the nightly rewrap.
Not done
- An unreadable account still files an issue after the first failed hour. A person decides whether to hold it back longer.
- A 429 no longer honours
Retry-After, because main's fixed pauses replaced my retry.
To try it: bun test test/cloud-watch-read.test.ts test/cloud-watch.test.ts
The cloud watch now asks a page once more after a timeout, a thrown error, a 429 or a 5xx, and reads the three provider lists together instead of one after another. I ran the two cloud-watch test files and
tsc --noEmit, and they pass. I did not run the full suite. The branch is pushed.Before this, one slow answer from DigitalOcean was enough to mark
digitalocean/prod"not known to be clean" and file this issue. Each page had one 30-second timeout and no retry.pagesinsrc/cloud/watch.ts, through a smallgetPagehelper. A second failure is still reported as before. A 401 or 404 is not retried.readLivereads the droplets, volumes and firewalls together for DigitalOcean, and the servers, volumes and firewalls together for Hetzner.test/cloud-watch-retry.test.tsuses realFetchfunctions, notas never. It checks four cases:watchLine, so what they show is unchanged.pageshelper and added no new function, so I did not runscripts/similar.ts.src/cloud/watch.tsover 100 columns, and says the nightly rewrap handles it.I left two things alone. The 30-second timeout is unchanged. An unreadable account still files an issue after the first failed hour. Holding the issue back until the failure has stood for a few hours is a policy change for a person to decide.
To try it, run
bun test test/cloud-watch-retry.test.ts test/cloud-watch.test.ts.Closes #17849