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

fix(ingestion): powerbi # continue ingestion if m-query parsing fail #7360

Conversation

siddiquebagwan
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Feb 17, 2023
except Exception as e:
self.log_http_error(
message=f"Unable to fetch users for {entity_name}({entity_id}).", e=e
except: # It will catch all type of exception
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the problem with the Exception as e way of catching exception handling?

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1 - I'm somewhat confused

Copy link
Contributor Author

@siddiquebagwan siddiquebagwan Feb 17, 2023

Choose a reason for hiding this comment

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

It is not catching ConnectionError and index-related exceptions, so Exception is not good if you want to catch all types of exceptions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah - thanks for clarification. This is useful to know!

except: # noqa: E722
# It will catch all type of exceptions, so that ingestion can continue without lineage information
_, e, _ = sys.exc_info()
logger.warning(str(e))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you- we need MORE of this.

logger.debug("flat_arg_list is zero")
return None

first_argument: Tree = flat_arg_list[0] # take first argument only
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you for adding this check. We need MORE of this!

)
if data_resolver.is_permission_error(e):
if data_resolver.is_permission_error(cast(Exception, e)):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this a safe cast if e is not actually an exception?

except Exception as e:
self.log_http_error(message="Unable to fetch list of workspaces", e=e)
except:
self.log_http_error(message="Unable to fetch list of workspaces")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Won't we be losing this exception?

self.log_http_error(
message=f"Unable to fetch reports for workspace {workspace.name}", e=e
message=f"Unable to fetch reports for workspace {workspace.name}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Won't we be losing this exception?

)
if data_resolver.is_permission_error(e):
if data_resolver.is_permission_error(cast(Exception, e)):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this cast safe? Given that e may not be an exception

Copy link
Collaborator

@jjoyce0510 jjoyce0510 left a comment

Choose a reason for hiding this comment

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

Want to get these changes for error handling out. Let's follow up on the dropping exceptions piece offline!

Cheers
John

@jjoyce0510 jjoyce0510 merged commit 79f576e into datahub-project:master Feb 17, 2023
oleg-ruban pushed a commit to RChygir/datahub that referenced this pull request Feb 28, 2023
…atahub-project#7360)

Co-authored-by: MohdSiddique Bagwan <mohdsiddique.bagwan@gslab.com>
yoonhyejin pushed a commit that referenced this pull request Mar 3, 2023
…7360)

Co-authored-by: MohdSiddique Bagwan <mohdsiddique.bagwan@gslab.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants