Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
d3a1abc
fix: update test assertion and EntityCsv string to match updated enti…
jaya6400 May 4, 2026
3dfaab2
fix: correct EntityCsv contains() string escaping for name validation…
jaya6400 May 4, 2026
d5c9c07
fix: convert CRLF to LF in ValidatorUtilTest.java
jaya6400 May 4, 2026
89d0cd3
fix(validation): reject reserved FQN characters in entity and column …
jaya6400 Apr 19, 2026
fcfc2a6
fix(validation): also block control characters in entity name pattern
jaya6400 Apr 19, 2026
ea38aad
fix(validation): extend entity name validation to cover additional sc…
jaya6400 Apr 22, 2026
d89fdff
fix(validation): add < and | to columnName pattern in table.json
jaya6400 Apr 22, 2026
dabd075
fix(lint): disable no-control-regex for intentional control char rang…
jaya6400 Apr 22, 2026
4e03649
fix(tests): add integration tests for entity name validation with res…
jaya6400 Apr 25, 2026
eebb577
fix(validation): add minLength:1 to pipeline task name and apply spot…
jaya6400 Apr 25, 2026
36d5ae3
fix: fix line endings and formatting in PipelineValidation spec
jaya6400 Apr 29, 2026
08cd15d
fix: add pipe character test case and clarify regex comment
jaya6400 May 4, 2026
88a756e
Merge branch 'main' into fix/entity-name-validation-v2
aniketkatkar97 May 5, 2026
7ca1365
style: apply spotless formatting
jaya6400 May 7, 2026
cfe03d4
fix(search): index classification display name for tags
jaya6400 May 7, 2026
1f1d3c0
fix(validation): use pydantic-compatible entity name pattern:
jaya6400 May 8, 2026
8284cdf
fix(ingestion): align ColumnName typing for partition metadata and sa…
jaya6400 May 8, 2026
76e2c2d
fix CI static-checks:
jaya6400 May 8, 2026
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
115,522 changes: 38,441 additions & 77,081 deletions ingestion/.basedpyright/baseline.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ def _initialize_transformable_entities():


