Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,18 +227,15 @@
# private in SQLAlchemy 2.1 — importing the Snowflake dialect raises AttributeError there.
# Raise the ceiling once a snowflake-sqlalchemy release supports 2.1.
"sqlalchemy>=2.0.0,<2.1",
"collate-sqllineage==2.1.9",
"collate-sqllineage==2.1.10", # imports collate_sqlfluff, which coexists with upstream sqlfluff
"tabulate==0.9.0",
"tenacity>=8.0,<10",
"typing-inspect",
"packaging", # For version parsing
"setuptools>=83", # CVE-2026-59890: MANIFEST.in exclusion bypass through Unicode normalization
"shapely",
"collate-data-diff>=0.11.18", # get_stats_dict(sample_size=...) and UTC on every pooled connection
# Floor on dbt-extractor (transitive via collate-data-diff -> dbt-core).
# Pre-0.5 versions ship no cp310-manylinux_2_17_aarch64 wheel, forcing a
# Rust/Cargo source build on ARM runners. 0.5+ uses cp38-abi3 wheels.
"dbt-extractor>=0.5.0",
# 0.11.19 moves dbt-core to an extra so dbt 2 (`dbt`/`dbt-oss`) can share the environment
"collate-data-diff>=0.11.19",
"jaraco.functools<4.2.0", # above 4.2 breaks the build
"jaraco.context>=6.1.0",
"httpx~=0.28.0",
Expand Down
4 changes: 2 additions & 2 deletions ingestion/src/_openmetadata_testutils/postgres/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

@pytest.fixture(autouse=True, scope="session")
def config_logging():
"""Set the log level of sqlfluff to CRITICAL."""
logging.getLogger("sqlfluff").setLevel(logging.CRITICAL)
"""Set the log level of collate-sqlfluff to CRITICAL."""
logging.getLogger("collate_sqlfluff").setLevel(logging.CRITICAL)


@pytest.fixture(scope="module")
Expand Down
2 changes: 1 addition & 1 deletion ingestion/tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def pull_with_retry(self, *args, **kwargs):

@pytest.fixture(scope="session", autouse=True)
def configure_logging():
logging.getLogger("sqlfluff").setLevel(logging.CRITICAL)
logging.getLogger("collate_sqlfluff").setLevel(logging.CRITICAL)
logging.getLogger("pytds").setLevel(logging.CRITICAL)


Expand Down
43 changes: 43 additions & 0 deletions ingestion/tests/unit/test_dependency_coexistence.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright 2026 Collate
# Licensed under the Collate Community License, Version 1.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://github.com/open-metadata/OpenMetadata/blob/main/ingestion/LICENSE
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Guard the forked dependencies against owning names that dbt projects install too.

Distributions with different names that write the same top-level package, console
script or dbt install silently overwrite each other (#37970, #37974).
"""

from importlib.metadata import distribution, requires

from packaging.requirements import Requirement


def test_collate_sqlfluff_does_not_claim_upstream_sqlfluff_names():
dist = distribution("collate-sqlfluff")

top_level_packages = {f.parts[0] for f in dist.files if len(f.parts) > 1}
assert "sqlfluff" not in top_level_packages
assert "collate_sqlfluff" in top_level_packages

entry_points = {(ep.group, ep.name) for ep in dist.entry_points}
assert ("console_scripts", "sqlfluff") not in entry_points
assert ("diff_cover", "sqlfluff") not in entry_points
assert not any(group == "sqlfluff" for group, _ in entry_points)


def test_collate_data_diff_does_not_require_dbt_core():
base_requirements = {
req.name.lower()
for req in map(Requirement, requires("collate-data-diff") or [])
if not (req.marker and "extra" in str(req.marker))
}
assert "dbt-core" not in base_requirements
assert "mashumaro" not in base_requirements
Loading
Loading