Skip to content

Commit 58aac9a

Browse files
committed
test(downstream): run DataHub Git integration for its latest release
Complete the five-current-user compatibility matrix with `acryl-datahub`. Resolve the latest PyPI release and retrieve its tag from `acryldata/datahub`, which publishes patch tags missing from the repository named by package metadata. Run the unchanged Git integration file against the installed release and this editable GitPython checkout. Exclude unrelated SQL/docker conftests, disable telemetry, and clear the private SSH test credential variable. The selected tests still exercise a real public GitLab clone and fixed-commit checkout, a localhost SSH timeout, GitCommandError handling, password redaction, and source configuration. The upstream private-clone test retains its credential-dependent skip. Document all five current users and their September 2026 download ranking, including optional runtime integrations, distribution deduplication, and projects whose latest releases dropped GitPython. Add an all-project local command and the fifth CI matrix entry. The shared runner passes 7 tests with 1 upstream skip for DataHub 1.7.0.14 on Python 3.12 and Git 2.54. All five profiles have now passed locally, with 68 upstream passes plus 4 SWE-bench supplemental cases. Ruff, Python syntax, workflow YAML/matrix consistency, Bash syntax, ShellCheck, and whitespace checks pass. No GitPython compatibility fixes were required. Also clear inherited pytest options and plugins: a caller's `-k` filter could otherwise leave only unrelated contract tests and yield a misleading pass. All four SWE-bench cases still pass with a deliberately nonmatching inherited filter and a nonexistent plugin, verifying their removal.
1 parent a818f6f commit 58aac9a

4 files changed

Lines changed: 36 additions & 5 deletions

File tree

‎.github/workflows/downstream.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
project: [langchain, mlflow, bandit, swebench]
19+
project: [langchain, mlflow, bandit, swebench, datahub]
2020
steps:
2121
- uses: actions/checkout@v7
2222
with:

‎test/downstream/README.md‎

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Run released projects' GitPython-related tests against this checkout with
66
```sh
77
uv run test/downstream/run.py bandit
88
uv run test/downstream/run.py bandit --version 1.9.4
9+
for project in langchain mlflow bandit swebench datahub; do
10+
uv run test/downstream/run.py "$project"
11+
done
912
```
1013

1114
The default resolves the latest release from PyPI each time. `--version` reproduces
@@ -19,8 +22,9 @@ elsewhere. Delete retained directories when no longer needed. PyPI source archiv
1922
are verified against their published SHA-256 digest and extracted with Python's
2023
safe data filter. Each run uses a private Git configuration, including an identity
2124
and the `master` initial branch expected by upstream fixtures. Inherited Git
22-
settings and Python import paths are cleared before setup and testing. Select a
23-
different Git executable by putting its directory first on `PATH`.
25+
settings, pytest options/plugins, and Python import paths are cleared before
26+
setup and testing. Select a different Git executable by putting its directory
27+
first on `PATH`.
2428

2529
## Selection and coverage
2630

@@ -34,12 +38,16 @@ and test-only dependencies are excluded. Downloads are not unique installations.
3438
| MLflow (`mlflow-skinny`) | 25,850,354 | 3.16.1 | 47 upstream tests: 31 repository/project/model-versioning cases plus 16 Git context and credential-redaction contract cases |
3539
| Bandit | 24,935,372 | 1.9.4 | 12 upstream baseline CLI tests: real repository creation, commits, branches, resets, discovery, and dirty state |
3640
| SWE-bench | 22,942,741 | 5.0.2 | 4 supplemental integration cases for `AutoContextManager`; no upstream tests cover its GitPython callers |
41+
| DataHub (`acryl-datahub`) | 5,019,402 | 1.7.0.14 | 7 upstream tests passed, 1 credential-dependent skip: public clone/checkout, SSH timeout, exception/redaction contracts, and configuration |
3742

3843
Source: [top-pypi-packages](https://hugovk.github.io/top-pypi-packages/top-pypi-packages.min.json),
3944
snapshot updated **2026-10-01 12:40:51 UTC**. Its
40-
[ClickHouse query](https://github.com/hugovk/top-pypi-packages/blob/main/top-pypi-clickhouse.py)
45+
[ClickHouse query](https://github.com/hugovk/top-pypi-packages/blob/main/clickhouse.py)
4146
covers the previous calendar month. Current metadata for the top 5,000
4247
distributions was checked, together with known runtime integrations.
48+
Streamlit and W&B are excluded because their latest releases removed GitPython.
49+
The next eligible declared consumer is `dlt` (5,002,981 downloads); LangChain's
50+
current runtime integration places it in the selected five instead.
4351

4452
LangChain Community's published `GitLoader` integration uses GitPython at runtime
4553
and asks users to install it manually. It qualifies as a current user even though
@@ -76,6 +84,16 @@ The supplemental filename is intentionally excluded from GitPython's normal test
7684
collection; the runner selects it explicitly with importlib mode to avoid
7785
shadowing the upstream `swebench` package.
7886

87+
DataHub uses GitPython in its `looker`, `lookml`, and `odcs` runtime extras.
88+
Patch-release tags come from `acryldata/datahub`, although its package metadata
89+
links to a different repository. The Git integration file runs without unrelated
90+
SQL/docker conftests; telemetry is disabled explicitly. It clones a public GitLab
91+
fixture and checks out a fixed commit, exercises a real localhost SSH timeout,
92+
and checks exception handling, password redaction, and URL/branch configuration.
93+
The private SSH-clone test retains its upstream skip: the runner removes its
94+
credential variable and needs no private credentials. `ssh`, public GitLab
95+
access, and local TCP sockets are needed for the selected tests.
96+
7997
CI runs the same command against the latest release and fails when no test passes,
8098
including when all selected tests are skipped. Test dependency ranges only supply
8199
the upstream test harness; they do not pin the dependent's release.

‎test/downstream/projects.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,17 @@
4949
"no_deps": ["{source}"],
5050
"pytest_args": ["--confcutdir={checks}", "--import-mode=importlib"],
5151
"tests": ["{checks}/swebench.py"]
52+
},
53+
"datahub": {
54+
"distribution": "acryl-datahub",
55+
"source": "git",
56+
"repository": "https://github.com/acryldata/datahub.git",
57+
"tag": "v{version}",
58+
"cwd": "metadata-ingestion",
59+
"install": ["acryl-datahub=={version}", "pytest"],
60+
"unset_env": ["DATAHUB_LOOKML_GIT_TEST_SSH_KEY"],
61+
"env": {"DATAHUB_TELEMETRY_ENABLED": "false"},
62+
"pytest_args": ["--confcutdir=tests/integration/git"],
63+
"tests": ["tests/integration/git/test_git_clone.py"]
5264
}
5365
}

‎test/downstream/run.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ def main():
110110
)
111111
# Do not let inherited Git settings redirect upstream resets or commits into
112112
# the caller's repository, index, object database, configuration, or hooks.
113-
env = {key: value for key, value in os.environ.items() if not key.startswith("GIT_")}
113+
# Inherited pytest options/plugins must not replace the selected coverage.
114+
env = {key: value for key, value in os.environ.items() if not key.startswith(("GIT_", "PYTEST_"))}
114115
env.pop("PYTHONPATH", None)
115116
env.pop("PYTHONHOME", None)
116117
env.update(GIT_CONFIG_GLOBAL=str(config), GIT_CONFIG_NOSYSTEM="1", GIT_TERMINAL_PROMPT="0")

0 commit comments

Comments
 (0)