-
Notifications
You must be signed in to change notification settings - Fork 74
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
Vendoring solver service #634
Vendoring solver service #634
Conversation
3b1dfb3
to
ea3a65c
Compare
It is a specific branch (https://github.com/ocurrent/solver-service/tree/solver-ci) that is vendored. The difference to the main (https://github.com/ocurrent/solver-service/tree/main) is that all the vendored dependencies is removed, because of some conflict (ocaml-dockerfile, ocurrent, ocluster). After the merge of ocaml/dune#6577 and the next release after that, it's going to be OK to vendor the main branch of solver-service and override its conflict dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, I'll test tomorrow and I'll test on Windows too!
Just a note for GitHub to simplify issue tracking. This addresses #446. |
Can you rebase? There are some conflicts introduced by Etienne's merge of migrations. |
ee68148
to
9b22024
Compare
Rebase done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Small question but will the solver-service
be released in opam? The current system removes the possibility of building ocaml-ci deps with opam install --deps-only
as it can't find the solver service.
I think this is the goal, but at the moment it's not a big deal because of vendoring make it as a part of the project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lib/solver_pool.ml
is dead code, remove this file.
I'm ok with the changes, but I've opened a bunch of PRs on upstream solver-service. I'd like your input there, and then you can update the submodule here, and I'll keep testing on Windows after. |
Should this be deployed on |
Not ready yet, I talk with @mtelvers and @tmcgilchrist about this deployment and we notice it needs some investigation about how many process is spawned for each request. It seems each time the |
b8862d1
to
feae61e
Compare
After the merge of ocurrent/solver-service#30 and ocurrent/solver-service#31, I think it's OK to merge and start deploying in order to test the change. We know now, how the solver-service is spawning processes (ocurrent/solver-service#31). |
feae61e
to
0c48dd7
Compare
This is PR is ready to be merged. Any suggestion ? |
Could we try it on |
b126e21
to
1ec71a2
Compare
1ec71a2
to
df4c7b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This version is working on my local test 👍
Dockerfile.gitlab
Outdated
@@ -34,8 +39,11 @@ RUN opam pin add -yn current_docker.dev "./ocurrent" && \ | |||
opam pin add -yn ocaml-version.dev "./ocaml-version" && \ | |||
opam pin add -yn dockerfile.dev "./ocaml-dockerfile" && \ | |||
opam pin add -yn dockerfile-opam.dev "./ocaml-dockerfile" && \ | |||
opam pin add -yn solver-service-api.dev "./solver-service" && \ | |||
opam pin add -yn solver-service.dev "./solver-service" && \ | |||
opam pin add -yn solver-worker.dev "./solver-service" && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opam pin add -yn solver-worker.dev "./solver-service" && \ |
Pinning the solver-worker is not required here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, even solver-service.dev
is not needed, only solver-service_api.dev
Dockerfile.gitlab
Outdated
COPY --chown=opam \ | ||
solver-service/solver-service-api.opam \ | ||
solver-service/solver-service.opam \ | ||
solver-service/solver-worker.opam \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solver-service/solver-worker.opam \ |
Dockerfile
Outdated
COPY --chown=opam \ | ||
solver-service/solver-service-api.opam \ | ||
solver-service/solver-service.opam \ | ||
solver-service/solver-worker.opam \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solver-service/solver-worker.opam \ |
Dockerfile
Outdated
@@ -32,8 +37,11 @@ RUN opam pin add -yn current_docker.dev "./ocurrent" && \ | |||
opam pin add -yn ocaml-version.dev "./ocaml-version" && \ | |||
opam pin add -yn dockerfile.dev "./ocaml-dockerfile" && \ | |||
opam pin add -yn dockerfile-opam.dev "./ocaml-dockerfile" && \ | |||
opam pin add -yn solver-service-api.dev "./solver-service" && \ | |||
opam pin add -yn solver-service.dev "./solver-service" && \ | |||
opam pin add -yn solver-worker.dev "./solver-service" && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opam pin add -yn solver-worker.dev "./solver-service" && \ |
lib/backend_solver.ml
Outdated
|
||
type t = | ||
[ `Remote of Current_ocluster.Connection.t | ||
| `Local of Ocaml_ci_api.Solver.t Lwt.t ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these constructors aren't used elsewhere they can just be regular variants.
lib/platform.ml
Outdated
@@ -140,7 +140,7 @@ module Query = struct | |||
let run No_context job { Key.docker_context; variant } | |||
{ Value.image; host_image } = | |||
Current.Job.start job ~level:Current.Level.Mostly_harmless >>= fun () -> | |||
let prep_image = Fmt.str "ocurrent/ocaml-ci:%a" Variant.pp variant in | |||
let prep_image = "ocurrent/ocaml-ci:" ^ Variant.docker_tag variant in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let prep_image = "ocurrent/ocaml-ci:" ^ Variant.docker_tag variant in | |
let prep_image = Fmt.str "ocurrent/ocaml-ci:%s" (Variant.docker_tag variant) in |
test/service/test_spec.ml
Outdated
@@ -62,7 +62,7 @@ let expected_linux_spec = | |||
(* Create testable Sexp for Alcotest. *) | |||
let sexp = Alcotest.testable Sexplib0__Sexp.pp_hum Sexplib0__Sexp.equal | |||
|
|||
let test_macos_spec () = | |||
let test_macos_spec _ () = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why these tests need to use Alcotest LWT now. They do not require any LWT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This avoids splitting the tests in LWT and none.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And to fit the tests in two categories test/service
and test/web
.
The solver move to https://github.com/ocurrent/solver-service, and become a service. It's also possible to run the local pipeline with remote solver(cap file) or local solver(spawning a local solver).
317ec42
to
e59612d
Compare
c069a4d
to
7680d01
Compare
Solver-service replace the local solver. And
ocam-ci-service
can submit for solving to a scheduler that manage a solver-worker.ocaml-ci-service
can be depolyed like the previous version, and also possible to launch it by providing asubmission cap file
for a scheduler that manage a solver-worker.