Skip to content

fix: list the tasks on a server schedule - #1930

Open
ranjithguggilla wants to merge 1 commit into
tableau:developmentfrom
ranjithguggilla:fix/1250-list-tasks-on-schedule
Open

ranjithguggilla wants to merge 1 commit into
tableau:developmentfrom
ranjithguggilla:fix/1250-list-tasks-on-schedule

Conversation

@ranjithguggilla

Copy link
Copy Markdown

Closes #1250

Motivation

schedules.get_extract_refresh_tasks was 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 for get_subscriptions_by_schedule and 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_schedule and get_flow_tasks_by_schedule are 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_schedule checks 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_server checks the 404 path.

Not covered: a call against Tableau Server or Tableau Cloud.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FUNCTION] [List Tasks in a Schedule]

1 participant