Skip to content

test(e2e): fix 4 pre-existing nightly failures (swap/clone/stream/config-secret)#521

Merged
padak merged 1 commit into
mainfrom
fix/e2e-nightly-failures
Jul 22, 2026
Merged

test(e2e): fix 4 pre-existing nightly failures (swap/clone/stream/config-secret)#521
padak merged 1 commit into
mainfrom
fix/e2e-nightly-failures

Conversation

@padak

@padak padak commented Jul 22, 2026

Copy link
Copy Markdown
Member

Fixes the 4 pre-existing nightly E2E failures that remained red after the E2E_API_TOKEN rotation (#518). None are product regressions or related to v0.75.0 — each is a test-side defect or an environment/consistency quirk. All diagnosed by reproducing live against the E2E project (5946) on 2026-07-22. Test-only diff; no src/ behavior changes.

Before: 4 failed, 111 passed. After (all four, live): 4 passed.

Root causes & fixes

Test Root cause Fix
test_clone_prod_table_into_dev_branch STEP 1 created a table on the default branch without creating its bucket. create-table auto-creates the bucket only in a dev branch (to materialize the branch's isolated storage); the production path needs it to exist. (The swap test gets away with it because it creates with --branch.) Added the missing create-bucket step.
test_config_create_and_update_encrypt_secret _read_password indexed data["configuration"], but _run_ok returns the full {status, data} envelope — the config body is at data["data"]["configuration"]. Corrected the access path.
test_swap_in_dev_branch_exchanges_schemas The swap is correct, but the test read the raw /tables/{id} definition.columns block, which is read-after-DDL eventually consistent on this stack — it kept reporting the pre-swap length for >30s. The CLI's normalized column_details reflects the swap immediately. Read lengths via storage table-detailcolumn_details (what a user/agent sees), with a short safety poll.
test_stream_otlp_e2e The fixed source name kbagent-e2e-stream had a wedged server-side delete task (unremovable via the API — confirmed: still processing after 5+ min, even after removing its sink bucket), and --if-not-exists reused it every run, so cleanup could never succeed. Unique per-run source name (fresh sources create+delete in ~3s, isolated from any orphan); tolerate a retryable TIMEOUT on delete by confirming eventual removal via a polled list; best-effort drop the lingering sink bucket.

Why test-side, not product

  • swap: column_details (the field the CLI/SDK surface) is immediately consistent after a swap in every repro; only the raw definition.columns block lags. So the product output users consume is correct — the test was reading a laggy internal field.
  • stream: fresh sources delete in ~3s; the only >60s cases were the one wedged orphan (which no timeout would fix). I deliberately did not bump STREAM_TASK_TIMEOUT — there's no evidence a legitimate delete needs longer, and the tolerant-cleanup + list-poll already covers a hypothetical slow-but-successful delete.

Verification

  • All 4 tests pass live against 5946 (4 passed in 92s).
  • make check green (4648 passed, 8 skipped).
  • Orphan hygiene: removed 3 stale in.c-otlp-* sink buckets from prior runs. The wedged kbagent-e2e-stream source itself is unremovable via the API and remains as an orphan — it needs platform cleanup, but with the unique-name fix it no longer blocks the test.

Note for maintainers

The wedged kbagent-e2e-stream Stream source on project 5946 cannot be deleted through the API (delete task hangs indefinitely). It's harmless now (the test no longer references it) but may warrant a platform-side cleanup.


Open in Devin Review

…fig-secret)

These four failed on the nightly independently of the expired-token outage
(#518) and of the v0.75.0 release. Each is a test-side defect or an
environment/consistency quirk, not a product regression -- all verified live
against project 5946 on 2026-07-22. No source behavior changes.

- clone (test_clone_prod_table_into_dev_branch): STEP 1 created a table on the
  DEFAULT branch without first creating its bucket. create-table auto-creates
  the bucket only in a dev branch (to materialize the branch's isolated
  storage); on the production path the bucket must exist. Added the missing
  create-bucket step.

- config-secret (test_config_create_and_update_encrypt_secret): _read_password
  indexed data["configuration"], but _run_ok returns the full {status, data}
  envelope, so the config body is at data["data"]["configuration"]. Corrected
  the path.

- swap (test_swap_in_dev_branch_exchanges_schemas): the swap is correct, but
  the test read the raw /tables/{id} `definition.columns` block, which is
  read-after-DDL eventually consistent on this stack -- it kept reporting the
  pre-swap length for >30s. The CLI's normalized `column_details` reflects the
  swap immediately, so the test now reads lengths via `storage table-detail`
  (with a short safety poll), matching what a user/agent actually sees.

- stream (test_stream_otlp_e2e): the fixed source name `kbagent-e2e-stream`
  had a wedged server-side delete task (unremovable via the API), and
  --if-not-exists reused it every run, so cleanup could never succeed. Use a
  unique per-run source name (fresh sources create+delete in ~3s), tolerate a
  retryable TIMEOUT on delete by confirming eventual removal via a polled list,
  and best-effort drop the auto-provisioned sink bucket that lingers after the
  source is gone.

make check green (4648 passed). Test-only diff.

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@padak
padak merged commit 98127df into main Jul 22, 2026
5 checks passed
@padak
padak deleted the fix/e2e-nightly-failures branch July 22, 2026 11:28
padak added a commit that referenced this pull request Jul 22, 2026
…523)

Follow-up to #521. Poll the tag-filtered Files list until the just-uploaded file appears (bounded ~30s) instead of asserting the first read, in both the SDK-facade round-trip and the CLI file-ops flow. The upload is durable; only the tag index lags (read-after-write eventually consistent). Test-only; make check green.
padak added a commit that referenced this pull request Jul 22, 2026
…(internal) (#525)

Internal-only maintenance release: client.py -> client/ package split (#520/#524) + nightly E2E flake fixes (#521/#523). No user-facing behavior changes. Version bumped, changelog added, manifests synced, make check green.
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