Skip to content

Commit

Permalink
fix(tableau): restart server object when reauthenticating (datahub-pr…
Browse files Browse the repository at this point in the history
…oject#12182)

Co-authored-by: Harshal Sheth <[email protected]>
  • Loading branch information
sgomezvillamor and hsheth2 authored Dec 20, 2024
1 parent acb76cd commit eceb799
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -896,10 +896,9 @@ def dataset_browse_prefix(self) -> str:
return f"/{self.config.env.lower()}{self.no_env_browse_prefix}"

def _re_authenticate(self):
tableau_auth: Union[
TableauAuth, PersonalAccessTokenAuth
] = self.config.get_tableau_auth(self.site_id)
self.server.auth.sign_in(tableau_auth)
# Sign-in again may not be enough because Tableau sometimes caches invalid sessions
# so we need to recreate the Tableau Server object
self.server = self.config.make_tableau_client(self.site_id)

@property
def site_content_url(self) -> Optional[str]:
Expand Down

0 comments on commit eceb799

Please sign in to comment.