Closed jiegillet closed 1 year ago
I can't check today but here are couple infos I remember.
First, Tiny proxy is used in the container to create a proxy server that automatically fail all http requests. This is the only I found to prevent the elm compiler to wait for roughly 5 seconds doing nothing when on Linux without network.
From memory, we do not check whether the proxy port is available, just assume it is. So I think I already had that tiny proxy error message in a context where I try to run it multiple times, resulting in the first time succeeding and all subsequent ones to fail due to occupied port. So the error might not be problematic.
Then regarding the long runtime duration. I cannot say exactly before 'ooking at it. One thing for sure is that due to the cost of starting Node, it is much more expensive to run tests one after each other, than to craft an executable concatenating all tests as done in CI of our main repo.
If you're running independant docker calls per test run. The cost per run is probably around 1s.
On Sat, Nov 12, 2022, 15:13 Jie @.***> wrote:
With these scripts, it will be possible to run elm-test-runner on each exercise from the exercism/elm repo in the CI, as discussed in this issue https://github.com/exercism/elm/issues/412.
To test locally bin/run-all-exercises-in-docker.sh path/to/elm/repo.
When I try it, it's very slow and I get a bunch of "tinyproxy: Could not create listening sockets." so maybe the tinyproxy script needs to be modified, but I would like to see the behavior in the CI here before touching it.
You can view, comment on, or merge this pull request online at:
https://github.com/exercism/elm-test-runner/pull/43 Commit Summary
- f77b472 https://github.com/exercism/elm-test-runner/pull/43/commits/f77b472e80ba24e5dd4ddd7adbc8e60d62cc0c5a Add scripts to run all tests
File Changes
(3 files https://github.com/exercism/elm-test-runner/pull/43/files)
- M Dockerfile https://github.com/exercism/elm-test-runner/pull/43/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557 (1)
- A bin/run-all-exercises-in-docker.sh https://github.com/exercism/elm-test-runner/pull/43/files#diff-6d890752ed0ce66235dabd4c482bdc3962367829674cdb95cdc31e01201d4ef7 (25)
- A bin/run_all_exercises.sh https://github.com/exercism/elm-test-runner/pull/43/files#diff-63774f43e0b6e98fd660b0aa3f1097fe9807beaa797806dff110835865c4d57c (52)
Patch Links:
- https://github.com/exercism/elm-test-runner/pull/43.patch
- https://github.com/exercism/elm-test-runner/pull/43.diff
— Reply to this email directly, view it on GitHub https://github.com/exercism/elm-test-runner/pull/43, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWFOCMU6NZGGBK2ZN4D7Z3WH6Q2NANCNFSM6AAAAAAR6K3S4M . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Mmh... There are still "tinyproxy: Could not create listening sockets." messages in the smoke-tests, but they are still very fast, so I guess it's OK? Maybe the proxy isn't required when we run docker with --network none
?
This is one of those times docker frustrates me because its whole job is to make behavior reproducible.
So I think I already had that tiny proxy error message in a context where I try to run it multiple times, resulting in the first time succeeding and all subsequent ones to fail due to occupied port. So the error might not be problematic. Then regarding the long runtime duration. I cannot say exactly before looking at it.
Ah you are right, it's probably the repeated use. Not a problem then.
One thing for sure is that due to the cost of starting Node, it is much more expensive to run tests one after each other, than to craft an executable concatenating all tests as done in CI of our main repo. If you're running independant docker calls per test run. The cost per run is probably around 1s.
Yes, I considered that, it makes sense when you just want to run the tests, but here we also want to make sure that the test code is extracted and parsed without issues (like we had that one time when tests had identical names). To do that, we have no choice but to run elm-test-runner on each folder.
I still don't know why it runs fast here and slow on my machine, but this is much less problematic than the opposite situation :)
@mpizenberg it would be great to have your review for this one
Thank you for the review and QA!
I am thinking now about an exercise that might require two solution files, in this case the script will break, so I will have to revisit it, maybe I can take the opportunity to look what I could do to make bin/run.sh
more parallel friendly.
I'll open an issue to remember this.
@exercism/maintainers-admin could I get an approval for this?
Closed in favor of https://github.com/exercism/elm/pull/527
With these scripts, it will be possible to run
elm-test-runner
on each exercise from the exercism/elm repo in the CI, as discussed in this issue.To test locally
bin/run-all-exercises-in-docker.sh path/to/elm/repo
.When I try it, it's very slow and I get a bunch of "tinyproxy: Could not create listening sockets." so maybe the tinyproxy script needs to be modified, but I would like to see the behavior in the CI here before touching it.