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(tableau): assert error on parent name #12392

Merged

Conversation

sgomezvillamor
Copy link
Contributor

@sgomezvillamor sgomezvillamor commented Jan 20, 2025

While Site Administrator Explorer privileges are required, users occasionally need to operate with a lower level of privileges. If so, the following error is thrown:

File "/tmp/datahub/ingest/venv-tableau-bac61a203a4fea43/lib/python3.10/site-packages/datahub/ingestion/source/tableau/tableau.py", line 3405, in emit_project_in_topological_order
assert (
AssertionError: project Customer First should not be null

This occurs because the Tableau API returns partial information when listing projects: child projects might include a reference to the parent project id, but the listing omits those projects that the credentials aren't allowed to access. As a result, the ingestor cannot perform the project name enrichment for such a parent project ID.

In this PR, when this happens, we remove the reference to the parent project from the child. This allows us to provide at least partial but functional information.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...on/src/datahub/ingestion/source/tableau/tableau.py 66.66% 2 Missing ⚠️
Files with missing lines Coverage Δ
...on/src/datahub/ingestion/source/tableau/tableau.py 89.12% <66.66%> (+0.01%) ⬆️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fbfa487...9994e3e. Read the comment docs.

"project-issue",
f"Parent project {cur_proj.parent_id} not found. We need Site Administrator Explorer permissions.",
)
break
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe just add a comment that this indexing is safe based on the guarantees provided by fetch_projects

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 added the assert a few lines above with that specific purpose

@sgomezvillamor sgomezvillamor merged commit 96758e2 into master Jan 22, 2025
188 of 191 checks passed
@sgomezvillamor sgomezvillamor deleted the feature/ing-799-fix-tableau-assert-error-parent-name branch January 22, 2025 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants