Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes: GetTags-403 Permission denied on resource project None. #14521

Merged
merged 3 commits into from
Dec 29, 2023

Conversation

civitaspo
Copy link
Contributor

@civitaspo civitaspo commented Dec 29, 2023

Describe your changes:

Fixed an issue in the BigQuery test_connection process where a GetTags-403 Permission denied on resource project None. error was encountered during the execution of test_tags. The previous implementation erroneously executed list_taxonomies without utilizing the specified taxonomyProjectID, leading to the error. While I am uncertain if engine.url.host can contain a GCP Project ID, I have made efforts to maintain backward compatibility as much as possible. However, there is one backward-incompatible change regarding the behavior when taxonomyLocation is not set. To prevent errors when taxonomyLocation is not configured, I have altered the process to log an info message and skip the execution of list_taxonomies.

Ingestion Error Log

[2023-12-29 00:48:56] DEBUG    {metadata.OMetaAPI:server_mixin:63} - Validating client and server versions
[2023-12-29 00:49:02] DEBUG    {metadata.Metadata:test_connections:197} - Traceback (most recent call last):
  File "/app/.venv/lib/python3.10/site-packages/google/api_core/grpc_helpers.py", line 79, in error_remapped_callable
    return callable_(*args, **kwargs)
  File "/app/.venv/lib/python3.10/site-packages/grpc/_channel.py", line 1160, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/app/.venv/lib/python3.10/site-packages/grpc/_channel.py", line 1003, in _end_unary_response_blocking
    raise _InactiveRpcError(state)  # pytype: disable=not-instantiable
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.PERMISSION_DENIED
	details = "Permission denied on resource project None."
	debug_error_string = "UNKNOWN:Error received from peer ipv4:172.217.161.234:443 {grpc_message:"Permission denied on resource project None.", grpc_status:7, created_time:"2023-12-29T00:49:02.216984256+00:00"}"
>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/.venv/lib/python3.10/site-packages/metadata/ingestion/connections/test_connections.py", line 193, in _test_connection_steps_during_ingestion
    step.function()
  File "/app/.venv/lib/python3.10/site-packages/metadata/ingestion/source/database/bigquery/connection.py", line 110, in test_tags
    taxonomies = PolicyTagManagerClient().list_taxonomies(
  File "/app/.venv/lib/python3.10/site-packages/google/cloud/datacatalog_v1/services/policy_tag_manager/client.py", line 908, in list_taxonomies
    response = rpc(
  File "/app/.venv/lib/python3.10/site-packages/google/api_core/gapic_v1/method.py", line 131, in __call__
    return wrapped_func(*args, **kwargs)
  File "/app/.venv/lib/python3.10/site-packages/google/api_core/grpc_helpers.py", line 81, in error_remapped_callable
    raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.PermissionDenied: 403 Permission denied on resource project None. [links {
  description: "Google developers console"
  url: "https://console.developers.google.com"
}
, reason: "CONSUMER_INVALID"
domain: "googleapis.com"
metadata {
  key: "service"
  value: "datacatalog.googleapis.com"
}
metadata {
  key: "consumer"
  value: "projects/None"
}
]

[2023-12-29 00:49:02] WARNING  {metadata.Metadata:test_connections:198} - GetTags-403 Permission denied on resource project None. [links {
  description: "Google developers console"
  url: "https://console.developers.google.com"
}
, reason: "CONSUMER_INVALID"
domain: "googleapis.com"
metadata {
  key: "service"
  value: "datacatalog.googleapis.com"
}
metadata {
  key: "consumer"
  value: "projects/None"
}
]
[2023-12-29 00:49:04] INFO     {metadata.Metadata:test_connections:215} - Test connection results:
[2023-12-29 00:49:04] INFO     {metadata.Metadata:test_connections:216} - failed=[] success=["'CheckAccess': Pass", "'GetSchemas': Pass", "'GetTables': Pass", "'GetViews': Pass", "'GetQueries': Pass"] warning=['\'GetTags\': This is a optional and the ingestion will continue to work as expected.Failed due to: 403 Permission denied on resource project None. [links {\n  description: "Google developers console"\n  url: "https://console.developers.google.com"\n}\n, reason: "CONSUMER_INVALID"\ndomain: "googleapis.com"\nmetadata {\n  key: "service"\n  value: "datacatalog.googleapis.com"\n}\nmetadata {\n  key: "consumer"\n  value: "projects/None"\n}\n]']
[2023-12-29 00:49:04] DEBUG    {metadata.Ingestion:metadata:62} - Source type:bigquery,<class 'metadata.ingestion.source.database.bigquery.metadata.BigquerySource'> configured
[2023-12-29 00:49:04] DEBUG    {metadata.Ingestion:metadata:64} - Source type:bigquery,<class 'metadata.ingestion.source.database.bigquery.metadata.BigquerySource'>  prepared
[2023-12-29 00:49:04] DEBUG    {metadata.Ingestion:metadata:73} - Sink type:metadata-rest, <class 'metadata.ingestion.sink.metadata_rest.MetadataRestSink'> configured

...<snip>...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Signed-off-by: Takahiro Nakayama <civitaspo@gmail.com>
Copy link

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Comment on lines +113 to +114
if engine.url.host:
taxonomy_project_ids.append(engine.url.host)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that the engine.url.host does not contain the GCP ProjectID, and therefore, it might be acceptable to remove this backward compatibility. If the OpenMetadata team agrees with this perspective, please let me know, and I can make the necessary changes in this Pull Request.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@civitaspo Thanks for the PR!
I had a question around connection to Bigquery..

how are you connecting to GCP? is it via service account credentials ( json file ) location, cli auth or is it via adding the service account details in UI?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ayush-shah Thank you for your response.
I am not using the UI. Instead, I am specifying a configuration YAML for ingestion/profile in the metadata CLI and executing metadata ingestion and profiling through it.

@civitaspo civitaspo marked this pull request as ready for review December 29, 2023 01:08
@civitaspo civitaspo requested a review from a team as a code owner December 29, 2023 01:08
@civitaspo
Copy link
Contributor Author

I considered adding tests for this change, but I was unsure where and how to write tests related to BigQuery's test_connection. If there is a reference implementation that could guide me, please let me know. If the policy is that minor changes do not require tests, I would be grateful if you could review it as is.

@harshach harshach added the safe to test Add this label to run secure Github workflows on PRs label Dec 29, 2023
@harshach
Copy link
Collaborator

@civitaspo thanks for the PR. @pmbrull or @ayush-shah can we review and merge it in

Copy link

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

Copy link
Member

@ayush-shah ayush-shah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@civitaspo can you run make py_format py_format_check to resolve the formatting issue?

Signed-off-by: Takahiro Nakayama <civitaspo@gmail.com>
Copy link

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

…2:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)"

Signed-off-by: Takahiro Nakayama <civitaspo@gmail.com>
@ayush-shah
Copy link
Member

@civitaspo looks like it's failing for this

ingestion/src/metadata/ingestion/source/database/bigquery/connection.py:112:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)

