Fixed START_AT jobs disregarded while evaluating, and fixed the update of their score.
In KStars 3.0, Scheduler jobs are checked against each other to produce the final plan and detect scheduling issues (compared to pre 3.0 which schedules jobs independently first).
In KStars prior to 3.0, when a Scheduler job was set to start at a specific date, the implementation considered the evaluation of that job could simply be bypassed.
Unfortunately, the specific bypass of fixed-startup jobs remained in 3.0 and caused those jobs to avoid the verification sequence and disappear from the list of jobs to be processed.
This differential fixes this behavior.
This differential also fixes the update of the score of these jobs in the job table, which was not updated for fixed-startup jobs.
Warning: it now appears that fixed-startup jobs completely slipped through the integration tests of KStars 3.0.
Note that a fixed-startup job is non-movable:
- a fixed-startup job will fail if overlapping another fixed-startup job that is earlier in the schedule list.
- a non fixed-startup job will fail if overlapping a fixed-startup job, earlier or later in the schedule list.
Create and test execution of schedules with basic enforcement tests:
- a single fixed-startup job starting in the past: it must end up invalid.
- a single fixed-startup job starting in the future during the day, with twilight enforcement: it must end up invalid.
- a single fixed-startup job starting in the future when the target is lower than 15 degrees, with altitude enforcement: it must end up invalid.
- a single fixed-startup job starting in the future when the Moon is close, with Moon separation enforcement: it must end up invalid.
- a single fixed-startup job that is acceptable: it must end up schedule, and be retained for execution when starting the Scheduler.
Then create and test execution of schedules using fixed-startup and non fixed-startup jobs (we consider the lead time is configured so that estimation of the duration of jobs is large enough not to cause issues):
- a single fixed-startup job, followed by a start-asap job: the second job must start after the first job completes, lead time included.
- two fixed-startup jobs starting at the same time: the second job must end up invalid.
- a fixed-startup job followed by a second fixed-startup job starting before the completion of the first: the second job must end up invalid.
- a start-asap job followed by a fixed-startup job: depending on its completion time vs the fixed-startup job, the start-asap job must end up invalid or scheduled (the fixed-startup job must remain scheduled!)
- two fixed-startup jobs, plus a start-asap job in-between: depending on its completion time vs the second fixed-startup job, the middle start-asap job must end up invalid or scheduled (the second fixed-startup job must remain scheduled!).
In all situations described, the current score must be adequate and not remain to zero (when applicable).
Observe as invalid jobs are automatically moved to the end of the queue. This is somewhat not very user friendly.
Reviewers: mutlaqja, wreissenberger
Reviewed By: mutlaqja
Tags: KDE Edu
Differential Revision: https://phabricator.kde.org/D18041