Use "Remember Job Progress" in Scheduler and "Always Reset Sequence When Starting" in Capture.
ClosedPublic

Authored by TallFurryMan on Oct 12 2018, 7:22 AM.

Details

Summary

Moved "Remember Job Progress" to Scheduler option pane, add "Always Reset Sequence When Starting".
Displayed completed/total count of captures in sequence table.
Fixed a few side-effect issues with ignore progress in Capture module.

This differential supports the following use cases:

  • Control the progress of scheduler jobs based on capture storage
  • Reset the capture count of a single sequence job
  • Reset the capture count of all sequence jobs

Those use cases are described at https://github.com/TallFurryMan/kstars/wiki (WIP at the time of this differential).

The option "Remember Job Progress" is now a concept limited to the Scheduler.
Capture module now completely ignores disk storage, except for assigning a number as suffix to the capture file.
Capture does execute the sequence requested, as it is described, and nothing else.
The option "Always Reset Sequence When Starting" controls whether all counts should be reset to zero when pressing button "Start", or left as they were.
Independently, the end-user can manually reset all counts by clicking the "Reset" button, or a single count by editing the relevant job and clicking the "Reset" button.

Test Plan

Open the Ekos options, Capture pane, check that "Always Reset Sequence When Starting" is disabled.

When using the Capture module alone, starting with "Always Reset Sequence When Starting" disabled:

  • Set a few capture settings, click "Preview", check that the preview is proper.
  • Add the capture settings as a job, check that a job is created, and that it displays 0/N as count in the sequence table.
  • Click "Preview", check that preview is proper, and that count doesn't change in the sequence table.
  • Click "Start" to run the sequence, check that the sequence executes, and when complete, displays N/N as count.
  • Click "Start" again, check that sequence does not execute again.
  • Click "Reset", acknowledge the pop-up, check that count now displays 0/N, whatever captures are available on disk.
  • Click "Start" to run the sequence, check that the sequence executes, and when complete, displays N/N as count.
  • Click "+" to add a few more sequence jobs from the same or different capture settings, check that new jobs display 0/N, and that the existing one remains complete at N/N.
  • Click "Start" to run the sequence, check that the completed job doesn't execute, that the first new one does, and click "Stop" in the middle of the process, check job switches to aborted.
  • Click "Start" again, check that the first sequence missing captures resumes from where it left, and click "Stop" again in the middle of the process, check job switches to aborted.
  • Choose an aborted job, double-click on one of the sequence table lines to edit the corresponding job, then click "Reset", check that this job's count is reset to 0/N.
  • Click "Start" again, check that the first sequence missing captures resumes properly.
  • Open the Ekos Options, enable "Always Reset Sequence When Starting" and save settings.
  • Click "Start" again, check that all counts are reset to 0/N immediately.
  • Abort, reset, restart as wanted, check that all counts are always reset to 0/N when starting.

When using the Scheduler module, starting with "Always Reset Sequence When Starting" and "Remember Job Progress" disabled. For each test vector:

  • Load test vector, remove all captures that are expected, check that Scheduler does execute all captures as planned by the test schedule and its sequences.
  • Check that the count of captures in storage match the expected sequence (considering there were no errors nor aborts during the execution).
  • Enable "Remember Job Progress" in the Ekos options, click "Evaluate Jobs", check that all schedule jobs are marked complete when evaluated.
  • Remove all captures that are expected, click "Evaluate Jobs", check that all schedule jobs are marked incomplete and ready to run.
  • Enable "Always Reset Sequence When Starting" in the Ekos options, execute the sequence and check that the behavior does not change.

Bug: when using the Scheduler, the capture count provided by the Scheduler is visible in the Capture module when the sequence job is executed, not when the Capture is started.

Diff Detail

Repository
R321 KStars
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
TallFurryMan created this revision.Oct 12 2018, 7:22 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptOct 12 2018, 7:22 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
TallFurryMan requested review of this revision.Oct 12 2018, 7:22 AM
mutlaqja requested changes to this revision.Oct 12 2018, 8:41 AM

Great work Eric! Just tested this, need to test more but I noticed I cannot delete jobs in the scheduler. Can you check this?

This revision now requires changes to proceed.Oct 12 2018, 8:41 AM

Huh? I didn't expect this report :) you mean you can't delete scheduler jobs, or sequence jobs?

I also need to test further, I realized some lines of my test plan can be done in different ways with different parameters. It's difficult to remain minimal when features overlap...

Scheduler jobs.. I added a couple and then when I wanted to delete one, I couldn't. The "Delete" button is always disabled.

So that's certainly a regression on D15937. I remember testing with full schedules, but not trying to modify one. I'll double check, thanks.

DSooo I have no problem deleting scheduler jobs with my own codebase.
I'll check if I'm really up-to-date, right now I don't see any regression, neither in D16151 nor in D15937...

D15937Sorry! Finally got it. I tried to guess what would be your configuration, and found the relation with "Sort Jobs by Altitude and Priority".
This is a regression to D15937 indeed, unrelated to D16151.

TallFurryMan added a comment.EditedOct 12 2018, 8:11 PM

I can't believe it: the side-effect is in D14665... Back to August 7th... I'll issue a fix.

TallFurryMan requested review of this revision.Oct 13 2018, 8:01 AM

Regression fixed in D16173.

mutlaqja accepted this revision.Oct 13 2018, 12:06 PM
This revision is now accepted and ready to land.Oct 13 2018, 12:06 PM
This revision was automatically updated to reflect the committed changes.