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

Add fullstack test for scalability #2777

Closed

Conversation

Martchus
Copy link
Contributor

  • Fakes isotovideo. Fullstack means here that the worker, scheduler, web UI and web socket are started.
  • Spawns a configurable number of workers instances and jobs to test production-like job assignments.
  • Allows to reproduce https://progress.opensuse.org/issues/62984

t/dummy-isotovideo.sh Outdated Show resolved Hide resolved
t/05-fullstack-scalability.t Outdated Show resolved Hide resolved
t/05-fullstack-scalability.t Outdated Show resolved Hide resolved
t/05-fullstack-scalability.t Outdated Show resolved Hide resolved
t/05-fullstack-scalability.t Outdated Show resolved Hide resolved
@okurz
Copy link
Member

okurz commented Feb 28, 2020

Actually I recommend to rename from "fullstack" to something else as it's not really the full stack anymore with fully mocked isotovideo, right? Maybe "05-worker-scalability.t"?

@Martchus Martchus force-pushed the scalability-fullstack-test branch 2 times, most recently from 695b6b9 to bfa799c Compare March 2, 2020 14:22
lib/OpenQA/Worker/Job.pm Show resolved Hide resolved
t/dummy-isotovideo.sh Show resolved Hide resolved
t/43-scheduling-and-worker-scalability.t Show resolved Hide resolved
t/43-scheduling-and-worker-scalability.t Outdated Show resolved Hide resolved
t/43-scheduling-and-worker-scalability.t Outdated Show resolved Hide resolved
t/43-scheduling-and-worker-scalability.t Outdated Show resolved Hide resolved
t/43-scheduling-and-worker-scalability.t Outdated Show resolved Hide resolved
t/43-scheduling-and-worker-scalability.t Outdated Show resolved Hide resolved
t/43-scheduling-and-worker-scalability.t Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 4, 2020

Codecov Report

Merging #2777 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2777      +/-   ##
==========================================
+ Coverage   92.22%   92.23%   +0.01%     
==========================================
  Files         190      190              
  Lines       11829    11829              
==========================================
+ Hits        10909    10911       +2     
+ Misses        920      918       -2
Impacted Files Coverage Δ
lib/OpenQA/Worker/Job.pm 73.24% <100%> (-0.82%) ⬇️
lib/OpenQA/Scheduler/Model/Jobs.pm 91.49% <0%> (+2.83%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75be314...f2160b6. Read the comment docs.

@Martchus Martchus force-pushed the scalability-fullstack-test branch 2 times, most recently from fd254a1 to 3d2dab9 Compare March 5, 2020 10:55
# similar to other fullstack tests
my $worker_count = $ENV{SCALABILITY_FULLSTACK_WORKER_COUNT};
my $job_count = $ENV{SCALABILITY_FULLSTACK_JOB_COUNT} // $worker_count;
plan skip_all => 'set e.g. SCALABILITY_FULLSTACK_WORKER_COUNT=n to run the scalability test for n workers'
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we set a sensible default for our automatic tests? I don't see you setting values anywhere else, e.g. in circleci.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, so far it is disabled in the CI. That is because the scheduling itself isn't stable enough for this test to be useful to run within the CI yet.

t/43-scheduling-and-worker-scalability.t Outdated Show resolved Hide resolved
t/43-scheduling-and-worker-scalability.t Outdated Show resolved Hide resolved
t/43-scheduling-and-worker-scalability.t Outdated Show resolved Hide resolved
* Never mark a module as running on the final upload to avoid
  modules being considered 'running' when the test has already
  finished
* Verify whether the result file is actually containing a hash
* Fakes isotovideo. Fullstack means here that the worker,
  scheduler, web UI and web socket are started.
* Spawns a configurable number of workers instances and jobs
  to test production-like job assignments.
* Allows to reproduce https://progress.opensuse.org/issues/62984
* Avoid magic number
* Be consistent with the clients used for internal communication
Otherwise the test sometimes runs into the error "Can't create listen
socket: Address already in use ...".
* Bail out early if the job assignment went completely wrong
* Improve coding style
@Martchus
Copy link
Contributor Author

Martchus commented Mar 9, 2020

I continue working on that test in #2820. I have already incorporated most of the feedback from @okurz.

@Martchus Martchus closed this Mar 9, 2020
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.

None yet

2 participants