Skip to content
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

Move job incompletion code on worker connect to one place #2595

Conversation

Martchus
Copy link
Contributor

Marking previous jobs of a worker as incomplete when it shows up again is so far handled within the web socket server and the registration API route. This change moves all aspects of handling this to the API. This will hopefully scale better because the regular API can use preforking.

See https://progress.opensuse.org/issues/60866

@Martchus Martchus force-pushed the move_worker_reported_back_from_scheduler_to_webui branch from 0d8041a to 3a25a2e Compare December 12, 2019 13:12
Copy link
Member

@okurz okurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

* Move the code entirely from the web socket server to the web UI
  instead of having it spread over different places
* Improve scalability because the web UI can make use of preforking
* Avoid redundant code
* Improve error handling of reschedule_state/reschedule_rollback
* Remove code for marking the current job of the worker as running
  when it connects to the web socket server because on the first
  status update it will be considered running anyways
* Do not incomplete assigned jobs on worker re-registration but
  re-schedule them instead like it was done on the web socket server
  side already
* See https://progress.opensuse.org/issues/60866
@Martchus Martchus force-pushed the move_worker_reported_back_from_scheduler_to_webui branch from 3a25a2e to f634359 Compare December 12, 2019 16:02
lib/OpenQA/Scheduler/Model/Jobs.pm Show resolved Hide resolved
lib/OpenQA/WebAPI/Controller/API/V1/Worker.pm Show resolved Hide resolved
t/05-scheduler-full.t Show resolved Hide resolved
@Martchus Martchus marked this pull request as ready for review December 13, 2019 16:42
@Martchus
Copy link
Contributor Author

Martchus commented Dec 13, 2019

I've pushed further commits to the branch (https://github.com/Martchus/openQA/tree/move_worker_reported_back_from_scheduler_to_webui) but GitHub doesn't show them in the PR. Maybe it is just a delay; otherwise I'll open a new PR. (I also can not close the PR right now.)

@okurz
Copy link
Member

okurz commented Dec 13, 2019

strange. Let me close the PR and you can try to either reopen it or open a new one.

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.

2 participants