databricks-tellr 0.3.10.dev1__tar.gz → 0.3.10.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/PKG-INFO +1 -1
- {databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/databricks_tellr/deploy.py +23 -31
- {databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/databricks_tellr.egg-info/PKG-INFO +1 -1
- {databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/pyproject.toml +1 -1
- {databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/README.md +0 -0
- {databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/databricks_tellr/__init__.py +0 -0
- {databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/databricks_tellr/_templates/app.yaml.template +0 -0
- {databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/databricks_tellr/_templates/requirements.txt.template +0 -0
- {databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/databricks_tellr.egg-info/SOURCES.txt +0 -0
- {databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/databricks_tellr.egg-info/dependency_links.txt +0 -0
- {databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/databricks_tellr.egg-info/requires.txt +0 -0
- {databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/databricks_tellr.egg-info/top_level.txt +0 -0
- {databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/setup.cfg +0 -0
|
@@ -1117,12 +1117,12 @@ def _delete_branch(
|
|
|
1117
1117
|
raise
|
|
1118
1118
|
|
|
1119
1119
|
|
|
1120
|
-
# Lakebase branch TTL: 1 day.
|
|
1121
|
-
#
|
|
1122
|
-
#
|
|
1123
|
-
#
|
|
1124
|
-
#
|
|
1125
|
-
# the
|
|
1120
|
+
# Lakebase branch TTL: 1 day. This is now only an orphan backstop — if a deploy
|
|
1121
|
+
# crashes between create and cleanup, the TTL eventually garbage-collects the
|
|
1122
|
+
# stranded branch. The normal flow no longer relies on it: branches use fixed
|
|
1123
|
+
# names and are explicitly deleted and recreated (_recreate_ephemeral_branch,
|
|
1124
|
+
# delete_local) via _delete_branch, whose delete is idempotent and was verified
|
|
1125
|
+
# to leave the name immediately reusable.
|
|
1126
1126
|
_BRANCH_TTL_SECONDS = 86400
|
|
1127
1127
|
|
|
1128
1128
|
|
|
@@ -1130,26 +1130,19 @@ def _create_branch_from(
|
|
|
1130
1130
|
ws: WorkspaceClient,
|
|
1131
1131
|
project_name: str,
|
|
1132
1132
|
source_branch: str,
|
|
1133
|
-
|
|
1133
|
+
branch_id: str,
|
|
1134
1134
|
) -> dict[str, Any]:
|
|
1135
|
-
"""Create a new Lakebase branch as a child of
|
|
1135
|
+
"""Create a new Lakebase branch named ``branch_id`` as a child of
|
|
1136
|
+
``source_branch``.
|
|
1136
1137
|
|
|
1137
|
-
The branch
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
Branch is created with a 1-day TTL so Lakebase garbage-collects it for us.
|
|
1143
|
-
The staging app the branch backs will break after ~1 day; re-deploy to get
|
|
1144
|
-
a fresh branch. This trade is intentional: no cleanup code, no stale state.
|
|
1138
|
+
The branch id is used verbatim (a fixed per-instance name). A 1-day TTL is
|
|
1139
|
+
attached purely as an orphan backstop so abandoned instances get
|
|
1140
|
+
garbage-collected; freshness comes from delete-then-create (see
|
|
1141
|
+
_recreate_ephemeral_branch), not from the TTL.
|
|
1145
1142
|
|
|
1146
1143
|
Waits on the create operation, then polls list_endpoints on the new branch
|
|
1147
|
-
until an endpoint with a populated host appears
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
Returns a lakebase_result-shaped dict pointing at the new branch, with an
|
|
1151
|
-
added `branch_id` field so callers can reference the unique name (e.g.,
|
|
1152
|
-
for SP role registration).
|
|
1144
|
+
until an endpoint with a populated host appears. Raises DeploymentError on
|
|
1145
|
+
timeout. Returns a lakebase_result-shaped dict with an added ``branch_id``.
|
|
1153
1146
|
"""
|
|
1154
1147
|
if not HAS_AUTOSCALING_SDK:
|
|
1155
1148
|
raise DeploymentError(
|
|
@@ -1157,7 +1150,6 @@ def _create_branch_from(
|
|
|
1157
1150
|
"Upgrade databricks-sdk."
|
|
1158
1151
|
)
|
|
1159
1152
|
|
|
1160
|
-
branch_id = f"{target_branch_prefix}-{int(time.time())}"
|
|
1161
1153
|
source_path = f"projects/{project_name}/branches/{source_branch}"
|
|
1162
1154
|
target_parent = f"projects/{project_name}"
|
|
1163
1155
|
target_path = f"projects/{project_name}/branches/{branch_id}"
|
|
@@ -1214,17 +1206,17 @@ def _recreate_ephemeral_branch(
|
|
|
1214
1206
|
ws: WorkspaceClient,
|
|
1215
1207
|
project_name: str,
|
|
1216
1208
|
source_branch: str,
|
|
1217
|
-
|
|
1209
|
+
branch_id: str,
|
|
1218
1210
|
) -> dict[str, Any]:
|
|
1219
|
-
"""
|
|
1211
|
+
"""Refresh an ephemeral Lakebase branch to a fresh copy of source_branch.
|
|
1220
1212
|
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
collide for many minutes.
|
|
1213
|
+
Deletes ``branch_id`` (idempotent — no-op if absent) then recreates it from
|
|
1214
|
+
``source_branch``. Delete-then-create on a fixed name was verified clean
|
|
1215
|
+
(~6s, no collision); the older "skip delete and rely on TTL" workaround is
|
|
1216
|
+
no longer needed.
|
|
1226
1217
|
"""
|
|
1227
|
-
|
|
1218
|
+
_delete_branch(ws, project_name, branch_id)
|
|
1219
|
+
return _create_branch_from(ws, project_name, source_branch, branch_id)
|
|
1228
1220
|
|
|
1229
1221
|
|
|
1230
1222
|
def _write_requirements(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/databricks_tellr.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{databricks_tellr-0.3.10.dev1 → databricks_tellr-0.3.10.dev2}/databricks_tellr.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|