Closed shonfeder closed 1 month ago
I would like to sync with @mtelvers to discuss the handling of the value used for the docker context, as I think I am abusing that value in the changes to the services.md
a bit, so I'll leave this as a draft until I get a chance to do so.
I've updated this to resolver merge conflicts, and it should be ready for review again.
Thanks for the review and improvements, @mtelvers! I added one fix following your correction about the docker context for the base image builder, and one further refactor to make the construction of the docker modules more obvious.
Should be ready for another look when you have time!
Oh, I misunderstood! Thanks for the fix. I agree the naming of the function makes sense.
Thanks again for the review and collaboration here! I'm happy with the result :) :raised_hands:
The current code declares a type like
Values of this type are used to mark a field in the deployed services in
pipeline.ml
. Values of this type are not used anywhere in the project except forcluster.ml
. In that location, they are used to map to different applications ofpull_and_serve
. Once we remove the unused AWS entry, every application ofpull_and_serve
is uniform except that different modules are packed into arguments. The only difference between these modules is a string value provided when applying theCurrent_docker.Make
to contruct instances ofCurrent_docker.S.DOCKER
. And the string value provided there exposes information that we should only know if you are within the context of a particular deployer.This PR tries to simplify the situation via the following change: instead of pre-applying
Current_docker.Make
to special strings, and then using a map from theservice
type to select theCurrent_docker.S.DOCKER
we need, we move the special string value to the service configuration inpipeline.ml
, and use it directly to construct the neededCurrent_docker.S.DOCKER
. This simplification results in the following benefits:service
type entirely.pipeline.ml
, further abstracting the "flavours" from the general deployer logic, and providing this useful string at the point where we would actually want to read it.services.md
, so we gain the ability to use this to link to the web UI (for most services, the value use for the docker context coincides with the service's URL).A few other incidental cleanups are made along the way. Review by commit may be useful, tho the diff is not as big as it looks: more than half the new lines are just from the updated
services.md
, which has a bit more data now and improved organization.