Hey, as I’m pondering on how to make progress on <...
# development
c
Hey, as I’m pondering on how to make progress on https://github.com/pantsbuild/pants/issues/13682 I have a POC that augments the pytest command being invoked, to shove it into a
docker run
, basically. So far so good.. however, in doing so, the pytest pex should no longer be for the host platform, but for whatever platform is compatible with the docker container.
❤️ 1
👍 1
I’m not really sure how to propagate this platform requirement, though..
One idea is to somehow, add/override it as a plugin hook..
(afk doing dishes for a while…)
h
To build for a foreign platform would require using pex's --platform, which is more stringent than we want Instead, I suspect we should build the PEX directly in the Docker container like we normally would? Iirc Stu has a proposal to add engine support for running in Docker, like how the engine can use remote execution for you without you needing to change your plugin code
c
That sounds like more work, but also as a better approach to the whole issue 🙂
@witty-crayon-22786 do you have any initial pointers if I want to start exploring this..?
h
I think it's the only way to get it working because using Pex's --platform seems like a non-starter with sdists not working Alternatively, keep what you have as a proof of concept where it might not work if you're on macOS but should work on Linux
c
Yeah, well, it can certainly linger there, but I don’t think we want to land it or anything like that…
👍 1
w
It's quite a project to add docker cross compilation most likely. We definitely want to do it, but it's related to remote execution in that all process executions top-to-bottom need to occur in the image/remote-host.
👍 1
There is no particular ticket for it right now, but it's something we're hoping to do maybe Q2ish next year?
In the meantime, I could still imagine supporting running tests in a container, but with the requirements that you already have bdists. Just worth confirming that that is useful to folks first
👍 1
h
Given that the current iteration would be a holdover, maybe using Pex's
--platform
is feasible then. And to Keep It Simple, we could maybe have users directly put the expected
--platform
string in the target's field? No need to try to guess it based on parsing the Dockerfile imo, that's too complex
👍 1