Can you take a look at the above? Let me know if you need help around it, Thanks!

@civitaspo
Copy link
Contributor Author

civitaspo commented Dec 29, 2023

@ayush-shah Thanks for the lightning-fast response! And sorry for not fixing everything in one commit! I've made the corrections now, so could you check again after the CI completes?

On a different note, it seems that black and pylint are indicating the need to modify files that I haven't changed in this round, but since that would increase the volume of changes significantly, I'm thinking of making those modifications in a separate PR!

black logs

black --check --diff ./ ../openmetadata-airflow-apis/ --config ./pyproject.toml
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/data_quality/source/test_suite.py     2023-12-29 08:47:16.472452+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/data_quality/source/test_suite.py     2023-12-29 08:47:28.505330+00:00
@@ -140,11 +140,10 @@
                     "has a test suite that is not executable.",
                 )
             )
 
         else:
-
             test_suite_cases = self._get_test_cases_from_test_suite(table.testSuite)
 
             yield Either(
                 right=TableAndTests(
                     table=table,
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/data_quality/processor/test_case_runner.py    2023-12-29 08:47:16.471794+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/data_quality/processor/test_case_runner.py    2023-12-29 08:47:28.546928+00:00
@@ -48,11 +48,10 @@
 
 class TestCaseRunner(Processor):
     """Execute the test suite tests and create test cases from the YAML config"""
 
     def __init__(self, config: OpenMetadataWorkflowConfig, metadata: OpenMetadata):
-
         super().__init__()
 
         self.config = config
         self.metadata = metadata
 
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/data_quality/source/test_suite.py
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/data_quality/processor/test_case_runner.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/dashboard/dashboard_service.py       2023-12-29 08:47:16.473687+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/dashboard/dashboard_service.py       2023-12-29 08:47:28.731325+00:00
@@ -551,11 +551,10 @@
         return fqn._build(  # pylint: disable=protected-access
             *context_names, entity_name
         )
 
     def check_database_schema_name(self, database_schema_name: str):
-
         """
         Check if the input database schema name is equal to "<default>" and return the input name if it is not.
 
         Args:
         - database_schema_name (str): A string representing the name of the database schema to be checked.
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/dashboard/dashboard_service.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/dashboard/superset/api_source.py     2023-12-29 08:47:16.475653+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/dashboard/superset/api_source.py     2023-12-29 08:47:28.736862+00:00
@@ -186,11 +186,10 @@
         return None
 
     def yield_datamodel(
         self, dashboard_details: DashboardResult
     ) -> Iterable[Either[CreateDashboardDataModelRequest]]:
-
         if self.source_config.includeDataModels:
             for chart_id in self._get_charts_of_dashboard(dashboard_details):
                 try:
                     chart_json = self.all_charts.get(chart_id)
                     if not chart_json:
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/dashboard/superset/api_source.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/dashboard/superset/db_source.py      2023-12-29 08:47:16.476568+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/dashboard/superset/db_source.py      2023-12-29 08:47:28.744524+00:00
@@ -209,11 +209,10 @@
         return None
 
     def yield_datamodel(
         self, dashboard_details: FetchDashboard
     ) -> Iterable[Either[CreateDashboardDataModelRequest]]:
-
         if self.source_config.includeDataModels:
             for chart_id in self._get_charts_of_dashboard(dashboard_details):
                 chart_json = self.all_charts.get(chart_id)
                 if not chart_json:
                     logger.warning(
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/dashboard/superset/db_source.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/azuresql/metadata.py        2023-12-29 08:47:16.478825+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/azuresql/metadata.py        2023-12-29 08:47:28.759313+00:00
@@ -75,11 +75,10 @@
 
     def get_database_names_raw(self) -> Iterable[str]:
         yield from self._execute_database_query(AZURE_SQL_GET_DATABASES)
 
     def get_database_names(self) -> Iterable[str]:
-
         if not self.config.serviceConnection.__root__.config.ingestAllDatabases:
             configured_db = self.config.serviceConnection.__root__.config.database
             self.set_inspector(database_name=configured_db)
             yield configured_db
         else:
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/azuresql/metadata.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/dashboard/looker/metadata.py 2023-12-29 08:47:16.474620+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/dashboard/looker/metadata.py 2023-12-29 08:47:28.830520+00:00
@@ -830,11 +830,10 @@
                     self._added_lineage[from_entity.id.__root__] = []
                 if (
                     to_entity.id.__root__
                     not in self._added_lineage[from_entity.id.__root__]
                 ):
-
                     self._added_lineage[from_entity.id.__root__].append(
                         to_entity.id.__root__
                     )
                     return self._get_add_lineage_request(
                         to_entity=to_entity, from_entity=from_entity
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/dashboard/looker/metadata.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/hive/connection.py  2023-12-29 08:47:16.480742+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/hive/connection.py  2023-12-29 08:47:28.876317+00:00
@@ -124,11 +124,10 @@
     raise NotImplementedError("Metastore not implemented")
 
 
 @get_metastore_connection.register
 def _(connection: PostgresConnection):
-
     # import required to load sqlalchemy plugin
     # pylint: disable=import-outside-toplevel,unused-import
     from metadata.ingestion.source.database.hive.metastore_dialects.postgres import (  # nopycln: import
         HivePostgresMetaStoreDialect,
     )
@@ -151,11 +150,10 @@
     )
 
 
 @get_metastore_connection.register
 def _(connection: MysqlConnection):
-
     # import required to load sqlalchemy plugin
     # pylint: disable=import-outside-toplevel,unused-import
     from metadata.ingestion.source.database.hive.metastore_dialects.mysql import (  # nopycln: import
         HiveMysqlMetaStoreDialect,
     )
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/hive/connection.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/mssql/metadata.py   2023-12-29 08:47:16.484576+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/mssql/metadata.py   2023-12-29 08:47:28.898751+00:00
@@ -89,11 +89,10 @@
 
     def get_database_names_raw(self) -> Iterable[str]:
         yield from self._execute_database_query(MSSQL_GET_DATABASE)
 
     def get_database_names(self) -> Iterable[str]:
-
         if not self.config.serviceConnection.__root__.config.ingestAllDatabases:
             configured_db = self.config.serviceConnection.__root__.config.database
             self.set_inspector(database_name=configured_db)
             yield configured_db
         else:
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/mssql/metadata.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/postgres/pgspider/lineage.py        2023-12-29 08:47:16.487247+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/postgres/pgspider/lineage.py        2023-12-29 08:47:28.926049+00:00
@@ -73,11 +73,10 @@
 def get_lineage_from_multi_tenant_table(
     metadata: OpenMetadata,
     connection: any,
     service_name: str,
 ) -> Iterator[Either[AddLineageRequest]]:
-
     """
     For PGSpider, firstly, get list of multi-tenant tables.
     Next, get child foreign tables of each multi-tenant tables.
     Get entities of source and target table to create Lineage request.
     """
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/postgres/pgspider/lineage.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/oracle/utils.py     2023-12-29 08:47:16.486455+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/oracle/utils.py     2023-12-29 08:47:28.945346+00:00
@@ -60,11 +60,10 @@
     schema: str = None,
     resolve_synonyms=False,
     dblink="",
     **kw,
 ):
-
     return get_view_definition_wrapper(
         self,
         connection,
         table_name=view_name.lower(),
         schema=schema.lower() if schema else None,
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/oracle/utils.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/stored_procedures_mixin.py  2023-12-29 08:47:16.489941+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/stored_procedures_mixin.py  2023-12-29 08:47:29.009161+00:00
@@ -146,11 +146,10 @@
         self.context.stored_procedure_query_lineage = False
         if self.is_lineage_query(
             query_type=query_by_procedure.query_type,
             query_text=query_by_procedure.query_text,
         ):
-
             self.context.stored_procedure_query_lineage = True
             for either_lineage in get_lineage_by_query(
                 self.metadata,
                 query=query_by_procedure.query_text,
                 service_name=self.context.database_service,
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/stored_procedures_mixin.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/snowflake/utils.py  2023-12-29 08:47:16.489264+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/snowflake/utils.py  2023-12-29 08:47:29.012623+00:00
@@ -36,11 +36,10 @@
     get_table_comment_wrapper,
 )
 
 
 def _quoted_name(entity_name: Optional[str]) -> Optional[str]:
-
     if entity_name:
         return fqn.quote_name(entity_name)
 
     return None
 
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/snowflake/utils.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/dbt/metadata.py     2023-12-29 08:47:16.479955+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/dbt/metadata.py     2023-12-29 08:47:29.036176+00:00
@@ -685,11 +685,10 @@
         logger.debug(
             f"Processing DBT Descriptions for: {table_entity.fullyQualifiedName.__root__}"
         )
         if table_entity:
             try:
-
                 service_name, database_name, schema_name, table_name = fqn.split(
                     table_entity.fullyQualifiedName.__root__
                 )
                 data_model = data_model_link.datamodel
                 force_override = False
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/dbt/metadata.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/messaging/common_broker_source.py    2023-12-29 08:47:16.491038+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/messaging/common_broker_source.py    2023-12-29 08:47:29.075602+00:00
@@ -241,11 +241,10 @@
                 )
             else:
                 if messages:
                     for message in messages:
                         try:
-
                             value = message.value()
                             sample_data.append(
                                 self.decode_message(
                                     value,
                                     topic_entity.messageSchema.schemaText,
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/messaging/common_broker_source.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/search/elasticsearch/metadata.py     2023-12-29 08:47:16.493107+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/search/elasticsearch/metadata.py     2023-12-29 08:47:29.139396+00:00
@@ -109,11 +109,10 @@
     ) -> Iterable[Either[OMetaIndexSampleData]]:
         """
         Method to Get Sample Data of Search Index Entity
         """
         if self.source_config.includeSampleData and self.context.search_index:
-
             sample_data = self.client.search(
                 index=self.context.search_index,
                 q=WILDCARD_SEARCH,
                 size=self.source_config.sampleSize,
                 request_timeout=self.service_connection.connectionTimeoutSecs,
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/search/elasticsearch/metadata.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/pipeline/spline/metadata.py  2023-12-29 08:47:16.492476+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/pipeline/spline/metadata.py  2023-12-29 08:47:29.156165+00:00
@@ -129,11 +129,10 @@
                 if table_entity:
                     return table_entity
         return None
 
     def _get_table_from_datasource_name(self, datasource: str) -> Optional[Table]:
-
         if (
             not datasource
             and not datasource.startswith("dbfs")
             and not datasource.startswith("jdbc")
         ):
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/pipeline/spline/metadata.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/pipeline/airflow/metadata.py 2023-12-29 08:47:16.491749+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/pipeline/airflow/metadata.py 2023-12-29 08:47:29.173550+00:00
@@ -361,11 +361,10 @@
         :param pipeline_details: SerializedDAG from airflow metadata DB
         :return: Create Pipeline request with tasks
         """
 
         try:
-
             pipeline_request = CreatePipelineRequest(
                 name=pipeline_details.dag_id,
                 description=pipeline_details.description,
                 sourceUrl=f"{clean_uri(self.service_connection.hostPort)}/tree?dag_id={pipeline_details.dag_id}",
                 concurrency=pipeline_details.max_active_runs,
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/storage/storage_service.py   2023-12-29 08:47:16.494455+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/storage/storage_service.py   2023-12-29 08:47:29.178071+00:00
@@ -62,11 +62,10 @@
 KEY_SEPARATOR = "/"
 OPENMETADATA_TEMPLATE_FILE_NAME = "openmetadata.json"
 
 
 class StorageServiceTopology(ServiceTopology):
-
     root = TopologyNode(
         producer="get_services",
         stages=[
             NodeStage(
                 type_=StorageService,
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/storage/storage_service.py
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/pipeline/airflow/metadata.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/metrics/hybrid/histogram.py  2023-12-29 08:47:16.495618+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/metrics/hybrid/histogram.py  2023-12-29 08:47:29.229248+00:00
@@ -27,10 +27,11 @@
 from metadata.profiler.orm.registry import is_concatenable, is_quantifiable
 from metadata.utils.helpers import format_large_string_numbers
 from metadata.utils.logger import profiler_logger
 
 logger = profiler_logger()
+
 
 # pylint: disable=too-many-locals
 class Histogram(HybridMetric):
     """
     AVG Metric
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/metrics/hybrid/histogram.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/processor/processor.py       2023-12-29 08:47:16.496881+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/processor/processor.py       2023-12-29 08:47:29.261656+00:00
@@ -35,11 +35,10 @@
     This processor is in charge of getting the profiler source and entity coming from
     the OpenMetadataSource and compute the metrics.
     """
 
     def __init__(self, config: OpenMetadataWorkflowConfig):
-
         super().__init__()
 
         self.config = config
         self.profiler_config = ProfilerProcessorConfig.parse_obj(
             self.config.processor.dict().get("config")
@@ -47,11 +46,10 @@
         self.source_config: DatabaseServiceProfilerPipeline = cast(
             DatabaseServiceProfilerPipeline, self.config.source.sourceConfig.config
         )  # Used to satisfy type checked
 
     def _run(self, record: ProfilerSourceAndEntity) -> Either[ProfilerResponse]:
-
         profiler_runner: Profiler = record.profiler_source.get_profiler_runner(
             record.entity, self.profiler_config
         )
 
         try:
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/processor/processor.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/source/bigquery/type_mapper.py       2023-12-29 08:47:16.498497+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/source/bigquery/type_mapper.py       2023-12-29 08:47:29.268037+00:00
@@ -27,11 +27,10 @@
     """
     # pylint: disable=import-outside-toplevel
     from sqlalchemy_bigquery import STRUCT
 
     def build_struct(_type_map: dict, col: Column):
-
         structs = []
         for child in col.children:
             if child.dataType != DataType.STRUCT:
                 if child.arrayDataType:
                     type_ = _type_map.get(child.dataType)(item_type=child.arrayDataType)
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/source/bigquery/type_mapper.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/orm/functions/table_metric_construct.py      2023-12-29 08:47:16.496373+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/orm/functions/table_metric_construct.py      2023-12-29 08:47:29.294909+00:00
@@ -88,11 +88,10 @@
 def _build_query(
     columns: List[Column],
     table: Table,
     where_clause: Optional[List[ColumnOperators]] = None,
 ):
-
     query = select(*columns).select_from(table)
     if where_clause:
         query = query.where(*where_clause)
 
     return query
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/orm/functions/table_metric_construct.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/readers/file/api_reader.py    2023-12-29 08:47:16.499873+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/readers/file/api_reader.py    2023-12-29 08:47:29.302526+00:00
@@ -33,11 +33,10 @@
     """
     Generic API Reader
     """
 
     def __init__(self, credentials: ReadersCredentials):
-
         self._auth_headers = None
         self.credentials = credentials
 
     @property
     def auth_headers(self) -> Dict[str, str]:
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/readers/file/api_reader.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/source/metadata.py   2023-12-29 08:47:16.499175+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/source/metadata.py   2023-12-29 08:47:29.326002+00:00
@@ -112,11 +112,10 @@
         health check before moving forward
         """
         self.metadata.health_check()
 
     def _iter(self, *_, **__) -> Iterable[Either[ProfilerSourceAndEntity]]:
-
         for database in self.get_database_entities():
             try:
                 profiler_source = profiler_source_factory.create(
                     self.config.source.type.lower(),
                     self.config,
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/source/metadata.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/source/base/profiler_source.py       2023-12-29 08:47:16.497771+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/source/base/profiler_source.py       2023-12-29 08:47:29.327835+00:00
@@ -215,11 +215,10 @@
         return self.interface
 
     def _get_context_entities(
         self, entity: Table
     ) -> Tuple[DatabaseSchema, Database, DatabaseService]:
-
         schema_entity = None
         database_entity = None
         db_service = None
 
         if entity.databaseSchema:
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/profiler/source/base/profiler_source.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/sample_data.py      2023-12-29 08:47:16.488199+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/sample_data.py      2023-12-29 08:47:29.361283+00:00
@@ -796,11 +796,10 @@
 
             yield Either(right=stored_procedure)
 
         # Create table and stored procedure lineage
         for lineage_entities in self.stored_procedures["lineage"]:
-
             from_table = self.metadata.get_by_name(
                 entity=Table, fqn=lineage_entities["from_table_fqn"]
             )
             stored_procedure_entity = self.metadata.get_by_name(
                 entity=StoredProcedure, fqn=lineage_entities["stored_procedure_fqn"]
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/ingestion/source/database/sample_data.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/utils/secrets/secrets_manager_factory.py      2023-12-29 08:47:16.501114+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/utils/secrets/secrets_manager_factory.py      2023-12-29 08:47:29.371167+00:00
@@ -102,11 +102,10 @@
 
     def get_secrets_manager(self):
         return self.secrets_manager
 
     def _load_secrets_manager_credentials(self) -> Optional["AWSCredentials"]:
-
         if not self.secrets_manager_loader:
             return None
 
         try:
             loader_fn = secrets_manager_client_loader.registry.get(
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/utils/secrets/secrets_manager_factory.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/utils/secrets/client/loader.py        2023-12-29 08:47:16.500522+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/utils/secrets/client/loader.py        2023-12-29 08:47:29.383457+00:00
@@ -61,11 +61,10 @@
     return None
 
 
 @secrets_manager_client_loader.add(SecretsManagerClientLoader.env.value)
 def _(provider: SecretsManagerProvider) -> Optional[AWSCredentials]:
-
     if provider in {
         SecretsManagerProvider.aws,
         SecretsManagerProvider.managed_aws,
         SecretsManagerProvider.aws_ssm,
         SecretsManagerProvider.managed_aws_ssm,
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/utils/secrets/client/loader.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/workflow/metadata.py  2023-12-29 08:47:16.502438+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/workflow/metadata.py  2023-12-29 08:47:29.387666+00:00
@@ -29,11 +29,10 @@
     """
     Metadata ingestion workflow implementation.
     """
 
     def set_steps(self):
-
         # We keep the source registered in the workflow
         self.source = self._get_source()
         sink = self._get_sink()
 
         self.steps = (sink,)
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/workflow/metadata.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/workflow/usage.py     2023-12-29 08:47:16.502792+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/workflow/usage.py     2023-12-29 08:47:29.401228+00:00
@@ -31,11 +31,10 @@
     """
     Usage ingestion workflow implementation.
     """
 
     def set_steps(self):
-
         # We keep the source registered in the workflow
         self.source = self._get_source()
         processor = self._get_processor()
         stage = self._get_stage()
         bulk_sink = self._get_bulk_sink()
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/workflow/usage.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/workflow/base.py      2023-12-29 08:47:16.501960+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/workflow/base.py      2023-12-29 08:47:29.408618+00:00
@@ -222,11 +222,10 @@
             *_, pipeline_name = fqn.split(self.config.ingestionPipelineFQN)
 
             service = self._get_ingestion_pipeline_service()
 
             if service is not None:
-
                 return self.metadata.create_or_update(
                     CreateIngestionPipelineRequest(
                         name=pipeline_name,
                         service=EntityReference(
                             id=service.id,
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/workflow/base.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/workflow/application.py       2023-12-29 08:47:16.501592+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/workflow/application.py       2023-12-29 08:47:29.409938+00:00
@@ -69,11 +69,10 @@
 
     config: OpenMetadataApplicationConfig
     runner: Optional[AppRunner]
 
     def __init__(self, config_dict: dict):
-
         self.runner = None  # Will be passed in post-init
         # TODO: Create a parse_gracefully method
         self.config = OpenMetadataApplicationConfig.parse_obj(config_dict)
 
         # Applications are associated to the OpenMetadata Service
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/src/metadata/workflow/application.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_metabase.py 2023-12-29 08:47:16.504987+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_metabase.py 2023-12-29 08:47:29.430364+00:00
@@ -18,11 +18,10 @@
 from .base.test_cli import PATH_TO_RESOURCES
 from .common.test_cli_dashboard import CliCommonDashboard
 
 
 class MetabaseCliTest(CliCommonDashboard.TestSuite):
-
     # in case we want to do something before running the tests
     def prepare(self) -> None:
         redshift_file_path = str(
             Path(
                 PATH_TO_RESOURCES
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_metabase.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_powerbi.py  2023-12-29 08:47:16.505945+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_powerbi.py  2023-12-29 08:47:29.432544+00:00
@@ -18,11 +18,10 @@
 from .base.test_cli import PATH_TO_RESOURCES
 from .common.test_cli_dashboard import CliCommonDashboard
 
 
 class PowerBICliTest(CliCommonDashboard.TestSuite):
-
     # in case we want to do something before running the tests
     def prepare(self) -> None:
         redshift_file_path = str(
             Path(
                 PATH_TO_RESOURCES
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_powerbi.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_tableau.py  2023-12-29 08:47:16.506305+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_tableau.py  2023-12-29 08:47:29.441727+00:00
@@ -18,11 +18,10 @@
 from .base.test_cli import PATH_TO_RESOURCES
 from .common.test_cli_dashboard import CliCommonDashboard
 
 
 class TableauCliTest(CliCommonDashboard.TestSuite):
-
     # in case we want to do something before running the tests
     def prepare(self) -> None:
         redshift_file_path = str(
             Path(
                 PATH_TO_RESOURCES
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_tableau.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_hive.py     2023-12-29 08:47:16.504127+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_hive.py     2023-12-29 08:47:29.443109+00:00
@@ -18,11 +18,10 @@
 from .common.test_cli_db import CliCommonDB
 from .common_e2e_sqa_mixins import SQACommonMethods
 
 
 class HiveCliTest(CliCommonDB.TestSuite, SQACommonMethods):
-
     prepare_e2e: List[str] = [
         "DROP DATABASE IF EXISTS e2e_cli_tests CASCADE",
         "CREATE DATABASE e2e_cli_tests",
         """
         CREATE TABLE IF NOT EXISTS e2e_cli_tests.persons_profile (
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_hive.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_oracle.py   2023-12-29 08:47:16.505477+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_oracle.py   2023-12-29 08:47:29.464167+00:00
@@ -21,11 +21,10 @@
 from .common.test_cli_db import CliCommonDB
 from .common_e2e_sqa_mixins import SQACommonMethods
 
 
 class OracleCliTest(CliCommonDB.TestSuite, SQACommonMethods):
-
     create_table_query: str = """
        CREATE TABLE admin.admin_emp (
          empno      NUMBER(5) PRIMARY KEY,
          ename      VARCHAR2(15) NOT NULL,
          ssn        NUMBER(9),
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/cli_e2e/test_cli_oracle.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/integration/airflow/test_lineage_runner.py   2023-12-29 08:47:16.507149+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/integration/airflow/test_lineage_runner.py   2023-12-29 08:47:29.497053+00:00
@@ -162,11 +162,10 @@
             recursive=True,
             hard_delete=True,
         )
 
     def test_lineage_runner(self):
-
         with DAG("test_runner", start_date=datetime(2021, 1, 1)) as dag:
             BashOperator(
                 task_id="print_date",
                 bash_command="date",
                 inlets=[
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/integration/airflow/test_lineage_runner.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/pii/test_column_name_scanner.py 2023-12-29 08:47:16.508497+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/pii/test_column_name_scanner.py 2023-12-29 08:47:29.590307+00:00
@@ -38,11 +38,10 @@
         # Users
         self.assertIsNone(ColumnNameScanner.scan("id"))
         self.assertIsNone(ColumnNameScanner.scan("user_id"))
 
     def test_column_names_sensitive(self):
-
         # Bank
         self.assertEqual(ColumnNameScanner.scan("bank_account"), EXPECTED_SENSITIVE)
 
         # Credit Card
         self.assertEqual(ColumnNameScanner.scan("credit_card"), EXPECTED_SENSITIVE)
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/pii/test_column_name_scanner.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/metadata/utils/secrets/test_secrets_manager_factory.py  2023-12-29 08:47:16.507991+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/metadata/utils/secrets/test_secrets_manager_factory.py  2023-12-29 08:47:29.590414+00:00
@@ -50,11 +50,10 @@
             self.assertEqual(
                 "[any] is not implemented.", not_implemented_error.exception
             )
 
     def test_invalid_config_secret_manager(self):
-
         om_connection: OpenMetadataConnection = self.build_open_metadata_connection(
             SecretsManagerProvider.db,
             SecretsManagerClientLoader.noop,
         )
         om_connection.secretsManagerLoader = "random"
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/metadata/utils/secrets/test_secrets_manager_factory.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/profiler/pandas/test_profiler_interface.py      2023-12-29 08:47:16.508946+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/profiler/pandas/test_profiler_interface.py      2023-12-29 08:47:29.634651+00:00
@@ -60,11 +60,10 @@
     def client(self):
         return None
 
 
 class PandasInterfaceTest(TestCase):
-
     import pandas as pd
 
     col_names = [
         "name",
         "fullname",
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/profiler/pandas/test_profiler_interface.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/profiler/test_profiler_interface.py     2023-12-29 08:47:16.509587+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/profiler/test_profiler_interface.py     2023-12-29 08:47:29.673636+00:00
@@ -271,11 +271,10 @@
             source_config=source_config,
         )
         self.assertEqual(50, actual)
 
     def test_table_config_casting(self):
-
         expected = TableConfig(
             profileSample=200,
             profileSampleType=ProfileSampleType.PERCENTAGE,
             sampleDataCount=300,
             fullyQualifiedName="demo",
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/profiler/test_profiler_interface.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/topology/pipeline/test_airbyte.py       2023-12-29 08:47:16.512980+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/topology/pipeline/test_airbyte.py       2023-12-29 08:47:29.796489+00:00
@@ -190,11 +190,10 @@
     def test_pipelines(self):
         pipline = list(self.airbyte.yield_pipeline(EXPECTED_ARIBYTE_DETAILS))[0].right
         assert pipline == EXPECTED_CREATED_PIPELINES
 
     def test_pipeline_status(self):
-
         status = [
             either.right
             for either in self.airbyte.yield_pipeline_status(EXPECTED_ARIBYTE_DETAILS)
         ]
         assert status == EXPECTED_PIPELINE_STATUS
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/topology/pipeline/test_airbyte.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/test_pgspider_lineage_unit.py   2023-12-29 08:47:16.511908+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/test_pgspider_lineage_unit.py   2023-12-29 08:47:29.818460+00:00
@@ -620,11 +620,10 @@
             for record in get_lineage_from_multi_tenant_table(
                 self.postgres.metadata,
                 connection=self.postgres.service_connection,
                 service_name=self.postgres.config.serviceName,
             ):
-
                 if isinstance(record, AddLineageRequest):
                     requests.append(record)
 
             """Validate each AddLineageRequest"""
             for _, (expected, original) in enumerate(
@@ -659,11 +658,10 @@
             for record in get_lineage_from_multi_tenant_table(
                 self.postgres.metadata,
                 connection=self.postgres.service_connection,
                 service_name=self.postgres.config.serviceName,
             ):
-
                 if isinstance(record, AddLineageRequest):
                     requests.append(record)
 
             """Validate each AddLineageRequest"""
             for _, (expected, original) in enumerate(
@@ -698,11 +696,10 @@
             for record in get_lineage_from_multi_tenant_table(
                 self.postgres.metadata,
                 connection=self.postgres.service_connection,
                 service_name=self.postgres.config.serviceName,
             ):
-
                 if isinstance(record, AddLineageRequest):
                     requests.append(record)
 
             """Validate each AddLineageRequest"""
             for _, (expected, original) in enumerate(
@@ -736,11 +733,10 @@
             for record in get_lineage_from_multi_tenant_table(
                 self.postgres.metadata,
                 connection=self.postgres.service_connection,
                 service_name=self.postgres.config.serviceName,
             ):
-
                 if isinstance(record, AddLineageRequest):
                     requests.append(record)
 
             """Validate number of AddLineageRequest"""
             self.assertEqual(0, len(requests))
@@ -771,11 +767,10 @@
             for record in get_lineage_from_multi_tenant_table(
                 self.postgres.metadata,
                 connection=self.postgres.service_connection,
                 service_name=self.postgres.config.serviceName,
             ):
-
                 if isinstance(record, AddLineageRequest):
                     requests.append(record)
 
             """Validate number of AddLineageRequest"""
             self.assertEqual(0, len(requests))
@@ -807,11 +802,10 @@
             for record in get_lineage_from_multi_tenant_table(
                 self.postgres.metadata,
                 connection=self.postgres.service_connection,
                 service_name=self.postgres.config.serviceName,
             ):
-
                 if isinstance(record, AddLineageRequest):
                     requests.append(record)
 
             """Validate number of AddLineageRequest"""
             self.assertEqual(0, len(requests))
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/test_pgspider_lineage_unit.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/openmetadata-airflow-apis/openmetadata_managed_apis/api/utils.py     2023-12-29 08:47:16.514758+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/openmetadata-airflow-apis/openmetadata_managed_apis/api/utils.py     2023-12-29 08:47:29.840674+00:00
@@ -108,11 +108,10 @@
     return dagbag
 
 
 class ScanDagsTask(Process):
     def run(self):
-
         if airflow_version >= "2.6":
             scheduler_job = self._run_new_scheduler_job()
         else:
             scheduler_job = self._run_old_scheduler_job()
         try:
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/openmetadata-airflow-apis/openmetadata_managed_apis/api/utils.py
--- /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/topology/storage/test_storage.py        2023-12-29 08:47:16.514037+00:00
+++ /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/topology/storage/test_storage.py        2023-12-29 08:47:29.892085+00:00
@@ -306,11 +306,10 @@
                         {"transaction_id": 3, "transaction_value": 300},
                     ]
                 )
             ],
         ):
-
             Column.__eq__ = custom_column_compare
             self.assertListEqual(
                 [
                     Column(
                         name=ColumnName(__root__="transaction_id"),
would reformat /Users/takahiro.nakayama/src/github.com/civitaspo/OpenMetadata/ingestion/tests/unit/topology/storage/test_storage.py

Oh no! 💥 💔 💥

PyLint logs

I believe these files depend on files generated from the schema, so rather than correcting them as PyLint, I'm thinking it would make sense to ignore the lint rules for them.

PYTHONPATH=":./plugins" pylint --rcfile=./pyproject.toml --fail-under=10 ./src/metadata --ignore-paths ./src/metadata/generated || (echo "PyLint error code $?"; exit 1)
************* Module Command line or configuration file
Command line or configuration file:1:0: E0013: Plugin 'ingestion.plugins.print_checker' is impossible to load, is it installed ? ('No module named 'ingestion'') (bad-plugin-value)
************* Module antlr.split_listener
src/metadata/antlr/split_listener.py:24:4: C0103: Method name "enterQuotedName" doesn't conform to snake_case naming style (invalid-name)
src/metadata/antlr/split_listener.py:27:4: C0103: Method name "enterUnquotedName" doesn't conform to snake_case naming style (invalid-name)
src/metadata/antlr/split_listener.py:38:4: C0103: Method name "enterEntityAttribute" doesn't conform to snake_case naming style (invalid-name)
src/metadata/antlr/split_listener.py:41:4: C0103: Method name "enterEntityType" doesn't conform to snake_case naming style (invalid-name)
src/metadata/antlr/split_listener.py:44:4: C0103: Method name "enterEntityField" doesn't conform to snake_case naming style (invalid-name)
src/metadata/antlr/split_listener.py:47:4: C0103: Method name "enterEntityFqn" doesn't conform to snake_case naming style (invalid-name)

@ayush-shah
Copy link
Member

@civitaspo yes, on it.

For the black and pylint, can you check if the versions for those are as per the requirements?

Copy link

sonarcloud bot commented Dec 29, 2023

Quality Gate Failed Quality Gate failed for 'open-metadata-ingestion'

Failed conditions

7.4% Coverage on New Code (required ≥ 20%)

See analysis details on SonarCloud

@civitaspo
Copy link
Contributor Author

@ayush-shah Thank you for your comment. As you mentioned, using the version of black specified in setup.py ("black==22.3.0") resolved the check failure. Regarding pylint, even with pylint==3.0.3, the check fails locally. However, since nothing is showing up on GitHub Actions, it's likely an issue with my environment. Now that I know it's a problem with my environment, please disregard it for the moment!

@ayush-shah ayush-shah merged commit 7d05d9f into open-metadata:main Dec 29, 2023
13 of 14 checks passed
@ayush-shah
Copy link
Member

Thanks for the contribution 🙌

@civitaspo civitaspo deleted the fix-bigquery-test-tags branch December 29, 2023 09:51
@civitaspo
Copy link
Contributor Author

It was a very responsive and positive contribution experience. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ingestion safe to test Add this label to run secure Github workflows on PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants