Skip to content

acc: keep workspace files in testserver for local DMS tests - #7051

Open
denik wants to merge 1 commit into
mainfrom
denis/dms-testserver-workspace-files
Open

denik wants to merge 1 commit into
mainfrom
denis/dms-testserver-workspace-files

Conversation

@denik

@denik denik commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Keep ordinary workspace file content in testserver while routing DMS, workspace hierarchy, and permissions to LITE. Mirror successful directory creation and deletion so both stores stay consistent. Deployment nodes still come from real DMS.

Why

Forwarding ordinary file content through LITE adds avoidable work to local CLI/DMS acceptance tests. This comparison changes only the CLI routing adapter; Universe stays unoptimized, and DMS still runs its real handlers and MySQL-backed EntityStore.

Fresh measurements on the same Linux amd64 Arclet (8 visible CPUs), Go 1.27.2, fixture JDK 17:

Component / leaf subtest Main first PR first Main warm mean PR warm mean
CLI + real DMS: job no-drift, DMS=true 27.75s 16.65s 15.283s 7.680s
CLI + LITE workspace: job no-drift, DMS= 20.32s 6.75s 12.780s 4.480s
CLI + real DMS: dedicated DMS no-drift See samples See samples 12.823s 7.147s

These are leaf test durations, not single CLI calls or whole-command/build times. Job tests were each run first against a newly launched fixture, followed by seven warm DMS-on or three warm DMS-off runs. The dedicated DMS fixture was run later on each already-warm service; its first iteration is not a cold-service measurement. Fixture bootstrap and Go/Bazel builds are excluded.

All warm samples, seconds:

  • Job DMS-on main: 17.02, 15.37, 15.87, 15.09, 14.74, 14.06, 14.83; PR: 8.43, 7.67, 8.38, 7.24, 7.22, 8.05, 6.77.
  • Job DMS-off main: 12.87, 13.26, 12.21; PR: 4.70, 4.55, 4.19.
  • Dedicated DMS no-drift main: first 13.89, then 12.66, 12.71, 13.10; PR: first 7.05, then 7.23, 7.52, 6.69.

Warm improvements: 49.7% for the DMS-on job, 64.9% for the DMS-off job, and 44.3% for dedicated DMS no-drift. Warm sample standard deviations, main → PR: 0.949s → 0.635s, 0.531s → 0.262s, and 0.241s → 0.421s, respectively. Every timed repetition passed.

CLI baseline c2f4faa1ddd4, PR bd058b1eabb8. Both use unchanged Universe main snapshot 16791bc6f5b6. Neither includes the filename-configuration, ACL-client, home-grant, or other experimental performance patches.

Exact setup: keep the CLI checkout anywhere inside Universe for settings-file discovery. From Universe, build once, before sampling:

bazel build //bundle/metadata-service/test:cli-testenv-bin \
  --tool_tag=ai-agent --test_output=errors --noshow_progress --noshow_loading_progress

Launch the same built fixture on a terminal for each side and wait for Ammonite's @ prompt:

UNIVERSE_CHECKOUT=/home/denis.bilenko/universe
cd "$UNIVERSE_CHECKOUT/bazel-bin/bundle/metadata-service/test/cli-testenv-bin.runfiles/_main"
env -u RUNFILES_DIR -u LITE_ENVIRONMENT_NAME \
  DB_TESTING=true BUILD_WORKSPACE_DIRECTORY="$UNIVERSE_CHECKOUT" \
  "$UNIVERSE_CHECKOUT/bazel-bin/bundle/metadata-service/test/cli-testenv-bin"

This writes bundle/metadata-service/test/.lite/cli-endpoints.json, discovered by the CLI. Both sides use terminal launch to exclude the separately fixed launcher EOF loop. Stop with exit and wait for container teardown before restarting.

From the CLI root, check out each CLI revision above and run the DMS-on job command against a fresh fixture:

