Repository navigation
fix: list the tasks on a server schedule - #1930
Open
ranjithguggilla wants to merge 1 commit into
Open
ranjithguggilla wants to merge 1 commit into
ranjithguggilla wants to merge 1 commit into
Conversation
Extract refreshes were the only task type queryable per schedule. Subscriptions and flow tasks are now filtered onto that schedule as well. Cloud subscriptions have no server schedule id, so they stay out of the list.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1250
Motivation
schedules.get_extract_refresh_taskswas the only way to see what a schedule runs. The REST API has no schedule-scoped query for subscriptions or flow tasks. Jac Fitzgerald asked forget_subscriptions_by_scheduleand the same idea for the other task types. PR #1873 took a similar approach and was closed before it merged.Behavior change
schedules.get_tasks(schedule_id)returns the extract refreshes on that schedule, the Tableau Server subscriptions whose schedule id matches, and the flow run tasks whose schedule id matches.get_subscriptions_by_scheduleandget_flow_tasks_by_scheduleare available on their own. Tableau Cloud subscriptions use a frequency and have no server schedule id, so they are not included. A server without the flow-task method returns an empty flow list instead of raising.Test plan
test_get_tasks_on_schedulechecks that a matching subscription and flow task are kept and that a Cloud subscription (no schedule id) and a flow task on another schedule are left out.test_flow_tasks_missing_on_older_serverchecks the 404 path.Not covered: a call against Tableau Server or Tableau Cloud.