mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-03 20:19:31 +00:00
FIX - e2e test for pydantic v2 (#16572)
This commit is contained in:
parent
c86468d992
commit
f5996b2f3a
@ -66,11 +66,10 @@ class CliBase(ABC):
|
||||
def build_config_file(
|
||||
self, test_type: E2EType = E2EType.INGEST, extra_args: dict = None
|
||||
) -> None:
|
||||
with open(self.config_file_path, encoding=UTF_8) as config_file:
|
||||
config_yaml = yaml.safe_load(config_file)
|
||||
config_yaml = self.build_yaml(config_yaml, test_type, extra_args)
|
||||
with open(self.test_file_path, "w", encoding=UTF_8) as test_file:
|
||||
yaml.dump(config_yaml, test_file)
|
||||
config_yaml = load_config_file(Path(self.config_file_path))
|
||||
config_yaml = self.build_yaml(config_yaml, test_type, extra_args)
|
||||
with open(self.test_file_path, "w", encoding=UTF_8) as test_file:
|
||||
yaml.dump(config_yaml, test_file)
|
||||
|
||||
def retrieve_statuses(self, result):
|
||||
source_status: Status = self.extract_source_status(result)
|
||||
|
||||
@ -11,9 +11,11 @@
|
||||
"type": "string"
|
||||
},
|
||||
"publisherType": {
|
||||
"description": "Publisher Type",
|
||||
"$ref": "../system/eventPublisherJob.json#/definitions/publisherType"
|
||||
},
|
||||
"runMode": {
|
||||
"description": "This schema publisher run modes.",
|
||||
"$ref": "../system/eventPublisherJob.json#/definitions/runMode"
|
||||
},
|
||||
"entities": {
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
"javaType": "org.openmetadata.schema.api.VoteRequest",
|
||||
"properties": {
|
||||
"updatedVoteType": {
|
||||
"description": "The updated vote type",
|
||||
"$ref": "../type/votes.json#/definitions/voteType"
|
||||
}
|
||||
},
|
||||
|
||||
@ -38,7 +38,7 @@ UNICODE_REGEX_REPLACEMENT_FILE_PATHS = [
|
||||
f"{ingestion_path}src/metadata/generated/schema/type/basic.py",
|
||||
]
|
||||
|
||||
args = f"--custom-template-dir {directory_root}/ingestion/codegen_custom_templates --input {directory_root}openmetadata-spec/src/main/resources/json/schema --output-model-type pydantic_v2.BaseModel --use-annotated --base-class metadata.ingestion.models.custom_pydantic.BaseModel --input-file-type jsonschema --output {ingestion_path}src/metadata/generated/schema --set-default-enum-member".split(" ")
|
||||
args = f"--input {directory_root}openmetadata-spec/src/main/resources/json/schema --output-model-type pydantic_v2.BaseModel --use-annotated --base-class metadata.ingestion.models.custom_pydantic.BaseModel --input-file-type jsonschema --output {ingestion_path}src/metadata/generated/schema --set-default-enum-member".split(" ")
|
||||
|
||||
main(args)
|
||||
|
||||
@ -85,7 +85,6 @@ for file_path in UNSUPPORTED_REGEX_PATTERN_FILE_PATHS:
|
||||
# Supporting timezone aware datetime is too complex for the profiler
|
||||
DATETIME_AWARE_FILE_PATHS = [
|
||||
f"{ingestion_path}src/metadata/generated/schema/type/basic.py",
|
||||
# f"{ingestion_path}src/metadata/generated/schema/entity/data/table.py",
|
||||
]
|
||||
|
||||
for file_path in DATETIME_AWARE_FILE_PATHS:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user