curved-manchester-66006
02/21/2023, 8:09 PMdocker
itself that pants could use (we use Kaniko and buildkit today), there are /many/ different ways to configure gitlab runners (we can self host but the docker-in-docker options are not great for us right now) and I'm not sure what the shape of a minimal solution here looks like. Does pants grow multiple backends per tool that all interact with docker_image
? Can each docker_image
target have a set of tools it supports? Buildkit is sort of built in to docker, does it look simpler with that case? Sorry this is vague, my problem is that I'm unsure of both the vocabulary and the possible shape of the solutions.curved-television-6568
02/21/2023, 8:27 PMdocker_image
as the “front end”.curved-manchester-66006
02/21/2023, 9:38 PMdocker_image
get a backends_that_can_build_me=[]
option though? Or maybe more concretely and less pie-in-the-sky, is there an existing example where multiple backends have the same goal for the same target_type?curved-television-6568
02/22/2023, 12:57 AMcurved-television-6568
02/22/2023, 1:00 AMcurved-television-6568
02/22/2023, 1:01 AMcurved-manchester-66006
02/22/2023, 3:20 AMdo you see this as per target, rather than as a project wide option?I don't know! This is what I mean by not being able to see the 'shape' of the solution. If
pants.toml
had docker.builder = {buildkit,docker}
-- bunch of hand waving here around around actually implementing that -- and you could set it to docker
by default and buildkit
in CI I think that would cover what I need. But:
• I have no idea if that is 100, 80, or 50% of a solution for everyone else. (See the many different tools in the ticket which presumably fit different niches)
• If it is plausible that different targets would only be compatible with only certain "docker builders"
• How to express "docker builder" specific config in the target. Eg buildkit can do cross platform (arm,x86) builds which I don't think have a 'vanilla docker' analog.
• If the number of configuration knobs for each "docker builder" turns into something like "names sets of config" where one would plausibly want to use both "buildkit-configured-this-way" and "buildkit-configured-some-other-way" in the same project.
I /suspect/ most of that can reasonably be deferred after thinking out loud, but I don't really have much embodied knowledge to base my intuition on.curved-television-6568
02/22/2023, 1:03 PMdocker_image
the builder to use is dictated by the environment selected for that target. That will answer many questions on how to handle configuration and differences between dev & CI etc.curved-television-6568
02/22/2023, 1:05 PM