8000 Removes constraint that required interval when updating schedule by shinchris · Pull Request #711 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

Removes constraint that required interval when updating schedule #711

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

Merged
merged 2 commits into from
Oct 30, 2020

Conversation

shinchris
Copy link
Contributor

Attributes of a schedule can be updated without needing an interval attribute. We previously had a check to make sure that a schedule item contained an interval item when updating. This PR removes that check.

@bcantoni
Copy link
Contributor

@shinchris overall looks good. Are there any test changes or additions to consider? For example, do we already cover setting the state? (Like the example from the bug reporter.)

@shinchris
Copy link
Contributor Author

We have a general unit test that verifies the parsing of an update response, but doesn't cover setting the state. We can add state to that existing test, and also add another test case that tests the removal of the constraint.

I also just noticed that we are missing schedules.get_by_id(), which we can add in a separate PR.

@t8y8
Copy link
Collaborator
t8y8 commented Oct 29, 2020

What was the issue here? I don't think a schedule can be interval-less.

Is the problem that update requests required it in addition to creates?

@shinchris
Copy link
Contributor Author
shinchris commented Oct 29, 2020

Yes, to your second question. The main issue is that the schedules.get call does not return interval. So when you try to update the same object with a changed state, it would fail in TSC because it was interval-less. Server doesn't have that constraint for update though - partial, interval 8000 -less updates should go through.

@shinchris shinchris merged commit 6d52669 into development Oct 30, 2020
@shinchris shinchris deleted the schedule_fix branch October 30, 2020 18:27
This was referenced Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0