Run workhorse inline with feature specs
What is the productivity problem to solve?
Writing code in gitlab that depends on workhorse features, such as file uploads, is somewhat fraught. We've particularly seen this when adding new package repositories (Maven, NuGet, Conan, etc) to GitLab - each time, people need to run the gauntlet of learning how workhorse and gitlab interact, and we can only exercise the behaviour properly in QA specs, which tend not to get written. As a result, we've merged buggy, insecure, non-performant code on a number of occasions.
Problem identification checklist
-
The root cause of the problem is identified. -
The surface of the problem is as small as possible.
What are the potential solutions?
Let's start running workhorse inline in the spec/features
test suite. This should be possible, because these tests run using headless chrome against an actual HTTP server. Right now, that's plain webrick.
This increases the amount of memory required to run the specs by a little (RSS is 14MiB here), but shouldn't slow them down appreciably. We can use a single, persistent workhorse process for all specs, so startup time is amortised across everything that is run.
This allows people to write and test code that uses already-existing workhorse features end-to-end without leaving gdk/gitlab
, hopefully resulting in a better productivity experience, better tests, fewer errors in development. We do this for Gitaly in almost all tests too.
We could consider expanding it to spec/requests
as well?
-
All potential solutions are listed. -
A solution has been chosen for the first iteration: PUT THE CHOSEN SOLUTION HERE
Who and when will the solution be implemented?
Verify that the solution has improved the situation
-
The solution improved the situation. - If yes, check this box and close the issue. Well done!
🎉 - Otherwise, create a new "Productivity Improvement" issue. You can re-use the description from this issue, but obviously another solution should be chosen this time.
- If yes, check this box and close the issue. Well done!