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

Ensure Tableau connection is active to access wait_for_state #20433

Merged
merged 1 commit into from
Dec 22, 2021
Merged

Ensure Tableau connection is active to access wait_for_state #20433

merged 1 commit into from
Dec 22, 2021

Conversation

ericpp
Copy link
Contributor

@ericpp ericpp commented Dec 20, 2021

This PR should resolve issue #20432 which is caused by the wait_for_state call being executed outside of the TableauHook context after it has logged out of the Tableau server. This code moves the call into the context so that it is executed while still logged into the Tableau server.

closes: #20432

@ericpp ericpp changed the title Moved wait_for_state inside of TableauHook context to ensure an a… Moved wait_for_state inside context to ensure an active Tableau connection Dec 20, 2021
@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Dec 21, 2021
@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@@ -107,6 +107,7 @@ def execute(self, context: dict) -> str:
error_message = f'Method not found! Available methods for {self.resource}: {available_methods}'
raise AirflowException(error_message)

job_id = ""
Copy link
Member

Choose a reason for hiding this comment

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

This is unnecessary.

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 it in case the TableauHook context fails and it's left undefined. But I suppose if that were to happen, it would throw an exception and wouldn't reach return job_id anyway. I can remove it.

@uranusjr uranusjr changed the title Moved wait_for_state inside context to ensure an active Tableau connection Ensure Tableau connection is active to access wait_for_state Dec 22, 2021
@uranusjr uranusjr merged commit 636ae0a into apache:main Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers okay to merge It's ok to merge this PR as it does not require more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tableau provider signs out prior to blocking refresh check
3 participants