Fix seven gaps in the dev base, VM creation and caproni reads
Seven fixes, one commit each, for dev base, VM creation and caproni runs that stop or read as something other than what they are.
Closes #14 (closed)
- Frontend on dev. node and yarn at the clone's
.tool-versionspins, checked against the nodejs.org checksums, thenyarn install --frozen-lockfileandyarn build:css.run.sh --nodeputs that node first onPATH. git amon dev. The clone gets a local identity when none is configured, and each patch keeps its author.- ClickHouse on dev. The SKILL.md snippet takes the newest
clickhouse-server:pin from the clone's CI config, and SKILL.md says how to restore whatgitlab:clickhouse:migraterewrites underdb/click_house/. - A development server on dev.
gce.mdcovers the schema load that empties the test database, the server's own settings, Vite, the content security policy, the stale PID file and how Pry reads a piped script. - Zone stockouts.
upnames the zone, the machine type and the two knobs that escape a capacity refusal. - Sidekiq memory on caproni.
SIM_SIDEKIQ_MEMORY_LIMITsets the limit through the chart overrides, andgce.mdgives the restart read to take before an absence inllm.logis trusted. - Usage events.
gce.mddrains the write buffer before an absence is read, and drift-check asserts the worker.
Why an early usage-event read comes back empty
An AI usage event goes to a Redis list first, and a cron worker moves it to PostgreSQL every five minutes, so a read inside that window finds no row.
sequenceDiagram
participant T as Gitlab::Tracking::AiTracking
participant R as Redis usage_event_write_buffer
participant W as UsageEvents::DumpWriteBufferCronWorker
participant P as ai_usage_events
T->>R: store_to_pg pushes the event
Note over P: a read now finds no row
W->>R: pop, on the cron or the gce.md drain
W->>P: upsert
Note over P: the row is readableWhat the simulations showed
A dev base cloned from the default branch on the day and a caproni instance on 19.4.1 with a staging license, both torn down afterwards.
The checks, each with its control
| check | result | control |
|---|---|---|
| dev bootstrap | the frontend block ran: tarball OK against SHASUMS256.txt, yarn install in 119 s, build:css in 16 s, CSS under app/assets/builds. The whole bootstrap took 503 s |
install_dev waits 1800 s |
run.sh --node 'node --version' |
v22.23.1 and yarn 1.22.19, the clone's .tool-versions pins |
without --node: v22.12.0 at /usr/bin/node and yarn 1.22.22, the build image's |
ai_user_metrics_spec.rb (a :click_house request spec), ClickHouse running |
47 examples, 0 failures, no sass error |
app/assets/builds moved aside: 47 examples, 47 failures, each cannot load such file -- sass |
Jest, ESLint and the gettext extractor through run.sh --node |
text_utility_spec.js 128 passed, lint:eslint exit 0, extract_gettext_all.js exit 0 |
not run |
git am of a patch with another author |
author kept, committer gitlab-simulation <sim@localhost> |
the same clone without its local identity, as the default branch leaves it: Committer identity unknown |
| the SKILL.md ClickHouse snippet as written | pulled clickhouse-server:26.2.13.2-alpine, the newer of the clone's two pins (25.1.8.25, 26.2.13.2), and the server answered 26.2.13.2 |
the tag the default branch's snippet names, 25.12.3, is not in the clone's CI config |
db/click_house/ after ClickHouse work |
RAILS_ENV=development rake gitlab:clickhouse:migrate changed 3 committed files (main.sql, two schema-cache files), and git checkout -- db/click_house left the tree clean |
the spec run above changed none, which is why the text names the rake task |
up when a zone has no capacity |
five creates across four zones ended <zone> has no capacity for <type> right now, so <instance> was not created with both knobs, after GCE's own ZONE_RESOURCE_POOL_EXHAUSTED. The three retries with GCP_ZONE exported named that zone |
the offline self-test's other-error case keeps instance create failed and <instance> does not exist |
caproni up with SIM_SIDEKIQ_MEMORY_LIMIT=4Gi |
the live sidekiq container has a 4Gi memory limit | helm template at the deployed chart version with the same values and no override: the same resources except that one limit, which is the base values' |
the gce.md restart read on a fresh install |
RESTARTS 1, LAST Error: sidekiq's first container exited 1 during boot, nine minutes before up returned, so gce.md now says to take the read when the run starts as well |
none |
| the usage-event drain | code_suggestion_shown_in_ide emitted through Gitlab::InternalEvents.track_event, the call POST /usage_data/track_event makes, with the drain cron disabled: buffer 1, 0 rows. After the gce.md drain as written: buffer 0, 1 row carrying the event's own timestamp |
the same read seven minutes after the emit, past one cron period, still buffer 1 and 0 rows |
Known limits
- The drain ran on a code suggestion event. Agent Platform session events take
the same
Ai::UsageEvent#store_to_pgpath, but no session ran. - sidekiq was not driven to an OOM kill, so
LASTreadError, notOOMKilled. - Prettier, HAML-lint and
lefthook run pre-pushare untried on the dev base.
Testing
just ci passes with the engine self-test at 437 checks (417 on the default
branch), and six mutations to the code these commits add or rely on each turn it
red. just drift-check passes 98 of 98 against master, just sims-check
passes, and Vale finds nothing beyond the default branch's nine warnings.
Claude Code wrote this change, its tests and this description, and ran the
checks above on the simulations. Each commit carries the AI-Assisted: yes and
AI-Tools: Claude Code trailers that CONTRIBUTING.md asks for.