fdl-cli 0.24.1__tar.gz → 0.24.2__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.
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/CHANGELOG.md +26 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/PKG-INFO +1 -1
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/pyproject.toml +1 -1
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/repo.py +6 -1
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/stores.py +9 -1
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_http.py +17 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_profiles.py +41 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/uv.lock +1 -1
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.github/workflows/docs.yml +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.github/workflows/publish.yml +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.github/workflows/release.yml +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.github/workflows/test.yml +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.gitignore +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.node-version +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.python-version +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/CLAUDE.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/CONTRIBUTING.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/LICENSE +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/README.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/SECURITY.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/blume.config.ts +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/cases/collection.json +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/concepts/meta.ts +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/concepts/repositories.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/concepts/versions-and-refs.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/concepts/working-catalogs.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/getting-started.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/building-a-host.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/meta.ts +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/mirrors.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/public-and-private.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/reading-without-duckdb.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/serving-over-http.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/stores.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/index.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/internals/ducklake-formats.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/internals/from-write-to-read.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/internals/inside-a-repository.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/internals/meta.ts +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/concepts/meta.ts +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/concepts/repositories.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/concepts/versions-and-refs.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/concepts/working-catalogs.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/getting-started.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/building-a-host.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/meta.ts +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/mirrors.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/public-and-private.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/reading-without-duckdb.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/serving-over-http.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/stores.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/index.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/internals/ducklake-formats.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/internals/from-write-to-read.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/internals/inside-a-repository.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/internals/meta.ts +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/reference/cli.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/reference/meta.ts +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/reference/python.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/collection-cases.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/data-files.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/http.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/index.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/layout.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/meta.ts +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/reading.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/refs.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/versions.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/writing.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/stability.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/reference/cli.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/reference/meta.ts +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/reference/python.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/collection-cases.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/data-files.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/http.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/index.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/layout.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/meta.ts +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/reading.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/refs.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/versions.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/writing.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/stability.md +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/package-lock.json +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/package.json +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/public/CNAME +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/__init__.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/catalog.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/cli.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/dataset.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/diff.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/layout.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/lineage.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/merge.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/objects.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/profiles.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/py.typed +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/refs.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/store.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/version.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/http_repo.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_cli.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_collection_cases.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_dataset.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_merge.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_objects.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_repo.py +0 -0
- {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_stores.py +0 -0
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## v0.24.2 (2026-11-13)
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
- Give requests over HTTP a timeout so a silent host fails instead of hanging
|
|
9
|
+
([#54](https://github.com/queria-io/fdl/pull/54),
|
|
10
|
+
[`a7070a5`](https://github.com/queria-io/fdl/commit/a7070a5c06de0a6cd1e8862d9afa766fb822759f))
|
|
11
|
+
|
|
12
|
+
- Reuse a parent's profile when only files.json's columns key differs
|
|
13
|
+
([#55](https://github.com/queria-io/fdl/pull/55),
|
|
14
|
+
[`30223cb`](https://github.com/queria-io/fdl/commit/30223cb158d86db0a5aad216dd06d0f9483c9637))
|
|
15
|
+
|
|
16
|
+
* fix: reuse a parent's profile when only files.json's columns key differs
|
|
17
|
+
|
|
18
|
+
A parent written before files.json listed each table's columns never matched, so every commit on top
|
|
19
|
+
of it profiled every table from all of its data. Compare only the data files; profiles.reusable
|
|
20
|
+
already checks the columns.
|
|
21
|
+
|
|
22
|
+
* fix: still compare the columns when the parent's files.json lists them
|
|
23
|
+
|
|
24
|
+
Comparing only the data files kept a stale profile for a column dropped and added again under the
|
|
25
|
+
same name and type: the data files and the names and types match, but the column is new and has no
|
|
26
|
+
values. Leave the columns out of the comparison only for a parent written before files.json listed
|
|
27
|
+
them.
|
|
28
|
+
|
|
29
|
+
|
|
4
30
|
## v0.24.1 (2026-11-13)
|
|
5
31
|
|
|
6
32
|
### Bug Fixes
|
|
@@ -568,7 +568,12 @@ def write_profiles(
|
|
|
568
568
|
key = f"{table['schema']}.{table['name']}"
|
|
569
569
|
relative = profiles.path(table["schema"], table["name"])
|
|
570
570
|
previous = None
|
|
571
|
-
|
|
571
|
+
before, now = files_before.get(key), files_now.get(key, {})
|
|
572
|
+
if before is not None and "columns" not in before:
|
|
573
|
+
# A parent written before files.json listed the columns: compare the
|
|
574
|
+
# rest, and leave the names and types to profiles.reusable.
|
|
575
|
+
now = {name: value for name, value in now.items() if name != "columns"}
|
|
576
|
+
if parent is not None and before is not None and before == now:
|
|
572
577
|
try:
|
|
573
578
|
previous = store.get(layout.version_dir(parent.id) + relative)
|
|
574
579
|
except Exception as exc: # noqa: BLE001
|
|
@@ -69,8 +69,14 @@ class _SameOriginRedirects(urllib.request.HTTPRedirectHandler):
|
|
|
69
69
|
_opener = urllib.request.build_opener(_SameOriginRedirects)
|
|
70
70
|
|
|
71
71
|
|
|
72
|
+
#: Seconds a request may wait to connect, or between two reads of the answer,
|
|
73
|
+
#: before it fails. Without it a connection a host stops answering holds the
|
|
74
|
+
#: command forever instead of failing so it can be run again.
|
|
75
|
+
TIMEOUT = 120
|
|
76
|
+
|
|
77
|
+
|
|
72
78
|
def _open(request: urllib.request.Request):
|
|
73
|
-
return _opener.open(request)
|
|
79
|
+
return _opener.open(request, timeout=TIMEOUT)
|
|
74
80
|
|
|
75
81
|
|
|
76
82
|
class StoreError(RuntimeError):
|
|
@@ -318,6 +324,8 @@ class HttpStore:
|
|
|
318
324
|
) from exc
|
|
319
325
|
except urllib.error.URLError as exc:
|
|
320
326
|
raise StoreError(f"{method} {key or '/'}: {exc.reason}") from exc
|
|
327
|
+
except TimeoutError as exc:
|
|
328
|
+
raise StoreError(f"{method} {key or '/'}: no answer in {TIMEOUT} s") from exc
|
|
321
329
|
|
|
322
330
|
@staticmethod
|
|
323
331
|
def _conditions(
|
|
@@ -411,3 +411,20 @@ def test_a_merge_over_http(served, tmp_path: Path) -> None:
|
|
|
411
411
|
)
|
|
412
412
|
assert con.execute("SELECT count(*) FROM v.main.towns").fetchone() == (4,)
|
|
413
413
|
assert con.execute("SELECT count(*) FROM v.main.roads").fetchone() == (1,)
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
def test_a_host_that_stops_answering_fails_instead_of_waiting(monkeypatch) -> None:
|
|
417
|
+
import socket
|
|
418
|
+
import threading
|
|
419
|
+
|
|
420
|
+
listener = socket.socket()
|
|
421
|
+
listener.bind(("127.0.0.1", 0))
|
|
422
|
+
listener.listen()
|
|
423
|
+
accepted = []
|
|
424
|
+
threading.Thread(target=lambda: accepted.append(listener.accept()), daemon=True).start()
|
|
425
|
+
monkeypatch.setattr(stores, "TIMEOUT", 0.5)
|
|
426
|
+
try:
|
|
427
|
+
with pytest.raises(StoreError, match="no answer"):
|
|
428
|
+
HttpStore(f"http://127.0.0.1:{listener.getsockname()[1]}/").get("fdl.json")
|
|
429
|
+
finally:
|
|
430
|
+
listener.close()
|
|
@@ -129,6 +129,47 @@ def test_an_unchanged_table_keeps_its_parents_profile(repository, monkeypatch) -
|
|
|
129
129
|
assert profile_of(store, "other")["rows"] == 2
|
|
130
130
|
|
|
131
131
|
|
|
132
|
+
def test_a_parent_without_columns_in_its_files_keeps_its_profile(repository, monkeypatch) -> None:
|
|
133
|
+
store, working = repository
|
|
134
|
+
write(working, store, "CREATE TABLE lake.main.towns AS SELECT 1 AS id")
|
|
135
|
+
write(working, store, "CREATE TABLE lake.main.other AS SELECT 1 AS id")
|
|
136
|
+
commit(working, "-m", "m", "--author", "t")
|
|
137
|
+
parent = repo.head(store)
|
|
138
|
+
key = layout.version_dir(parent.id) + parent.files.path
|
|
139
|
+
files = json.loads(store.get(key))
|
|
140
|
+
for table in files["tables"].values():
|
|
141
|
+
table.pop("columns", None)
|
|
142
|
+
store.put(key, json.dumps(files).encode())
|
|
143
|
+
write(working, store, "INSERT INTO lake.main.other VALUES (2)")
|
|
144
|
+
|
|
145
|
+
built: list[str] = []
|
|
146
|
+
original = profiles.build
|
|
147
|
+
|
|
148
|
+
def spy(working, wanted, **kwargs):
|
|
149
|
+
wanted = list(wanted)
|
|
150
|
+
built.extend(t["name"] for t in wanted)
|
|
151
|
+
return original(working, wanted, **kwargs)
|
|
152
|
+
|
|
153
|
+
monkeypatch.setattr(profiles, "build", spy)
|
|
154
|
+
commit(working, "-m", "again", "--author", "t")
|
|
155
|
+
assert built == ["other"]
|
|
156
|
+
assert profile_of(store, "towns")["rows"] == 1
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def test_a_column_dropped_and_added_again_is_profiled_again(repository) -> None:
|
|
160
|
+
store, working = repository
|
|
161
|
+
write(working, store, "CREATE TABLE lake.main.towns AS SELECT i AS id, i AS c FROM range(5) t(i)")
|
|
162
|
+
write(working, store, "CREATE TABLE lake.main.other AS SELECT 1 AS id")
|
|
163
|
+
commit(working, "-m", "m", "--author", "t")
|
|
164
|
+
# The same name and type, and the same data files, but a new column with no values.
|
|
165
|
+
write(working, store, "ALTER TABLE lake.main.towns DROP COLUMN c")
|
|
166
|
+
write(working, store, "ALTER TABLE lake.main.towns ADD COLUMN c BIGINT")
|
|
167
|
+
write(working, store, "INSERT INTO lake.main.other VALUES (2)")
|
|
168
|
+
commit(working, "-m", "again", "--author", "t")
|
|
169
|
+
c = {column["name"]: column for column in profile_of(store)["columns"]}["c"]
|
|
170
|
+
assert c.get("max") is None
|
|
171
|
+
|
|
172
|
+
|
|
132
173
|
def test_expiry_deletes_the_profiles(repository) -> None:
|
|
133
174
|
store, working = repository
|
|
134
175
|
write(working, store, "CREATE TABLE lake.main.towns AS SELECT 1 AS id")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|