maelstrom-software / maelstrom

Maelstrom is a fast Rust, Go, and Python test runner that runs every test in its own container. Tests are either run locally or distributed to a clustered job runner.
https://maelstrom-software.com/
Apache License 2.0
599 stars 11 forks source link

Cannot use maelstrom-pytest on Ubuntu 22.04 #416

Closed nicolas-slamcore closed 2 months ago

nicolas-slamcore commented 2 months ago

Specific Maelstrom Program? This happened with maelstrom-pytest (but I have not tested any other)

Bug Description When trying to init, I'm getting an error related to the version of libc:

1 ± maelstrom-pytest --init
maelstrom-pytest: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by maelstrom-pytest)

How to Reproduce Just run maelstrom-pytest --init in a standard, up-to-date, Ubuntu 22.04 environment.

Expected Behavior I'm expecting to be able to use the tool on that OS.

Additional Context The problem is the version of libc. The latest natively available on this OS is 2.35, but apparently, we need 2.39 to run it. Since this is a pretty common OS right now, I was expecting compatibility but this may be out of the scope of this project (feel free to close the ticket if that's the case).

bobbobbio commented 2 months ago

Hi, thank you for your issue. Yes we do want to make sure our binaries work on Ubuntu 22.04. We are trying generalize them so they don't rely on that specific newer libc version, but something must have gone wrong. Thank you for letting us know.

bobbobbio commented 2 months ago

Binaries for the 0.12.0 release have been updated. The new binaries should get past this error you have described.

nicolas-slamcore commented 2 months ago

Thanks, I'll give it a try ASAP!

bobbobbio commented 2 months ago

let us know how it goes and if you run into any more issues. feel free to reopen this issues if its not fixed or open a new one.

nicolas-slamcore commented 2 months ago

So I've managed to pass the init with your latest change, thanks for that!

I'm now experiencing another issue (failed to compile python) but I'm not certain if it's related to my environment or not so I'll try to look a bit more into it before opening another one.

bobbobbio commented 2 months ago

hmm that's interesting, I'd love to hear more about it. We're actively working on trying to make the experience of maelstrom-pytest easier so we've interested in the experience, feel free to stop by our discord and we could help you debug.

nicolas-slamcore commented 1 month ago

So about my issue specifically, it was indeed some environmental issue on my end, no need to worry on your side. I've managed to go a bit further, but the project I am using to test relies on some dependencies (like internal packages, or internal wheel repo) that are normally handled with our pyproject.toml. Apparently, there is an issue already opened for this so eventually that may be implemented.

I'll keep an eye on it and will certainly try it at some point on a less complex project to wrap my head around it since I like the concept! :)

bobbobbio commented 1 month ago

that issue may not be what you are looking for since it is just about using pyproject.toml to specify the configuration normally found in maelstrom-pytest.toml (not really new functionality just convenience)

I am wondering if you could share some more information about how these dependencies are specified, I'd like to make sure we're tracking some issue to support this scenario if we don't support it already.

nicolas-slamcore commented 1 month ago

I am not sure to understand. How do I get maelstrom to use the pyproject.toml?

bobbobbio commented 1 month ago

Sorry for the late reply.

Maybe the issue is that you aren't including the pyproject.toml in the container. I believe that we have an issue somewhere about including it by default.

To add it to the containers in your maelstrom-pytest.toml file put something like the following

[[directives]]
added_layers = [ { paths = ["pyproject.toml"] }]

that should copy the pyproject.toml into the root of the container

nicolas-slamcore commented 1 month ago

Actually, I already have this in my directives:

added_layers = [
    # This layer includes all the Python files from our project.
    { glob = "**.{py,pyc,pyi}" },
    # Include pyproject.toml if it exists.
    { glob = "pyproject.toml" },
    # This layer just includes files and directories for mounting the following
    # file-systems and devices.
    { stubs = [ "/{proc,sys,tmp}/", "/dev/{full,null,random,urandom,zero}" ] },
]

So I cannot add that line (it tells me it's duplicated). Yet, it fails to install some internal packages ERROR: Could not find a version that satisfies the requirement ***). If I just run pip install . in the repo, it works well. Not sure if the issue is on your side or mine tbh!