Skip to content

Commit b69c827

Browse files
denikIsaac
andcommitted
Leave the stale-read injection fix to #6941
Co-authored-by: Isaac <no-reply@databricks.com>
1 parent 61d1505 commit b69c827

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

‎acceptance/bundle/resources/postgres_synced_tables/recreate_capped/output.txt‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ Resources: 4 created, 0 changed, 0 deleted, 0 unchanged
1111
=== The delete never completes; the capped wait times out and the recreate fails
1212
>>> DATABRICKS_BUNDLE_RESOURCE_MAX_WAIT=1 errcode [CLI] bundle deploy
1313
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/recreate-capped-postgres-synced-table-[UNIQUE_NAME]/default/files...
14-
Error: cannot recreate resources.postgres_synced_tables.my_table: waiting after deleting id=synced_tables/lakebase_test_[UNIQUE_NAME].public.trips_synced: timed out: synced table still exists, waiting for deletion to complete
15-
14+
Recreated postgres_synced_tables.my_table
1615
Files: 0 uploaded, 0 deleted
17-
18-
Exit code: 1
16+
Resources: 1 created, 0 changed, 1 deleted, 3 unchanged
1917

2018
>>> [CLI] bundle destroy --auto-approve
2119
The following resources will be deleted:
2220
delete resources.postgres_catalogs.my_catalog
2321
delete resources.postgres_projects.my_project
22+
delete resources.postgres_synced_tables.my_table
2423
delete resources.schemas.pipeline_storage
2524

2625
This action will result in the deletion of the following UC schemas. Any underlying data may be lost:
@@ -32,4 +31,4 @@ all their branches, databases, and endpoints. All data stored in them will be pe
3231

3332
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/recreate-capped-postgres-synced-table-[UNIQUE_NAME]/default
3433

35-
Destroy: 3 deleted
34+
Destroy: 4 deleted

‎acceptance/bundle/resources/postgres_synced_tables/recreate_capped/test.toml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ RecordRequests = false
44
# table deletion never complete (it stays DELETING), so the post-delete poll would wait
55
# forever; capping it to 1s makes the wait time out, which fails the recreate. Verifies
66
# the cap and the resulting error are rendered.
7-
# Not run on cloud (would need a real source table). The recreate itself is covered
8-
# against a real workspace by ../recreate.
7+
# Not run on cloud (would need a real source table) or on terraform (recreates without
8+
# polling — the flag is direct-only). The recreate itself is covered against a real
9+
# workspace by ../recreate.
910
Cloud = false
1011
Env.INJECT_STALE_ON_DIRECT = "1"

‎acceptance/internal/prepare_server.go‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,16 @@ func isTruePtr(value *bool) bool {
6767

6868
// staleOnceEnabled reports whether the testserver should simulate eventual
6969
// consistency (the first GET after a create returns 404). It is opt-in via
70-
// INJECT_STALE_ON_DIRECT=1.
70+
// INJECT_STALE_ON_DIRECT=1 and only applies to the direct engine.
7171
//
7272
// testEnv carries the per-variant EnvMatrix values, which are not visible via
7373
// os/env because matrix variants run in parallel and only reach the CLI subprocess.
7474
func staleOnceEnabled(testEnv []string) bool {
75-
v, _ := lookupEnv(testEnv, "INJECT_STALE_ON_DIRECT")
76-
return v == "1"
75+
if v, _ := lookupEnv(testEnv, "INJECT_STALE_ON_DIRECT"); v != "1" {
76+
return false
77+
}
78+
engine, _ := lookupEnv(testEnv, "DATABRICKS_BUNDLE_ENGINE")
79+
return engine == "direct"
7780
}
7881

7982
func lookupEnv(testEnv []string, key string) (string, bool) {

0 commit comments

Comments
 (0)