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(ingest/tableau): project_path_pattern use in _is_denied_project #12010

Merged
merged 10 commits into from
Dec 11, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ class TableauConfig(

project_path_separator: str = Field(
default="/",
description="The separator used for the project_pattern field between project names. By default, we use a slash. "
description="The separator used for the project_path_pattern field between project names. By default, we use a slash. "
"You can change this if your Tableau projects contain slashes in their names, and you'd like to filter by project.",
)

Expand Down Expand Up @@ -908,8 +908,11 @@ def _is_allowed_project(self, project: TableauProject) -> bool:
return is_allowed

def _is_denied_project(self, project: TableauProject) -> bool:
# Either project name or project path should exist in deny
for deny_pattern in self.config.project_pattern.deny:
# Either project_pattern or project_path_pattern is set
deny_patterns: List[str] = self.config.project_pattern.deny
deny_patterns.extend(self.config.project_path_pattern.deny)

for deny_pattern in deny_patterns:
# Either name or project path is denied
if re.match(
deny_pattern, project.name, self.config.project_pattern.regex_flags
Expand Down
Loading