Skip to content

fix(csharp): isolate per-run mutable state to a per-job schema#446

Open
jadewang-db wants to merge 1 commit intomainfrom
stack/PECO-3000-e2e-schema-isolation
Open

fix(csharp): isolate per-run mutable state to a per-job schema#446
jadewang-db wants to merge 1 commit intomainfrom
stack/PECO-3000-e2e-schema-isolation

Conversation

@jadewang-db
Copy link
Copy Markdown
Collaborator

@jadewang-db jadewang-db commented May 6, 2026

🥞 Stacked PR

Use this link to review incremental changes.


What's Changed

Each Tests Workflow job (and matrix entry) now creates its own per-run
schema in the shared workspace and drops it at job end:

main.adbc_testing_run_${run_id}${run_attempt}${protocol}

CI uses this name for db_schema, metadata.schema, and the connection
test query. Existing tests that mutate state via TestConfiguration.
Metadata.Schema (StatementTests, DriverTests, ClientTests, the
Databricks.sql template, etc.) automatically inherit the isolation
without code changes.

main.adbc_testing remains as the read-only fixture schema. The two
test classes that hard-code it (SeaMetadataE2ETests,
StatementMetadataTelemetryTests) now reference
DatabricksTestEnvironment.FixtureSchema with a comment noting the
read-only contract.

Why: cross-job races on the shared workspace were the root cause of
PECO-3000 flakes. Disabling intra-assembly parallelism (PR #395)
covered within-job races; this change closes the across-job races
(thrift/rest matrix entries, parallel merge-queue PRs).

The cleanup step uses if: always() so failed/cancelled jobs still drop
their schemas. Cleanup errors warn but do not fail the job — leaked
schemas are harmless and can be GC'd separately.

Adds docs/e2e-test-isolation-guidance.md describing the schema model
and the rules for writing/reviewing E2E tests against a shared
workspace.

Co-authored-by: Isaac

Please fill in a description of the changes here.

This contains breaking changes.

Closes #NNN.

Each Tests Workflow job (and matrix entry) now creates its own per-run
schema in the shared workspace and drops it at job end:

  main.adbc_testing_run_${run_id}_${run_attempt}_${protocol}

CI uses this name for db_schema, metadata.schema, and the connection
test query. Existing tests that mutate state via TestConfiguration.
Metadata.Schema (StatementTests, DriverTests, ClientTests, the
Databricks.sql template, etc.) automatically inherit the isolation
without code changes.

main.adbc_testing remains as the read-only fixture schema. The two
test classes that hard-code it (SeaMetadataE2ETests,
StatementMetadataTelemetryTests) now reference
DatabricksTestEnvironment.FixtureSchema with a comment noting the
read-only contract.

Why: cross-job races on the shared workspace were the root cause of
PECO-3000 flakes. Disabling intra-assembly parallelism (PR #395)
covered within-job races; this change closes the across-job races
(thrift/rest matrix entries, parallel merge-queue PRs).

The cleanup step uses if: always() so failed/cancelled jobs still drop
their schemas. Cleanup errors warn but do not fail the job — leaked
schemas are harmless and can be GC'd separately.

Adds docs/e2e-test-isolation-guidance.md describing the schema model
and the rules for writing/reviewing E2E tests against a shared
workspace.

Co-authored-by: Isaac
@jadewang-db jadewang-db added the e2e-test Trigger E2E tests on this PR label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e-test Trigger E2E tests on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant