Repository navigation
fix(ci): restore the python pipeline on 1.13 - #32187
Conversation
PRs targeting 1.13 are validated by main's workflow definitions: the `pull_request_target` event resolves workflows from the default branch, while `actions/checkout` puts the 1.13 tree on disk. main's `py-tests-shared.yml` therefore runs against a checkout that is missing files it depends on, and every python job goes red regardless of the diff -- #32154, a Java-only backport, failed identically to #32166. Three gaps are fixable from this branch: * `.github/scripts/` does not exist on 1.13 at all. `classify_test_outcome.py` exits 2 *after* the tests pass (a postgres shard logged `101 passed` and `nox > Session integration-tests was successful`, then failed the job), and `configure_docker_storage.sh` exits 127, killing shards 2 and 3 before they download anything. Both scripts are copied verbatim from main; they are stdlib-only Python and plain bash with no new dependencies. The globs they read resolve here -- noxfile.py writes junit/test-results-unit.xml and junit/test-results-integration.xml. * `basedpyright~=1.39.0` floats onto 1.39.10 (released 2026-08-13), which reports ~428 errors against this branch's baseline. main pinned `==1.39.3` in #27834 to stop exactly this; only the pin is taken here, since the rest of that commit conflicts across seven files. * tests/unit/source/pipeline/openlineage/ is not a package, so its test_connection.py collides with the one under tests/unit/metadata/ingestion/connections/ and pytest intermittently reports `import file mismatch`. main disambiguates with __init__.py. Only the leaf marker is added -- enough to make the module name unique without renaming every module under tests/unit/source/. The spaCy 3.8 model mismatch and the ruff-only checkstyle install cannot be fixed from here; both need main's workflows to probe the checkout. Co-Authored-By: Claude Opus 5 <[email protected]>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
…-sufficient Backport of the test half of #32145 (2.0, c1e9302). PRs based on 1.13 are validated by main's py-tests-shared.yml, which brings the stack up with `-i false` — no openmetadata_ingestion container, so no Airflow on :8080 and no sample-data DAGs. These three suites still depended on both and failed deterministically: four alationsink cases on shard-2, three test_airflow_lineage cases plus test_es_search_from_name on shard-3, across every Python version. - airflow: a conftest that builds and runs Airflow in a testcontainer joined to ometa_network, so the suite owns its DAGs and connection. apache-airflow 3.3.0 matches this branch's setup.py, the same pin 2.0 uses. - alationsink: build the service, database, schema and tables under test instead of reading sample_data.ecommerce_db. - ometa: a test_team_data fixture creating the "Data" team that test_es_search_from_name asserts on. .dockerignore keeps the airflow image's build context to src/, and only applies to builds whose context is ingestion/ — every other image builds from the repository root with the top-level ignore file. The upstream commit's ingestion/src changes are deliberately omitted: its PLC0415 annotations and dbt/dbtcloud/vertica suppressions target 2.0's ruff and 2.0's basedpyright baseline, neither of which applies here. Its test_ometa_user_api reformatting is also dropped — only the fixture is taken, so the file stays black-conformant on this branch. Does not address shard-2's datalake failures (a 400 on recursive service delete when Airflow is absent), shard-3's trino NO_NODES_AVAILABLE errors, or test_s3_ingestion. Co-Authored-By: Claude Opus 5 <[email protected]>
trino (shard-3, 38 errors): the container readiness probe queried system.runtime.nodes, which the system connector answers on every active node before any catalog can be scheduled. The fixture proceeded and the first ANALYZE failed with NO_NODES_AVAILABLE, erroring every test in the package. Probe a real catalog instead, and replace the flat sleep(1) between write and ANALYZE with a read-back that retries while the hive split is still lagging. Pin the hive-metastore image by digest so :latest cannot drift under a maintenance branch. Only the readiness half of main's trino rework is taken. Its move of drop_stats into a reset_trino_table_statistics fixture, the folding of test_no_statistics into test_profiler, and the removal of test_empty_table_with_dropped_stats_falls_back are a coverage redesign rather than a CI fix, so this branch keeps its global drop_stats call and all three tests unchanged. Nothing in the trino connector source is touched. s3 (shard-3, 1 failed): the container payload no longer inlines children, so `assert 7 == len(bucket.children.root)` raised AttributeError. The next line already asserts the same count through list_container_children. The "Invalid STS API version" logged nearby is the non-mandatory GetMetrics step of the S3 test connection and fails nothing. Co-Authored-By: Claude Opus 5 <[email protected]>
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
Code Review
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source
Describe your changes:
No linked issue: this is CI infrastructure, and the symptom shows on any 1.13 PR that trips the python paths filter. #32166 (a one-line
pyathenabump) and #32154 (a Java-only DB2 backport) both went fully red inpy-tests/py-tests-postgresfor reasons unrelated to their diffs.Root cause. The
pull_request_targetevent resolves workflow definitions from the repository's default branch, while theCheckoutstep inside those workflows pinsref: github.event.pull_request.head.sha. So a PR based on 1.13 executes main'spy-tests-shared.ymlagainst a 1.13 working tree. The proof: workflows that exist only on main —pr-metadata-validation.yml,data-access-request-e2e.yml,integration-tests-postgres-elasticsearch-redis.yml— all ran on #32166, and every job carries thepython /prefix main's reusable-workflow caller adds (1.13's ownpy-tests-postgres.ymldeclares its jobs directly and has nopy-tests-shared.ymlat all).That pipeline then depends on things the 1.13 tree does not provide. Three of those gaps are fixable from this branch; three are not, and are itemised under High-level design.
1.
.github/scripts/does not exist on 1.13 at all (main has 25 scripts plus atests/directory; this branch has nothing).python3 .github/scripts/classify_test_outcome.pyfails withNo such file or directory, exit 2 — killing the job after the tests have already passed. From run 33074440055, postgres shard-1 / 3.10:bash .github/scripts/configure_docker_storage.sh("Use runner data disk for Docker") exits 127, so shard-2 never runs at all — it dies at step 4, before downloading the distribution. Its test results on 1.13 are currently unobserved.Both scripts are copied verbatim from main.
classify_test_outcome.pyis stdlib-only (argparse,glob,hashlib,json,os,re,subprocess,pathlib,xml.etree);configure_docker_storage.shis plain bash. No new dependencies, and nothing else under.github/scripts/is referenced by the python pipeline. The globs the classifier reads resolve on this branch —ingestion/noxfile.pyalready writesjunit/test-results-unit.xml(L177) andjunit/test-results-integration.xml(L233).test_classify_test_outcome.pyis deliberately not brought along: no workflow on main executes it either, and an unrun test file is dead weight on a maintenance branch.2.
basedpyrightfloats onto a newer patch release. 1.13 hasbasedpyright~=1.39.0; 1.39.10 shipped 2026-08-13 and CI resolved it, so the reported error count wandered run to run (422 on 2026-08-21, 425 on #32154, 428 on #32166). main pinned==1.39.3in #27834 on 2026-04-30 for exactly this reason and that commit was never backported. Only thesetup.pypin is taken here: the rest of4bb35731ac7conflicts across seven files plus one delete/modify.To be clear about what this pin does and does not do: it makes static-checks deterministic, it does not make it pass. With 1.39.3 installed the run reports a stable 429 errors, so the basedpyright version was never the cause. The cause is that this branch's
.basedpyright/baseline.jsonwas regenerated in an environment missing most third-party packages:reportMissingImportsmeans the import did not resolve, which makes everything downstreamUnknownand emits almost no real type errors — so those never got baselined. CI type-checks inside the fully-populatedenvvenv, the real errors appear, and--baselinemode=discardcorrectly treats them as new. Per file:Tracing the file on this branch dates the damage to the 1.13 backport of #30911:
main went through the same upstream commit (
c6190e64159) and stayed at 8, so this is 1.13-specific damage, and static-checks has been failing on this branch since 2026-08-06 — masked because every other python job was red too. Regenerating the baseline requires a CI-parity environment (linux/amd64, fullenvvenv); it is a ~4 MB single-file change with its own review story and is deliberately not in this PR.3.
tests/unit/source/pipeline/openlineage/is not a package. Itstest_connection.pytherefore imports as the bare moduletest_connectionand collides withtests/unit/metadata/ingestion/connections/test_connection.py, which does the same. Underxdistthe collision surfaces intermittently as a collection error (present on #32166's 3.11 lane, absent on #32154's):main disambiguates with
__init__.pymarkers. Only the leaf marker is added here — enough to make the module name unique (openlineage.test_connection) without adopting main's fullsource/+source/pipeline/chain, which would rename every test module undertests/unit/source/and drop asys.pathentry. That directory holds exactly one file with no sibling imports, so the blast radius is nil.Type of change:
High-level design:
Six gaps separate main's pipeline from the 1.13 tree. Which side can close each one is what drives the shape of this PR.
Closed here — the pipeline asks the tree for something the tree can simply provide: two missing scripts, an exact tool pin, a package marker. All additive or one-line, and none changes the runtime behaviour of the shipped
openmetadata-ingestionpackage.Cannot be closed here, deferred to a follow-up on
main:prepare-spacy-modeljob preinstallsen_core_web_md==3.8.0with--no-deps. On 1.13 that preinstall short-circuits the runtimespacy.cli.downloadiningestion/src/metadata/pii/algorithms/presidio_utils.py, so spaCy 3.7.x loads a 3.8.0 model and fourtests/unit/piitests fail. Aligning 1.13's pin is not a viable backport: spaCy 3.8.7 requiresthinc>=8.3.4,<8.4, which requiresnumpy>=2.0.0,<3. 1.13 pinsnumpy<2andpandas~=2.1.4(pandas only gained numpy-2 wheels at 2.2.2, which is why main pins>=2.2.2). That is a numpy major bump shipped to users in a 1.13.x patch release in order to fix a CI-only symptom — the wrong trade. Fix belongs in main's workflow: gate the wheel install on the checkout's installed spaCy actually satisfying>=3.8.compose-args: "-m no-ui -d postgresql -s true -i false"; 1.13's own workflow passed"-m no-ui -d postgresql".-i falsebrings the stack up with no ingestion/Airflow container and no sample-data ingestion, which 1.13's integration tests still assume. That is what fails shard-3: threetests/integration/airflow/test_airflow_lineage.pycases andtest_ometa_user_api.py::TestOMetaUserAPI::test_es_search_from_name. Fixing it from 1.13 would mean backporting main's self-sufficient Airflow testcontainerconftest.pyand rewritten fixtures — a much larger change than this PR, and better done separately once the CI plumbing is stable.py-checkstyle.ymlinstalls onlyruff~=0.15.12, but 1.13'singestion/Makefilepy_format_checkstill runs pycln / isort / black / pylint, so the job dies onmake: pycln: No such file or directory. Backporting the ruff migration (#27739) would reformat the whole ingestion tree on a maintenance branch. Fix is again main-side: probe the checked-outingestion/Makefileand install the toolchain that tree actually needs.Both main-side guards read the checked-out tree from inside main's executing YAML, which is the mechanism that makes them work for every release branch at once.
One further option was considered and rejected: adding
[[ -f .github/scripts/... ]]guards on main so an old checkout degrades instead of failing. It is not needed —2.0already carries every.github/scripts/file exceptrefresh_timing_baseline.py(a Playwright timing script the python pipeline never calls), so 1.13 was the only branch with a real gap and this PR closes it. Worth remembering at the next release cut; not worth a PR now.Tests:
Use cases covered
ingestion/**runs the full python pipeline and is no longer failed by the post-test classification step when its tests pass.Run Integration Testsinstead of dying atUse runner data disk for Docker.nox -s static-checkstype-checks against a fixed basedpyright version instead of whatever patch release is newest.pytest -n autocollects bothtest_connection.pymodules without an import-file-mismatch error.Unit tests
No new tests. Two of the three changes are CI plumbing and the third is a package marker; the meaningful verification is that this PR's own checks exercise all of it, since it modifies
ingestion/setup.pyand therefore trips the python paths filter..github/scripts/test_classify_test_outcome.pyexists on main and is not brought over, as noted above.Manual testing performed
python3 -m py_compile .github/scripts/classify_test_outcome.py— passes;--helprenders the expected CLI.bash -n .github/scripts/configure_docker_storage.sh— passes.classify_test_outcome.pythe way the workflow invokes it, confirming its exit contractint(step_outcome == "success" and classification != "passed"):--step-outcome success→classification: passed, exit 0 (the case that was failing the green shards);--step-outcome success→classification: missing_results, exit 1, so a silently-empty run is still caught;--step-outcome failure→ exit 0, so an already-red test step stays the single source of failure rather than being reported twice.ingestion/noxfile.pywrites both junit paths the workflow globs (L177, L233).4bb35731ac7is not clean on 1.13 (conflicts in seven files plus one delete/modify), which is why only itssetup.pyline is taken.Expected CI state on this PR
This PR does not turn 1.13 fully green on its own, by design — it removes the failures whose cause is a missing file, and leaves the ones that need main-side workflow changes. Expected after merge:
Run Static Checks. Now deterministic at 429 errors rather than drifting, but see item 2 above — the pin is hygiene, not the fix.tests/integration/airflow/test_airflow_lineage.pycases andtest_es_search_from_name(the-i falsecompose-args gap); the unit lanes on fourtests/unit/piicases (the spaCy gap); Python Checkstyle (the ruff gap).tests/unit/observability/profiler/test_table_metric_computer.py::TestTrinoTableMetricComputer::test_trino_presto_athena_registrations— fails identically on Backport #32083 to 1.13: initialize DB2 CLI driver once per process #32154, which changes no python dependencies, so it is not a consequence of the workflow mismatch.tests/integration/s3/test_s3_storage.py::test_s3_ingestion— accompanied byInvalid STS API version 2010-08-01, expecting 2011-06-15, i.e. a moto/botocore mismatch on this branch.Both deserve their own investigation; neither is touched by this PR.
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>— no issue; CI infrastructure fix, reproduction linked above.Fixes #<issue-number>above — see note above.Greptile Summary
This PR restores compatibility between the default branch’s reusable Python CI workflow and a 1.13 checkout.
Confidence Score: 5/5
The PR appears safe to merge because no blocking failure remains.
No blocking failure remains.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR A[pull_request_target workflow from default branch] --> B[Checkout 1.13 PR head] B --> C[Configure Docker runner storage] C --> D[Build test environment] D --> E[Run Python test shards] E --> F[Generate JUnit reports] F --> G[Classify test outcome] G --> H[Publish deterministic CI result]Reviews (6): Last reviewed commit: "fix(ci): align 1.13 Python tests with CI" | Re-trigger Greptile