Repository navigation
log-shipper: ship deletion_ledger_start and duckdb_cache_cleanup_failed (TC-4177, TC-4190) [hash to be recomputed on top of #749 + ingress pin] - #751
Merged
Conversation
…che cleanup warning (TC-4177, TC-4190) - log-shipper: individual event deletion_ledger_start (target tinycloud, info) with ledger_file, bytes, operations, key_entries, committed, aborted, newest_deleted_at; failure variant carries error_kind only. Gate, sanitize.vrl block, own route and sink input, cases.mjs Vector cases. - log-shipper: diagnostics.json maps 'Database cache cleanup failed' to duckdb_cache_cleanup_failed; the line at duckdb/database.rs is a warn! again (#647 demoted it). - Schema pinned to tinycloud-dev-sam ab0c591b (fields.json sha256 4143ff50...), regenerated VECTOR_CONFIG_JSON in the compose and the N0 fixture, n0_template_hash and docs/releasing.md for THIS branch on main; the hash is recomputed once on top of the ingress changes before merge. - New log-shipper/ledger-start.test.mjs (schema carries every shipped field, own route, gate, TC-4190 mapping), registered in logship.yml. Details: TC-4177, TC-4190
…e (TC-4177) - Test-ruling TC-4177 (Naomi, 12:55Z): the existing assertion gains the new entry; equality kept, nothing removed. Details: TC-4177
…mplate hash (TC-4177, TC-4190) Compose: only the VECTOR_CONFIG_JSON line differs from main (cloudflared and the TC-4249 ingress pin untouched). n0_template_hash 4520ee72189db061788d2a3f09c742fdae5aa8709717a5d983c6ee77e91ca4d0 (raw fdcf54f255fd529f029fa1e3e66b5c0ecd5f3b4d3e8f0af96582ae213bd9f46b); was a6902dd5 on main. canonical.json re-pinned to schema merge head a33ebf8d (fields.json sha256 unchanged). Details: TC-4177, TC-4190
… bundle; recompute N0 template hash - fields.json: event_code gains store_master_mode_unreadable_refused, store_master_backstop_rotation_failed, shadow_local_working_copy_missing, shadow_local_read_failed (schema dev-sam 764c32a9, fields.json sha256 9abea684...). - diagnostics.json: four exact message entries for them (messages arrive with node #756; coverage and the ledger test do not require an emitter). - Compose VECTOR_CONFIG_JSON and the N0 fixture regenerated; n0_template_hash 693f06e86e0ea576a435b891214e9aaf528204c66131d85f53b4a805f8c47a60 (raw ef81b59ff3034ff17c049ac281173c4ac69ee8036f4d6333b19ed260c60e71b9). - New test in log-shipper/ledger-start.test.mjs for the four mappings. Details: TC-4177
- The job already ran 16-19 min on main; the added Vector cases for deletion_ledger_start pushed it past 20 and CI cancelled it (run 45446418043, 17:14:52Z-17:35:07Z). CI-only change, nothing else. Details: TC-4177
…18 (TC-4177) - revision 764c32a9 (branch head) -> 72947b183d4aa0df5ba6e3ddf42583888b4a3cd9 (squash merge of dev-sam #384). fields.json at that commit hashes to 9abea684d4b9e396f67b7a612733d6f788d35f9b1a5ae806430644b6c3a2ba9b, unchanged; nothing else derives from the revision. Details: TC-4177
No conflicts. #750's startup line and ledger summary are already on main; the compose inputs of n0_template_hash did not change, so the hash stays 693f06e86e0ea576a435b891214e9aaf528204c66131d85f53b4a805f8c47a60 (recompute-hash.py: already current). Details: TC-4177
samgbafa
marked this pull request as ready for review
November 25, 2026 14:12
samgbafa
pushed a commit
that referenced
this pull request
Nov 25, 2026
recompute-hash.py after merging main (#751): allowlist status gate < 400 -> < 400 || >= 500, node_request_5xx cap 10 -> 8; n0_template_hash 693f06e86e0ea576... -> 5323f6267154b950... (raw ef81b59f... -> 763caa5b...). docker.yml, docs/releasing.md and the CHANGELOG entry carry the new hash.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test-ruling: TC-4177 (12:55Z) - log-shipper/profile.test.mjs:28,:30 add 'event_route.deletion_ledger_start' to sinks.betterstack.inputs and 'deletion_ledger_start' to the event_route keys; equality kept, nothing removed.
DRAFT. Merges only after #750 (the
deletion_ledger_startline must exist) and the review/CI conditions from the ruling. If main's compose changes again before merge, recompute the hash again (steps below).What changed
One logship bundle, two events (precedent: #722 / #727, TC-3973
delegation_mode_boot_reindex).TC-4177:
deletion_ledger_start(the info line from #750,log_deletion_ledger_start, targettinycloud, heada556e132):log-shipper/sanitize.vrl: newledger_startblock. Shipsledger_file(missing|empty|present),bytes,operations,key_entries,committed,aborted(integers 0..2^53-1) andnewest_deleted_at(noneor an RFC 3339 instant by regex), exactly those keys plusevent/svc/level/ts. Input must have exactly the 9 node keys (message, event + 7). The failure variant ("deletion ledger counts unavailable at start") shipsevent+error_kind(the ledger's 8 fixed kinds) only. Message, paths, ids are never copied.scripts/tc959-logship.mjs: gate lets an info line on targettinycloudthrough only whenfields.event == "deletion_ledger_start"(every other info line there is stillfiltered_level);request_profileevent list; newevent_route.deletion_ledger_start(no cap, no reducer: the reducer would drop the counts); sink input.log-shipper/ledger.mjs: the constants.cases.mjs: Vector cases (see below).fields.json+canonical.jsonpin,diagnostics.jsonuntouched for this event (it is info, not a diagnostic count).keys(.) == [...]), under both profiles.TC-4190:
duckdb_cache_cleanup_failed:tinycloud-core/src/duckdb/database.rs~:510 iswarn!again (it was demoted todebug!in #647; the demotion note at that line and in #647's body matches TC-4190).diagnostics.jsonmaps the exact message "Database cache cleanup failed" to the code;coverage.test.mjspasses with it.Schema: tinycloud-dev-sam#384 (draft), branch head
764c32a9c3a8cc9f050f10e40a46e47cabfbe9eb(dev-sam main014b2dc5merged in, plus the four #756 event codes; earlier headsa33ebf8d,a78ec093,ab0c591b), fields.json sha2569abea684d4b9e396f67b7a612733d6f788d35f9b1a5ae806430644b6c3a2ba9b.canonical.jsonpins that head; if #384 is squash-merged, re-pinrevisionto the merge commit (sha256 unchanged; the revision is not part of any hash here).Compose / hash: merged
origin/main4e2ca8f4(#749 cloudflared, #753 ingress pin7e5dc37a, #746-#748) into this branch (merge commit, no rebase).VECTOR_CONFIG_JSONregenerated indocker-compose.dstack-postgres.yamlandscripts/ci/fixtures/tc959-n0-compose.yamlwithrecompute-hash.pyon the merged compose:git diff origin/mainof both files is exactly that one line each (cloudflared service and ingress pin lines untouched).n0_template_hashindocker.ymland thedocs/releasing.mdtable:693f06e86e0ea576a435b891214e9aaf528204c66131d85f53b4a805f8c47a60(rawef81b59ff3034ff17c049ac281173c4ac69ee8036f4d6333b19ed260c60e71b9); main todaya6902dd53525d2392146ef913f81bbdd19248116304a7f100fab206666e6b71c(rawa52a126d…). The algorithm reproduces main'sa6902dd5…from main's compose. Merge conflicts were text only (docker.yml comment + hash line, CHANGELOG, docs/releasing.md); both sides kept.Re-recompute the hash (only if main's compose changes again)
git merge origin/main;python3 /var/tmp/aa33-logship/recompute-hash.py <repo> --write(regenerates only theVECTOR_CONFIG_JSONline of both compose files and prints raw sha256 andn0_template_hash); put the printed hash into.github/workflows/docker.yml(n0_template_hash) anddocs/releasing.md(table + "redeploys exactly main's raw compose"); runnode scripts/tc959-check.mjs,python3 scripts/ci/test-deploy-recovery.py,node --test log-shipper/*.test.mjs.Existing tests (ruled, edited)
Naomi ruled YES (12:55Z).
log-shipper/profile.test.mjs:28and:30now include the new entries, each with a// test-ruling: TC-4177 …trailing comment (commit1e9aa4741f). Equality kept, nothing removed. New test filelog-shipper/ledger-start.test.mjs(4 tests) is registered in.github/workflows/logship.yml.Ran locally
node --test log-shipper/*.test.mjs: 31 tests, 31 pass, after the ruledprofile.test.mjsedit (before it: 30 pass, 1 fail). Thevector testrun below was on595e00d5; since then: the ruled test edit, the merge of main, and the recompute (the VRL/gate/cases are unchanged by the merge:git diff 1e9aa474 HEAD -- log-shipper/sanitize.vrl log-shipper/cases.mjsis empty).vector testwas NOT re-run on the merged head.node --test scripts/tc959-docker.test.mjs scripts/tc959-readiness.test.mjs: 26/26 pass.node scripts/tc959-check.mjs: pass (schema pin, compose isolation, image pins, embedded Vector parity), also on the TC-4194 P1: cloudflared connector in N0 compose, secret wiring, template hash #749 trial merge.python3 scripts/ci/test-deploy-recovery.py: 35/35 OK.vector test(Vector 0.59.0 gnu, LOCAL): profileerrors_slow466 passed / 0 failed, profileall_requests466 passed / 0 failed. Includes the new start-line cases (3 file states, failure variant, free-text file state not routed) and the whole-event-drop reject cases at the allowlist level.Not run
tc959-docker.mjs --go --ci; no Docker runs here);tc959-docker.mjsassertCaptureis unchanged and does not feed the new event.tracing::debug!->tracing::warn!with identical arguments; INFERENCE: compiles.node --test log-shipper/coverage.test.mjsscans it).deletion_ledger_startline from a real node: node: log deletion-ledger counts at startup (TC-4177) #750 is not merged, so the Vector cases build the node's line from node: log deletion-ledger counts at startup (TC-4177) #750's source (CODE-READ), not from a binary. Until node: log deletion-ledger counts at startup (TC-4177) #750 and this ship, the line is not observable on N0.0.59.0at/tmp/tc959-vector-0.59.0(same version as CI; its checksum was not compared to the pinned CI tarball).Rollback
Revert the commit; compose/hash revert with it. The Rust change only restores the previous log level. Deployed N0 needs a compose redeploy either way (the hash gate).
Details: TC-4177, TC-4190
After the merge with main (b925c14)
node --test log-shipper/*.test.mjs scripts/tc959-docker.test.mjs scripts/tc959-readiness.test.mjs57/57 pass;node scripts/tc959-check.mjspass;scripts/ci/test-deploy-recovery.py35/35 OK,test-cloudflared-connector.py6/6 OK,test-docker-tags.pyok. Not run on the merged head:vector test, cargo,tc959-docker.mjs.Four TC-1491 P4.2a codes folded in (Naomi ruling 02:15Z; head
5a95c4da9643e5f5e2fb4f6a182a9f3cf890a20d)So node #756 needs no second schema pin.
event_codeenum (schema #384 andlog-shipper/fields.json) gains, inserted aftershadow_drained_behind_pg:store_master_mode_unreadable_refused,store_master_backstop_rotation_failed,shadow_local_working_copy_missing,shadow_local_read_failed.log-shipper/diagnostics.jsonexactgains the four messages (taken from #756's draft patch, only these four of its nine):"sql store mode unreadable; refusing the request"(warn) ->store_master_mode_unreadable_refused"store-master backstop rotation failed"(warn) ->store_master_backstop_rotation_failed"sql_store: a store-master database has no working copy"(error) ->shadow_local_working_copy_missing"sql_store local source could not read a working copy"(warn) ->shadow_local_read_failedThe log lines do not exist on main yet (they arrive with #756).
node --test log-shipper/*.test.mjs(coverage.test.mjs: one-directional "every warn/error line has a code" and "every mapped code is a schema event_code"; tc959-check.mjs: same direction) passes with entries that have no emitter: 58/58 with the new test. New test inlog-shipper/ledger-start.test.mjspins the four mappings. #756 should merge after this and rebase oncanonical.json; its own hash commit lands last.CI timeout (Naomi go 03:33Z; head
1e2234e2227e43f5911764662a81542555af541e).github/workflows/logship.yml:boundaryjobtimeout-minutes20 -> 35, nothing else in that commit. The job already took 16-19 min on main; with the added Vector cases it hit 20 min and CI cancelled it (run 45446418043, 17:14:52Z-17:35:07Z; bothvector testprofiles andcap-checkhad passed;hosted-compose-proofwas skipped as a result).