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

Prevent live view viewers from making openQA unresponsive #5754

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

Martchus
Copy link
Contributor

  • Avoid live view viewers from occupying too many Mojolicious workers by moving the image streaming of the live mode to the live handler daemon
  • Make sure the frontend code can still connect to the streaming route in a development setup by taking the different port into account and by setting CORS headers
  • Tested by running the main web UI service allowing only a limited number of connections via script/openqa prefork -c 1 -w 1. This causes it to be unresponsive if there is at least one live view tab open. With this change this is no longer a problem and multiple live tabs can be opened and are updated simultaneously.
  • Tested without and with reverse proxy.

@perlpunk
Copy link
Contributor

[  310s] Can't locate object method "is_local_request" via package "OpenQA::Shared::Controller::Running" at /home/abuild/rpmbuild/BUILD/openQA-4.6.1720629109.ab1aa5c/lib/OpenQA/Shared/Controller/Running.pm line 186.
[  310s] # Tests were run but no plan was declared and done_testing() was not seen.
[  310s] # Looks like your test exited with 255 just after 1.
[  310s] t/26-controllerrunning.t .................................. 

* Avoid live view viewers from occupying too many Mojolicious workers by
  moving the image streaming of the live mode to the live handler daemon
* Make sure the frontend code can still connect to the streaming route in a
  development setup by taking the different port into account and by
  setting CORS headers
* Tested by running the main web UI service allowing only a limited number
  of connections via `script/openqa prefork -c 1 -w 1`. This causes it to
  be unresponsive if there is at least one live view tab open. With this
  change this is no longer a problem and multiple live tabs can be opened
  and are updated simultaneously.
* Tested without and with reverse proxy.
Copy link

codecov bot commented Jul 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.43%. Comparing base (6db0ab5) to head (247a6ed).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5754      +/-   ##
==========================================
- Coverage   98.45%   98.43%   -0.02%     
==========================================
  Files         393      393              
  Lines       38585    38594       +9     
==========================================
+ Hits        37989    37991       +2     
- Misses        596      603       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mergify mergify bot merged commit 63bc4d0 into os-autoinst:master Jul 10, 2024
42 checks passed
@Martchus Martchus deleted the separate-streaming branch July 10, 2024 22:28
@perlpunk
Copy link
Contributor

This might be related: https://progress.opensuse.org/issues/163931
Can't locate object method "render_specific_not_found" via package "OpenQA::Shared::Controller::Running"

@Martchus
Copy link
Contributor Author

Right, well have to move that helper to the shared helpers. I assume you'll take care of it considering you've already assigned yourself to the ticket.

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