-
Notifications
You must be signed in to change notification settings - Fork 3k
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
test(ingest/tableau): add test for extract_project_hierarchy scenario #12079
base: master
Are you sure you want to change the base?
test(ingest/tableau): add test for extract_project_hierarchy scenario #12079
Conversation
metadata-ingestion/tests/integration/tableau/test_tableau_ingest.py
Outdated
Show resolved
Hide resolved
# reset the registry to test extract_project_hierarchy=false | ||
site_source.tableau_project_registry = {} | ||
|
||
config.extract_project_hierarchy = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these ideally should've been two separate unit tests, not smushed into a single test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kept it the same to ensure that anyone referencing it can clearly see the distinction between true and false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then you should use a parameterized test
Consider a scenario where a Tableau site contains four projects: A, B, C, and D, with the following hierarchical relationship:
The goal is to extract assets from project A and its children while explicitly denying the child project B.
If we rely solely on the
project_pattern.allowed()
method, project C's assets will not be ingested.This happens because project C is not explicitly included in the
allow
list, nor is it part of thedeny
list.However, since
extract_project_hierarchy
is enabled, project C should ideally be included in the ingestion process unless explicitly denied.To address this, the function explicitly checks the deny regex to ensure that project C’s assets are ingested if it is not specifically denied in the deny list. This approach ensures that the hierarchy is respected while adhering to the configured allow/deny rules.