mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-12 09:18:20 +00:00
Update logging messages for JWT tokens (#12169)
This commit is contained in:
parent
36dd1b6b2d
commit
c22c5871f8
@ -315,8 +315,10 @@ class Workflow(WorkflowStatusMixin):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
raise InvalidWorkflowJSONException(
|
raise InvalidWorkflowJSONException(
|
||||||
"The serviceConnection is not informed and we cannot retrieve it from the API"
|
f"Error getting the service [{service_name}] from the API. If it exists in OpenMetadata,"
|
||||||
f" by searching for the service name [{service_name}]. Does this service exist in OpenMetadata?"
|
" make sure the ingestion-bot JWT token is valid and that the Workflow is deployed"
|
||||||
|
" with the latest one. If this error persists, recreate the JWT token and"
|
||||||
|
" redeploy the Workflow."
|
||||||
)
|
)
|
||||||
except InvalidWorkflowJSONException as exc:
|
except InvalidWorkflowJSONException as exc:
|
||||||
raise exc
|
raise exc
|
||||||
|
@ -245,8 +245,9 @@ def test_connection_steps(
|
|||||||
|
|
||||||
if not test_connection_definition:
|
if not test_connection_definition:
|
||||||
raise SourceConnectionException(
|
raise SourceConnectionException(
|
||||||
f"Test connection definition for {test_connection_def_fqn} not found please review the Server Configuration"
|
f"Test connection definition for {test_connection_def_fqn} not found! Make sure the"
|
||||||
f" of the Workflow configuration. Check that the Security Configuration has been set up correctly."
|
" ingestion-bot JWT token is valid and that the Workflow is deployed with the latest one."
|
||||||
|
" If this error persists, recreate the JWT token and redeploy the Workflow."
|
||||||
)
|
)
|
||||||
|
|
||||||
steps = [
|
steps = [
|
||||||
|
@ -83,9 +83,11 @@ class GetServiceException(Exception):
|
|||||||
|
|
||||||
def __init__(self, service_type: str, service_name: str):
|
def __init__(self, service_type: str, service_name: str):
|
||||||
self.message = (
|
self.message = (
|
||||||
f"Could not get service from type {service_type}. This means that the"
|
f"Could not get service from type [{service_type}]. This means that the"
|
||||||
" OpenMetadata client running in the Airflow host had issues getting"
|
" OpenMetadata client running in the Airflow host had issues getting"
|
||||||
f" the service {service_name}. Validate your ingestion-bot authentication."
|
f" the service [{service_name}]. Make sure the ingestion-bot JWT token"
|
||||||
|
" is valid and that the Workflow is deployed with the latest one. If this error"
|
||||||
|
" persists, recreate the JWT token and redeploy the Workflow."
|
||||||
)
|
)
|
||||||
super().__init__(self.message)
|
super().__init__(self.message)
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ from airflow import DAG
|
|||||||
from openmetadata_managed_apis.utils.logger import set_operator_logger
|
from openmetadata_managed_apis.utils.logger import set_operator_logger
|
||||||
from openmetadata_managed_apis.workflows.ingestion.common import (
|
from openmetadata_managed_apis.workflows.ingestion.common import (
|
||||||
ClientInitializationError,
|
ClientInitializationError,
|
||||||
|
GetServiceException,
|
||||||
build_dag,
|
build_dag,
|
||||||
)
|
)
|
||||||
from openmetadata_managed_apis.workflows.ingestion.elasticsearch_sink import (
|
from openmetadata_managed_apis.workflows.ingestion.elasticsearch_sink import (
|
||||||
@ -83,9 +84,7 @@ def build_data_insight_workflow_config(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not openmetadata_service:
|
if not openmetadata_service:
|
||||||
raise ValueError(
|
raise GetServiceException(service_type="metadata", service_name="OpenMetadata")
|
||||||
"Could not retrieve the OpenMetadata service! This should not happen."
|
|
||||||
)
|
|
||||||
|
|
||||||
sink = build_elasticsearch_sink(
|
sink = build_elasticsearch_sink(
|
||||||
openmetadata_service.connection.config, ingestion_pipeline
|
openmetadata_service.connection.config, ingestion_pipeline
|
||||||
|
@ -14,6 +14,7 @@ ElasticSearch reindex DAG function builder
|
|||||||
from airflow import DAG
|
from airflow import DAG
|
||||||
from openmetadata_managed_apis.workflows.ingestion.common import (
|
from openmetadata_managed_apis.workflows.ingestion.common import (
|
||||||
ClientInitializationError,
|
ClientInitializationError,
|
||||||
|
GetServiceException,
|
||||||
build_dag,
|
build_dag,
|
||||||
metadata_ingestion_workflow,
|
metadata_ingestion_workflow,
|
||||||
)
|
)
|
||||||
@ -56,9 +57,7 @@ def build_es_reindex_workflow_config(
|
|||||||
entity=MetadataService, fqn=ingestion_pipeline.service.fullyQualifiedName
|
entity=MetadataService, fqn=ingestion_pipeline.service.fullyQualifiedName
|
||||||
)
|
)
|
||||||
if not openmetadata_service:
|
if not openmetadata_service:
|
||||||
raise ValueError(
|
raise GetServiceException(service_type="metadata", service_name="OpenMetadata")
|
||||||
"Could not retrieve the OpenMetadata service! This should not happen."
|
|
||||||
)
|
|
||||||
|
|
||||||
sink = Sink(type="metadata-rest", config={})
|
sink = Sink(type="metadata-rest", config={})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user