-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Check schedule flags validity also when creating a schedule from scratch #865
Conversation
290c589
to
6faccfc
Compare
Indeed there is maybe a thing to enhance in this PR, we validate schemas twice now (once for global schema and once for offliner schema). This has the disadvantage that if we have two errors, one in the global schema and one in the offliner schema, the error message will only contain the error in the global schema at first. And once this is fixed, it will display the second error in the offliner schema. Maybe we should trigger both checks in all situations and merge the two lists of error messages before returning the errors. Or maybe the price to pay is too high for a situation which will most probably never occur in reality, at least with current UIs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but you left a few debug prints
dispatcher/backend/src/tests/integration/routes/schedules/test_freecodecamp.py
Outdated
Show resolved
Hide resolved
dispatcher/backend/src/tests/integration/routes/schedules/test_freecodecamp.py
Outdated
Show resolved
Hide resolved
dispatcher/backend/src/tests/integration/routes/schedules/test_schedule.py
Outdated
Show resolved
Hide resolved
dispatcher/backend/src/tests/integration/routes/schedules/test_schedule.py
Outdated
Show resolved
Hide resolved
dispatcher/backend/src/tests/integration/routes/schedules/test_schedule.py
Outdated
Show resolved
Hide resolved
I left those debug print intentionally (to help should the test fail at some point), but I don't mind to remove them, I have no real PoV of whether this is a good idea or not. I find it useful to avoid to have to debug the test locally to understand what went wrong ... but in fact this is usually needed anyway. I will remove them for now. |
If those are useful, we can left them in. We shall document somewhere (bootstrap) that we allow this and add corresponding relaxing rule for tests (in other projects we lint the tests) |
I'm not sure they are really useful. My point was only to stress this might be intentional ^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…_creation" This reapply commit 7ce4f31
Rationale
Fix #864
Changes