Repository navigation
fix(ci): clear java checkstyle, python checkstyle and static-check fa… - #32145
Conversation
…ilures Java checkstyle: spotless:apply drops two unused static imports in TestCaseResolutionStatusResource. Python checkstyle: ruff PLC0415 fires on the two deliberately deferred optional-dependency imports (sqlalchemy_ibmi, puretransport); annotate them with the noqa the rest of the codebase already uses for the same pattern. Static checks: basedpyright reported 10 errors absent from the baseline. - dbt: wrap the test description in Markdown, which is what the Create*Request models declare. - dbtcloud: pass the Uuid through instead of unwrapping it, build the status enums explicitly (TaskStatus/PipelineStatus want StatusType, PipelineObservability wants LastRunStatus) and wrap logLink in AnyUrl. - vertica: the dialect monkey-patches deviate from SQLAlchemy's declared signatures by design, so suppress them the way snowflake and exasol do. 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 |
| return [ | ||
| TaskStatus( | ||
| name=DEFAULT_TASK_NAME, | ||
| executionStatus=self._map_run_status(run.state or run.status), | ||
| executionStatus=StatusType(self._map_run_status(run.state or run.status)), | ||
| startTime=self._parse_timestamp(run.started_at) if run.started_at else None, | ||
| endTime=self._parse_timestamp(run.finished_at) if run.finished_at else None, | ||
| logLink=run.href, | ||
| logLink=AnyUrl(run.href) if run.href else None, |
There was a problem hiding this comment.
The dbt Cloud status, URL, observability, and entity-reference conversions change generated-model behavior without focused regression tests, leaving future mapping or validation changes detectable only during ingestion.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
✅ Playwright Results — workflow succeededValidated commit ✅ 861 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 56m 24s ⏱️ Max setup 3m 2s · max shard execution 18m 15s · max shard-job elapsed before upload 21m 20s · reporting 8s 🌐 212.21 requests/attempt · 2.57 app boots/UI scenario · 30.96% common-shard skew Optimization targets still in progress:
🟡 1 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
…-sufficient Backport of main's tests. PRs based on 2.0 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 on shard-2 and shard-3 across all Python versions. - airflow: a conftest that builds and runs Airflow in a testcontainer joined to ometa_network, so the suite owns its DAGs and connection. Pinned to apache-airflow 3.3.0 to match 2.0's setup.py, where main uses 3.3.1; installing 3.3.1 would fight the ingestion package's own pin. - 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. Co-Authored-By: Claude Opus 5 <[email protected]>
Code Review ✅ ApprovedClears Java checkstyle, Python checkstyle, and static-check failures by removing unused imports, annotating deferred imports, and updating typing constructs. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
…-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]>
* fix(ci): restore the python pipeline on 1.13 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]> * test(integration): make the airflow, alationsink and ometa tests self-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]> * test(integration): fix the trino readiness race and a stale s3 assertion 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]> * fix(tests): profile in setUpClass so test_list_entity_profiles has data (#31882) pytest orders unittest TestCase methods alphabetically, so test_list_entity_profiles runs first -- before test_profiler_workflow has created any profile. The module sets TestLoader.sortTestMethodsUsing = None to force definition order, but that only affects unittest's own loader: pytest collects TestCase methods itself and ignores it. Verified against an unmodified checkout -- collection still yields list_entity_profiles first with that line in place, so it has never had any effect here. The test still passed, because it asserts on a global 24h window across every table rather than on data it owns, and hard-deleted tables used to leak their profiler rows into that window. #31556 stopped that leak (issue "0 not greater than 0" on every PR that actually runs the ingestion integration matrix, blocking the merge queue. PRs that do not touch ingestion skip the matrix and report green, which is why this looked branch-specific rather than repo-wide. Run the profiler in setUpClass, where fixture data belongs, so no test depends on another's ordering. Drop the ineffective loader hack, and turn the `if profiles_all.entities:` guard into an assertion -- that guard swallowed an empty unfiltered listing and hid which of the two calls was actually empty, which is the signal needed to diagnose this. * fix(ci): stabilize remaining 1.13 Python checks * fix(ci): align 1.13 Python tests with CI --------- Co-authored-by: Claude Opus 5 <[email protected]> Co-authored-by: IceS2 <[email protected]> Co-authored-by: Himanshu Khairajani <[email protected]> Co-authored-by: Pablo Takara <[email protected]>
Describe your changes:
Fixes #
Two independent things, both aimed at getting a PR opened against
2.0to a greenpython/java CI:
2.0(commit 1).depended on the compose ingestion container stop failing (commit 2).
Why the integration tests were failing
py-tests.ymltriggers onpull_request_target, which GitHub resolves from thedefault branch. So PRs based on
2.0are validated by main'spy-tests-shared.yml, not2.0's own workflow. Main's workflow brings the stack upwith
-i false:No
openmetadata_ingestioncontainer means no Airflow on:8080and no sample-dataDAGs. Main can afford that because PR #30714 (
2e7662cdb11) made the affectedtests self-sufficient in the same commit that introduced the shared workflow. That
commit never reached
2.0(git compare 2.0...2e7662cdb11→diverged), so2.0inherited the constraint without the accommodation — deterministic failures on
shard-2 and shard-3 across all Python versions.
Type of change:
High-level design:
Backported — already on main (8 files)
All from PR #30714 unless noted.
ingestion/tests/integration/alationsink/test_alationsink.pyingestion/tests/integration/alationsink/__init__.pyingestion/tests/integration/ometa/test_ometa_user_api.pyingestion/tests/integration/airflow/test_airflow_lineage.pyingestion/.dockerignoreingestion/tests/integration/airflow/DockerfileFROM, pip pin, comment:3.3.1→3.3.0ingestion/tests/integration/airflow/conftest.pyAIRFLOW_BASE_IMAGE:3.3.1→3.3.0ingestion/src/metadata/ingestion/source/database/vertica/metadata.py# pyright: ignore[reportAttributeAccessIssue]×2, already on main at the same lines)What the backported tests now do instead of depending on the ingestion container:
conftest.py+Dockerfilebuild and run Airflow in atestcontainer joined to
ometa_network, so the suite owns its DAGs and OMconnection.
test_dag_runsis dropped (main dropped it), so 3 failing testsbecome 2 passing ones.
tears them down, instead of reading
sample_data.ecommerce_db.test_team_datafixture creates the "Data" team thattest_es_search_from_nameasserts on (yielding the existing one untouched onsample-data lanes).
.dockerignore— trims the airflow image's build context tosrc/. Appliesonly to builds whose context is
ingestion/, which is exclusively this new image;every other image builds from the repository root.
2.0-only — not on main (5 files)
Each exists because main fixed the same problem by relaxing the check in a config
file
2.0never received, while the enforcement still applies to2.0..../database/db2/utils.py# noqa: PLC0415PLC0415iningestion/pyproject.toml:209; 2.0's config lacks that line.../database/hive/custom_hive_connection.py# noqa: PLC0415.../database/dbt/metadata.pyMarkdownreportArgumentTypeentries vs 2.0's 27).../pipeline/dbtcloud/metadata.pyUuidthrough, buildStatusType/LastRunStatus, wraplogLinkinAnyUrl.../dqtests/TestCaseResolutionStatusResource.javalistOrEmptyin bulk-create code 2.0 doesn't haveFor the four python ones,
2.0could instead adopt main's config (addPLC0415tothe ignore list, refresh the two baseline entry sets). The code fixes were chosen
because
ingestion/srcalready carries 262# noqa: PLC0415comments — thebranch's own convention — and because fixing the types beats baselining them. All
four are runtime no-ops: pydantic was coercing these values already.
How was this patch tested / verified:
mvn spotless:apply→git diff-files --quiet(the exact java-checkstylegate): exits 0.
make py_format_check: ruff lint + format clean across 2654 files.on macOS; the 2 vertica ones need
sqlalchemy_verticainstalled.docker buildexit 0. Thecritical step,
uv pip install "apache-airflow==3.3.0" /tmp/ingestion, resolved212 packages with no conflict and left airflow at 3.3.0;
airflow db migratesucceeded. This is what the 3.3.0 adaptation is for.
conftest fixtures confirmed the API issues a JWT via the simple auth manager and
the dag-processor picks up a DAG from the mounted host dir. Both passed.
test_dbtcloud.py69 passed; dbt tests 47 passed.collects 24 with no regression from the new conftest.
SERVICE_TYPE_MAPPER[Mysql]→ connector_id 116,model_str(None)→"None",TABLE_TYPE_MAPPER→TABLE/VIEW,_check_nullable_column→None/False/True, andfqn._buildleavingdim_::>addressunquoted.The backported tests need a live OpenMetadata server, so their assertions are
unproven until CI runs; the mechanism they depend on is proven.
Known remaining CI failures (pre-existing, out of scope):
tests/unit/piitests — main's workflow installs a pinneden_core_web_md==3.8.0wheel while 2.0'ssetup.pypinsspacy<3.8→ 3.7.5. CIlogs the mismatch (
W095 ... trained with spaCy v3.8.0 ... current version (3.7.5)), degrading NER. Aligning needs main's whole pin cluster(
numpy>=2,<3,pandas>=2.2.2,<3,spacy>=3.8.2,<3.9,scikit-learn,asammdf) — a numpy-2 migration that belongs in its own PR.maven-sonarcloud-ci— main's workflow references.github/actions/cache-ui-dist, which doesn't exist on 2.0.BaseEntityIT$ListEntityHistoryByTimestampPaginationTest(1 of 15,313 javaITs) —
assertNoRepeats(paged.versionKeys())atBaseEntityIT.java:7288is theonly assertion in that test not scoped with
ownVersions(...). It saw 17 rowswhere the test creates 15, so ≥2 belonged to other tests writing versions inside
the same wall-clock window under parallel execution. The filtered correctness
assertion at 7284–7287 passed. Same unfiltered code is on main; flake, not a
regression.