def revert_separators(value):
if not isinstance(value, str): # Add this check
return value
return (
value.replace(RESERVED_COLON_KEYWORD, "::")
.replace(RESERVED_ARROW_KEYWORD, ">")
Expand All @@ -119,6 +121,8 @@ def revert_separators(value):


def replace_separators(value):
if not isinstance(value, str):
return value
return (
value.replace("::", RESERVED_COLON_KEYWORD)
.replace(">", RESERVED_ARROW_KEYWORD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from metadata.generated.schema.entity.data.databaseSchema import DatabaseSchema
from metadata.generated.schema.entity.data.table import (
Column,
ColumnName,
PartitionColumnDetails,
PartitionIntervalTypes,
Table,
Expand Down Expand Up @@ -202,7 +203,7 @@ def get_table_partition_details(
partition_details = TablePartition(
columns=[
PartitionColumnDetails(
columnName=col["name"],
columnName=ColumnName(root=col["name"]),
intervalType=ATHENA_INTERVAL_TYPE_MAP.get(
col.get("projection_type", str(col["type"])),
PartitionIntervalTypes.COLUMN_VALUE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from metadata.generated.schema.entity.data.databaseSchema import DatabaseSchema
from metadata.generated.schema.entity.data.storedProcedure import StoredProcedureCode
from metadata.generated.schema.entity.data.table import (
ColumnName,
ConstraintType,
PartitionColumnDetails,
PartitionIntervalTypes,
Expand Down Expand Up @@ -203,9 +204,7 @@ def _build_formatted_table_id(table):
return f"{table.table_id}"


BigQueryDialect._build_formatted_table_id = ( # pylint: disable=protected-access
_build_formatted_table_id
)
BigQueryDialect._build_formatted_table_id = _build_formatted_table_id # pylint: disable=protected-access
BigQueryDialect.get_pk_constraint = get_pk_constraint
BigQueryDialect.get_foreign_keys = get_foreign_keys

Expand Down Expand Up @@ -974,9 +973,11 @@ def get_table_partition_details(
return True, TablePartition(
columns=[
PartitionColumnDetails(
columnName=self._get_partition_column_name(
columns=columns,
partition_field_name=field,
columnName=ColumnName(
root=self._get_partition_column_name(
columns=columns,
partition_field_name=field,
)
),
interval=str(partition_details._properties.get("mode")),
intervalType=PartitionIntervalTypes.OTHER,
Expand All @@ -990,9 +991,11 @@ def get_table_partition_details(
table_partition = TablePartition(
columns=[
PartitionColumnDetails(
columnName=self._get_partition_column_name(
columns=columns,
partition_field_name=table.time_partitioning.field,
columnName=ColumnName(
root=self._get_partition_column_name(
columns=columns,
partition_field_name=table.time_partitioning.field,
)
),
interval=str(table.time_partitioning.type_),
intervalType=PartitionIntervalTypes.TIME_UNIT,
Expand All @@ -1003,8 +1006,8 @@ def get_table_partition_details(
return True, TablePartition(
columns=[
PartitionColumnDetails(
columnName=(
"_PARTITIONTIME" if table.time_partitioning.type_ == "HOUR" else "_PARTITIONDATE"
columnName=ColumnName(
root=("_PARTITIONTIME" if table.time_partitioning.type_ == "HOUR" else "_PARTITIONDATE")
),
interval=str(table.time_partitioning.type_),
intervalType=PartitionIntervalTypes.INGESTION_TIME,
Expand All @@ -1013,16 +1016,18 @@ def get_table_partition_details(
)
if table.range_partitioning:
table_partition = PartitionColumnDetails(
columnName=self._get_partition_column_name(
columns=columns,
partition_field_name=table.range_partitioning.field,
columnName=ColumnName(
root=self._get_partition_column_name(
columns=columns,
partition_field_name=table.range_partitioning.field,
)
),
intervalType=PartitionIntervalTypes.INTEGER_RANGE,
interval=None,
)
if hasattr(table.range_partitioning, "range_") and hasattr(table.range_partitioning.range_, "interval"):
table_partition.interval = table.range_partitioning.range_.interval
table_partition.columnName = table.range_partitioning.field
table_partition.columnName = ColumnName(root=table.range_partitioning.field)
return True, TablePartition(columns=[table_partition])
if (
hasattr(table, "_properties")
Expand All @@ -1032,9 +1037,11 @@ def get_table_partition_details(
return True, TablePartition(
columns=[
PartitionColumnDetails(
columnName=self._get_partition_column_name(
columns=columns,
partition_field_name=field.get("field"),
columnName=ColumnName(
root=self._get_partition_column_name(
columns=columns,
partition_field_name=field.get("field"),
)
),
intervalType=PartitionIntervalTypes.OTHER,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from metadata.generated.schema.entity.data.databaseSchema import DatabaseSchema
from metadata.generated.schema.entity.data.table import (
Column,
ColumnName,
Constraint,
ConstraintType,
Table,
Expand Down Expand Up @@ -356,7 +357,7 @@
# Regular types - no array element type
return (type_mapping.get(burstiq_type, "VARCHAR"), None)

def get_table_constraints(self, dictionary: BurstIQDictionary) -> Optional[List[TableConstraint]]: # noqa: UP006, UP045

Check failure on line 360 in ingestion/src/metadata/ingestion/source/database/burstiq/metadata.py

View check run for this annotation

SonarQubeCloud / [open-metadata-ingestion] SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=open-metadata-ingestion&issues=AZ4G_iwLapSqpijNlJln&open=AZ4G_iwLapSqpijNlJln&pullRequest=27886
"""
Get all table constraints (primary key, unique, and foreign key) from BurstIQ dictionary

Expand All @@ -372,7 +373,7 @@
table_constraints.append(
TableConstraint(
constraintType=ConstraintType.PRIMARY_KEY,
columns=dictionary.get_primary_key_columns(),
columns=[ColumnName(root=column) for column in dictionary.get_primary_key_columns()],
)
)

Expand All @@ -381,7 +382,7 @@
table_constraints.append( # noqa: PERF401
TableConstraint(
constraintType=ConstraintType.UNIQUE,
columns=index.attributes,
columns=[ColumnName(root=attribute) for attribute in index.attributes],
)
)

Expand All @@ -407,7 +408,7 @@
table_constraints.append(
TableConstraint(
constraintType=ConstraintType.FOREIGN_KEY,
columns=[attribute.name],
columns=[ColumnName(root=attribute.name)],
referredColumns=[FullyQualifiedEntityName(col_fqn)],
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,14 @@ def execute(self, query, params=None):

ClickHouseDialect.get_unique_constraints = get_unique_constraints
ClickHouseDialect.get_pk_constraint = get_pk_constraint
ClickHouseDialect._get_column_type = ( # pylint: disable=protected-access
_get_column_type
)
ClickHouseDialect._get_column_type = _get_column_type # pylint: disable=protected-access
RequestsTransport.execute = execute
ClickHouseDialect.get_view_definition = get_view_definition
ClickHouseDialect.get_view_names = get_view_names
ClickHouseDialect.get_table_comment = get_table_comment
ClickHouseDialect.get_all_view_definitions = get_all_view_definitions
ClickHouseDialect.get_all_table_comments = get_all_table_comments
ClickHouseDialect._get_column_info = ( # pylint: disable=protected-access
_get_column_info
)
ClickHouseDialect._get_column_info = _get_column_info # pylint: disable=protected-access
Inspector.get_mview_names = get_mview_names
ClickHouseDialect.get_mview_names = get_mview_names_dialect
Inspector.get_all_table_ddls = get_all_table_ddls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from metadata.generated.schema.entity.data.storedProcedure import StoredProcedure
from metadata.generated.schema.entity.data.table import (
Column,
ColumnName,
DataModel,
Table,
TableConstraint,
Expand Down Expand Up @@ -341,7 +342,11 @@ def normalize_table_constraints(
column_name_map[col_name.lower()] = col_name
for constraint in table_constraints:
if constraint.columns:
constraint.columns = [column_name_map.get(c.lower(), c) for c in constraint.columns]
normalized_columns = []
for column in constraint.columns:
column_name = model_str(column)
normalized_columns.append(ColumnName(root=column_name_map.get(column_name.lower(), column_name)))
constraint.columns = normalized_columns
return table_constraints

def update_table_constraints(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@
RedshiftDialect.get_view_definition = get_view_definition
RedshiftDialect.get_temp_table_names = get_temp_table_names
RedshiftDialect._get_redshift_columns = get_redshift_columns
RedshiftDialect._get_all_relation_info = ( # pylint: disable=protected-access
_get_all_relation_info
)
RedshiftDialect._get_all_relation_info = _get_all_relation_info # pylint: disable=protected-access
Inspector.get_all_table_ddls = get_all_table_ddls
Inspector.get_table_ddl = get_table_ddl

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
StoredProcedureType,
)
from metadata.generated.schema.entity.data.table import (
ColumnName,
PartitionColumnDetails,
PartitionIntervalTypes,
Table,
Expand Down Expand Up @@ -166,7 +167,7 @@
logger = ingestion_logger()

# pylint: disable=protected-access
SnowflakeDialect._json_deserializer = json.loads
SnowflakeDialect._json_deserializer = json.loads # type: ignore[reportAttributeAccessIssue]
SnowflakeDialect.get_table_names = get_table_names
SnowflakeDialect.get_view_names = get_view_names
SnowflakeDialect.get_stream_names = get_stream_names
Expand Down Expand Up @@ -502,7 +503,7 @@
partition_details = TablePartition(
columns=[
PartitionColumnDetails(
columnName=column,
columnName=ColumnName(root=column),
intervalType=PartitionIntervalTypes.COLUMN_VALUE,
interval=None,
)
Expand All @@ -514,7 +515,7 @@
return True, partition_details
return False, None

def yield_tag(self, schema_name: str) -> Iterable[Either[OMetaTagAndClassification]]:

Check failure on line 518 in ingestion/src/metadata/ingestion/source/database/snowflake/metadata.py

View check run for this annotation

SonarQubeCloud / [open-metadata-ingestion] SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=open-metadata-ingestion&issues=AZ4IXHjgy_bEga48CmQb&open=AZ4IXHjgy_bEga48CmQb&pullRequest=27886
"""
Yield tags for tables/columns and schemas.
"""
Expand Down Expand Up @@ -1049,7 +1050,7 @@
return True
return False

def get_schema_tag_labels(self, schema_name: str) -> Optional[List[TagLabel]]: # noqa: UP006, UP045

Check failure on line 1053 in ingestion/src/metadata/ingestion/source/database/snowflake/metadata.py

View check run for this annotation

SonarQubeCloud / [open-metadata-ingestion] SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 22 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=open-metadata-ingestion&issues=AZ4IXHjgy_bEga48CmQc&open=AZ4IXHjgy_bEga48CmQc&pullRequest=27886
"""
Return tags for schema entity including:
1. Snowflake schema-level tags
Expand Down Expand Up @@ -1088,7 +1089,7 @@

return schema_tags if schema_tags else None

def get_tag_labels(self, table_name: str) -> Optional[List[TagLabel]]: # noqa: UP006, UP045

Check failure on line 1092 in ingestion/src/metadata/ingestion/source/database/snowflake/metadata.py

View check run for this annotation

SonarQubeCloud / [open-metadata-ingestion] SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=open-metadata-ingestion&issues=AZ4IXHjgy_bEga48CmQd&open=AZ4IXHjgy_bEga48CmQd&pullRequest=27886
"""
Override to include inherited tags from both schema and database levels.
This method combines:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
TableConstraint,
TableType,
)
from metadata.ingestion.ometa.utils import model_str
from metadata.ingestion.source.database.column_type_parser import ColumnTypeParser
from metadata.ingestion.source.database.json_schema_extractor import (
infer_json_schema_from_sample,
Expand Down Expand Up @@ -89,7 +90,7 @@
return []
if not table_columns:
return []
column_names_lower = {col.name.root.lower() for col in table_columns}
column_names_lower = {model_str(col.name).lower() for col in table_columns}
valid = []
for constraint in table_constraints:
if constraint is None:
Expand All @@ -99,13 +100,13 @@
"Filtering out table constraint %s: missing or empty columns",
constraint.constraintType.name,
)
elif all(c.lower() in column_names_lower for c in constraint.columns):
elif all(model_str(c).lower() in column_names_lower for c in constraint.columns):
valid.append(constraint)
else:
logger.warning(
"Filtering out table constraint %s: references columns %s not found in processed columns",
constraint.constraintType.name,
[c for c in constraint.columns if c.lower() not in column_names_lower],
[c for c in constraint.columns if model_str(c).lower() not in column_names_lower],
)
return valid

Expand All @@ -132,7 +133,7 @@
data_type_display = f"array<{arr_data_type}>"
return data_type_display

def _process_col_type(self, column: dict, schema: str) -> Tuple: # noqa: UP006

Check failure on line 136 in ingestion/src/metadata/ingestion/source/database/sql_column_handler.py

View check run for this annotation

SonarQubeCloud / [open-metadata-ingestion] SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=open-metadata-ingestion&issues=AZ4IXHpwy_bEga48CmQe&open=AZ4IXHpwy_bEga48CmQe&pullRequest=27886
data_type_display = None
arr_data_type = None
parsed_string = None
Expand All @@ -149,8 +150,8 @@
# if SQLAlchemy does not provide any further information
if col_type == "ARRAY" and getattr(column["type"], "item_type", None):
arr_data_type = ColumnTypeParser.get_column_type(column["type"].item_type)
if col_type == "ARRAY" and re.match(r"(?:\w*)(?:\()(\w*)(?:.*)", str(column["type"])):

Check warning on line 153 in ingestion/src/metadata/ingestion/source/database/sql_column_handler.py

View check run for this annotation

SonarQubeCloud / [open-metadata-ingestion] SonarCloud Code Analysis

Unwrap this unnecessarily grouped subpattern.

See more on https://sonarcloud.io/project/issues?id=open-metadata-ingestion&issues=AZ4IXHpwy_bEga48CmQf&open=AZ4IXHpwy_bEga48CmQf&pullRequest=27886

Check warning on line 153 in ingestion/src/metadata/ingestion/source/database/sql_column_handler.py

View check run for this annotation

SonarQubeCloud / [open-metadata-ingestion] SonarCloud Code Analysis

Unwrap this unnecessarily grouped subpattern.

See more on https://sonarcloud.io/project/issues?id=open-metadata-ingestion&issues=AZ4IXHpwy_bEga48CmQg&open=AZ4IXHpwy_bEga48CmQg&pullRequest=27886

Check warning on line 153 in ingestion/src/metadata/ingestion/source/database/sql_column_handler.py

View check run for this annotation

SonarQubeCloud / [open-metadata-ingestion] SonarCloud Code Analysis

Unwrap this unnecessarily grouped subpattern.

See more on https://sonarcloud.io/project/issues?id=open-metadata-ingestion&issues=AZ4IXHpwy_bEga48CmQh&open=AZ4IXHpwy_bEga48CmQh&pullRequest=27886
arr_data_type = re.match(r"(?:\w*)(?:[(]*)(\w*)(?:.*)", str(column["type"])).groups()

Check warning on line 154 in ingestion/src/metadata/ingestion/source/database/sql_column_handler.py

View check run for this annotation

SonarQubeCloud / [open-metadata-ingestion] SonarCloud Code Analysis

Unwrap this unnecessarily grouped subpattern.

See more on https://sonarcloud.io/project/issues?id=open-metadata-ingestion&issues=AZ4IXHpwy_bEga48CmQj&open=AZ4IXHpwy_bEga48CmQj&pullRequest=27886

Check warning on line 154 in ingestion/src/metadata/ingestion/source/database/sql_column_handler.py

View check run for this annotation

SonarQubeCloud / [open-metadata-ingestion] SonarCloud Code Analysis

Unwrap this unnecessarily grouped subpattern.

See more on https://sonarcloud.io/project/issues?id=open-metadata-ingestion&issues=AZ4IXHpwy_bEga48CmQk&open=AZ4IXHpwy_bEga48CmQk&pullRequest=27886

Check warning on line 154 in ingestion/src/metadata/ingestion/source/database/sql_column_handler.py

View check run for this annotation

SonarQubeCloud / [open-metadata-ingestion] SonarCloud Code Analysis

Unwrap this unnecessarily grouped subpattern.

See more on https://sonarcloud.io/project/issues?id=open-metadata-ingestion&issues=AZ4IXHpwy_bEga48CmQi&open=AZ4IXHpwy_bEga48CmQi&pullRequest=27886
if isinstance(arr_data_type, (list, tuple)):
arr_data_type = ColumnTypeParser.get_column_type(arr_data_type[0])
data_type_display = column["type"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from sqlalchemy.engine import Inspector

from metadata.generated.schema.entity.data.table import (
ColumnName,
PartitionColumnDetails,
PartitionIntervalTypes,
Table,
Expand Down Expand Up @@ -187,7 +188,7 @@ def _build_hypertable_partition(self, hypertable: HypertableInfo) -> Optional[Ta
return TablePartition(
columns=[
PartitionColumnDetails(
columnName=hypertable.column_name,
columnName=ColumnName(root=hypertable.column_name),
intervalType=interval_type,
interval=interval,
)
Expand Down
11 changes: 6 additions & 5 deletions ingestion/src/metadata/sampler/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from metadata.generated.schema.entity.services.databaseService import (
DatabaseServiceType,
)
from metadata.ingestion.ometa.utils import model_str
from metadata.sampler.models import TableConfig
from metadata.utils.logger import sampler_logger

Expand Down Expand Up @@ -57,10 +58,10 @@
for column_partition in column_partitions:
if column_partition.intervalType == PartitionIntervalTypes.INJECTED:
if table_profiler_config is None or profiler_partitioning_config is None:
raise RuntimeError(error_msg.format(column_name=column_partition.columnName))
raise RuntimeError(error_msg.format(column_name=model_str(column_partition.columnName)))

if profiler_partitioning_config.partitionColumnName != column_partition.columnName:
raise RuntimeError(error_msg.format(column_name=column_partition.columnName))
if profiler_partitioning_config.partitionColumnName != model_str(column_partition.columnName):
raise RuntimeError(error_msg.format(column_name=model_str(column_partition.columnName)))


def get_partition_details(
Expand Down Expand Up @@ -104,7 +105,7 @@
return None


def _handle_bigquery_partition(entity: Table, table_partition: TablePartition) -> Optional[PartitionProfilerConfig]: # noqa: UP045

Check failure on line 108 in ingestion/src/metadata/sampler/partition.py

View check run for this annotation

SonarQubeCloud / [open-metadata-ingestion] SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=open-metadata-ingestion&issues=AZ4IXHr8y_bEga48CmQl&open=AZ4IXHr8y_bEga48CmQl&pullRequest=27886
"""Bigquery specific logic for partitions"""
if table_partition:
column_partitions: Optional[List[PartitionColumnDetails]] = entity.tablePartition.columns # noqa: UP006, UP045
Expand All @@ -116,7 +117,7 @@
if partition.intervalType == PartitionIntervalTypes.TIME_UNIT:
return PartitionProfilerConfig(
enablePartitioning=True,
partitionColumnName=partition.columnName,
partitionColumnName=model_str(partition.columnName),
partitionIntervalUnit=PartitionIntervalUnit.DAY if partition.interval != "HOUR" else partition.interval,
partitionInterval=1,
partitionIntervalType=partition.intervalType.value,
Expand All @@ -138,7 +139,7 @@
if partition.intervalType == PartitionIntervalTypes.INTEGER_RANGE:
return PartitionProfilerConfig(
enablePartitioning=True,
partitionColumnName=partition.columnName,
partitionColumnName=model_str(partition.columnName),
partitionIntervalUnit=None,
partitionInterval=None,
partitionIntervalType=partition.intervalType.value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, *args, **kwargs):
# pylint: disable=import-outside-toplevel
from trino.sqlalchemy.dialect import TrinoDialect # noqa: PLC0415

TrinoDialect._json_deserializer = None
TrinoDialect._json_deserializer = None # type: ignore[reportAttributeAccessIssue]

super().__init__(*args, **kwargs)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@
import jakarta.validation.Validator;
import java.io.IOException;
import java.lang.reflect.Field;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.Map;
import java.util.TimeZone;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.hc.client5.http.auth.AuthScope;
import org.apache.hc.client5.http.auth.UsernamePasswordCredentials;
Expand Down Expand Up @@ -162,6 +165,9 @@ public void launcherSessionOpened(LauncherSession session) {
cacheProvider = System.getProperty("cacheProvider", "none");

LOG.info("=== TestSuiteBootstrap: Starting test infrastructure ===");
System.setProperty("user.timezone", "UTC");
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
LOG.info("Test JVM timezone set to {}", TimeZone.getDefault().getID());
LOG.info("Database type: {}", databaseType);
LOG.info("Search type: {}", searchType);
LOG.info("RDF enabled: {}", rdfEnabled);
Expand Down Expand Up @@ -505,8 +511,10 @@ private void startApplication() throws Exception {
config.setDataSourceFactory(dataSourceFactory);

String projectRoot = System.getProperty("user.dir");
if (projectRoot.endsWith("openmetadata-integration-tests")) {
projectRoot = projectRoot.substring(0, projectRoot.lastIndexOf("/"));
Path projectRootPath = Paths.get(projectRoot);
if (projectRootPath.endsWith("openmetadata-integration-tests")
&& projectRootPath.getParent() != null) {
projectRoot = projectRootPath.getParent().toString();
}
String flyWayMigrationScriptsLocation =
projectRoot + "/bootstrap/sql/migrations/flyway/" + DATABASE_CONTAINER.getDriverClassName();
Expand Down
Loading
Loading