env -u CLOUD_ENV -u DMS_CLI_ENDPOINTS_FILE \
  PATH=/home/denis.bilenko/.local/bin:$PATH go test ./acceptance \
  -run 'TestAccept/bundle/invariant/no_drift/DMS=true$/INPUT_CONFIG=job\.yml\.tmpl$/READPLAN=$' \
  -count=8 -parallel=1 -v

Then, on the already-warm fixture:

env -u CLOUD_ENV -u DMS_CLI_ENDPOINTS_FILE \
  PATH=/home/denis.bilenko/.local/bin:$PATH go test ./acceptance \
  -run 'TestAccept/bundle/dms/no-drift$' -count=4 -parallel=1 -v

Restart the fixture separately for the DMS-off job comparison:

env -u CLOUD_ENV -u DMS_CLI_ENDPOINTS_FILE \
  PATH=/home/denis.bilenko/.local/bin:$PATH go test ./acceptance \
  -run 'TestAccept/bundle/invariant/no_drift/DMS=$/INPUT_CONFIG=job\.yml\.tmpl$/READPLAN=$' \
  -count=4 -parallel=1 -v

The DMS-off segment must be DMS=$: DMS= also selects DMS=true. An initial mixed batch was discarded and retained only as invalid raw evidence. The main DMS-on and dedicated-fixture commands initially omitted -parallel=1, but selected exactly one leaf per iteration; no sibling tests ran concurrently.

Raw samples and setup notes are experimental, unreviewed evidence. The older 55.57s result was not reproduced and is not used in this comparison.

Tests

All 32 timed repetitions passed against real LITE services: 16 DMS-on jobs, 8 DMS-off jobs, and 8 dedicated DMS no-drift fixtures. The broader real-DMS selection passed 20/22 fixture directories. Both failing directories were rerun on unchanged CLI main and fail there too: immutable-folder sends an unsupported internal_immutable_snapshots resource prefix to DMS; version-never-created expects a testserver-injected error that real DMS does not return. No expected outputs or assertions were changed.

go test ./acceptance -run '^TestAccept$/^bundle$/^dms$' -count=1 -parallel=4 -json
# On unchanged CLI main, confirm both unsupported cases:
go test ./acceptance \
  -run '^TestAccept$/^bundle$/^dms$/^(immutable-folder|version-never-created)$' \
  -count=1 -parallel=2 -json

./task fmt, ./task checks, and ./task lint passed with Go 1.27.2. ./task test completed successfully: 12,159 root-module tests (131 skipped), 73 tools tests, and 4,304 acceptance tests (5 skipped). The acceptance runner retried one upload-504/DMS=true output-order mismatch, which passed on retry. These ordinary repository tests ran without a discoverable LITE settings file, using pure testserver; real-DMS coverage is reported separately above.

This PR was written with Codex.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: bd058b1

Run: 38881249361

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 276 15 5:30
✅​ aws-windows-latest-4core-16gb 278 13 5:38
✅​ azure linux-2core-8gb 275 15 5:28
✅​ azure-windows-latest-4core-16gb 277 13 5:26
✅​ gcp linux-2core-8gb 276 15 5:35
✅​ gcp-windows-latest-4core-16gb 278 13 4:10
Top 6 slowest tests (at least 2 minutes):
duration env testname
5:31 aws-windows-latest-4core-16gb TestAccept
5:18 azure-windows-latest-4core-16gb TestAccept
4:05 gcp-windows-latest-4core-16gb TestAccept
3:59 gcp linux-2core-8gb TestAccept
3:55 aws linux-2core-8gb TestAccept
3:53 azure linux-2core-8gb TestAccept

@denik
denik force-pushed the denis/dms-testserver-workspace-files branch from d6581f8 to bd058b1 Compare October 16, 2026 09:32
@denik
denik marked this pull request as ready for review October 16, 2026 13:09
@denik
denik requested a review from a team as a code owner October 16, 2026 13:09
@denik
denik requested a review from andrewnester October 16, 2026 13:09

This branch has not been deployed

No deployments
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