Repository navigation
Labels
area/engineAbout dagger core enginekind/bugSomething isn't workingkind/external-helpkind/flakeSometimes failing, sometimes not
Description
Saw this fail here: https://github.com/dagger/dagger/actions/runs/9509605842/job/26212800646?pr=7660
Don't have the cloud trace on hand because it got re-run and couldn't find it in the history. But ugly output extracted from GHA logs is:
2024-06-14T02:27:54.5780199Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m module_python_test.go:306:
2024-06-14T02:27:54.5781462Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m Error Trace: /app/core/integration/module_python_test.go:306
2024-06-14T02:27:54.5782663Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m Error: Received unexpected error:
2024-06-14T02:27:54.5785058Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m input: container.from.withMountedFile.withWorkdir.withNewFile.withNewFile.withExec.withExec.stdout resolve: process "dagger --debug call hello" did not complete successfully: exit code: 1
2024-06-14T02:27:54.5787069Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m
2024-06-14T02:27:54.5787841Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m Stderr:
2024-06-14T02:27:54.5788940Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:46�[0m DBG frontend exporting �[2mspans=�[0m2
2024-06-14T02:27:54.5791159Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:46�[0m DBG frontend exporting span �[2mtrace=�[0ma9d4b5aa2511eee50f6d9555c85e5e64 �[2mid=�[0mc3b21a11941dfd56 �[2mparent=�[0m27c50ec63ed30b6a �[2mspan=�[0m"dagger --debug call hello"
2024-06-14T02:27:54.5793869Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:46�[0m DBG frontend exporting span �[2mtrace=�[0ma9d4b5aa2511eee50f6d9555c85e5e64 �[2mid=�[0m4e8279f79503e71d �[2mparent=�[0mc3b21a11941dfd56 �[2mspan=�[0minitialize
2024-06-14T02:27:54.5795699Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:46�[0m DBG recording span �[2mspan=�[0m"dagger --debug call hello" �[2mid=�[0mc3b21a11941dfd56
2024-06-14T02:27:54.5797829Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:46�[0m DBG recording span child �[2mspan=�[0m"dagger --debug call hello" �[2mparent=�[0m27c50ec63ed30b6a �[2mchild=�[0mc3b21a11941dfd56
2024-06-14T02:27:54.5799749Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:46�[0m DBG recording span �[2mspan=�[0minitialize �[2mid=�[0m4e8279f79503e71d
2024-06-14T02:27:54.5801770Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:46�[0m DBG recording span child �[2mspan=�[0minitialize �[2mparent=�[0mc3b21a11941dfd56 �[2mchild=�[0m4e8279f79503e71d
2024-06-14T02:27:54.5803766Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[95m1 : �[0m�[90m4e8279f79503e71d: �[0minitialize
2024-06-14T02:27:54.5805064Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:52�[0m DBG frontend exporting �[2mspans=�[0m2
2024-06-14T02:27:54.5807292Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:52�[0m DBG frontend exporting span �[2mtrace=�[0ma9d4b5aa2511eee50f6d9555c85e5e64 �[2mid=�[0m4e8279f79503e71d �[2mparent=�[0mc3b21a11941dfd56 �[2mspan=�[0minitialize
2024-06-14T02:27:54.5810043Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:52�[0m DBG frontend exporting span �[2mtrace=�[0ma9d4b5aa2511eee50f6d9555c85e5e64 �[2mid=�[0mc3b21a11941dfd56 �[2mparent=�[0m27c50ec63ed30b6a �[2mspan=�[0m"dagger --debug call hello"
2024-06-14T02:27:54.5811735Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:52�[0m DBG new end �[2mold=�[0m"1754-08-30 22:43:41.128654848 +0000 UTC" �[2mnew=�[0m"2024-06-14 02:27:52.726417174 +0000 UTC"
2024-06-14T02:27:54.5813395Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:52�[0m DBG recording span �[2mspan=�[0minitialize �[2mid=�[0m4e8279f79503e71d
2024-06-14T02:27:54.5815161Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:52�[0m DBG recording span child �[2mspan=�[0minitialize �[2mparent=�[0mc3b21a11941dfd56 �[2mchild=�[0m4e8279
2024-06-14T02:27:54.5816344Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m f79503e71d
2024-06-14T02:27:54.5817730Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:52�[0m DBG new end �[2mold=�[0m"2024-06-14 02:27:52.726417174 +0000 UTC" �[2mnew=�[0m"2024-06-14 02:27:52.727531297 +0000 UTC"
2024-06-14T02:27:54.5819583Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:52�[0m DBG recording span �[2mspan=�[0m"dagger --debug call hello" �[2mid=�[0mc3b21a11941dfd56
2024-06-14T02:27:54.5821527Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[2m02:27:52�[0m DBG recording span child �[2mspan=�[0m"dagger --debug call hello" �[2mparent=�[0m27c50ec63ed30b6a �[2mchild=�[0mc3b21a11941dfd56
2024-06-14T02:27:54.5823105Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[95m1 : �[0m�[90m4e8279f79503e71d: �[0minitialize�[33m ERROR�[0m�[90m [6.4s]�[0m
2024-06-14T02:27:54.5824784Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m �[95m1 : �[0m�[90m4e8279f79503e71d: �[0m�[33m! input: module.withSource.initialize resolve: failed to initialize module: failed to call module "test" to get functions: call constructor: process "/runtime" did not complete successfully: exit code: 1
2024-06-14T02:27:54.5826119Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m
2024-06-14T02:27:54.5826673Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m Stderr:
2024-06-14T02:27:54.5827746Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m ╭─ Error ──────────────────────────────────────────────────────────────────────╮
2024-06-14T02:27:54.5829469Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m │ The "main" module could not be found. Did you create a "src/main.py" file in │
2024-06-14T02:27:54.5831275Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m │ the root of your project? │
2024-06-14T02:27:54.5833137Z �[95m122 : �[0m �[90m[5m41.8s] �[0m�[90m|�[0m ╰──────────────────────────────────────────────────────────────────────────────╯
I very highly doubt it's actually related to the PR, but haven't seen it before. The test itself also doesn't look like it has anything obviously wrong on first glance and has existed for a while.
No immediate guesses at what's happening; going to run the test in a loop locally to see if I can hit it for now.
Metadata
Metadata
Assignees
Labels
area/engineAbout dagger core enginekind/bugSomething isn't workingkind/external-helpkind/flakeSometimes failing, sometimes not
Activity
sipsma commentedon Jun 14, 2024
Here's another one: https://dagger.cloud/dagger/traces/44e9cfefae2652e858b74d64e0c77cc6 https://github.com/dagger/dagger/actions/runs/9510535107/job/26215186140
No luck reproing locally yet, been running all python module tests (
TestModulePython) in a loop and passed 16 times in a row so far. I'll expand to runningTestContainer|TestModule, in case that matters.jedevc commentedon Jun 14, 2024
I've also seen this one in weird places: https://github.com/dagger/dagger/actions/runs/9514094855/job/26225547001.
Hm, gonna chuck this onto the v0.11.8 milestone for the moment - think it's probably worth getting to the bottom of it before we cut that release (just an overabundance of caution at this point, sorry) 🎉
sipsma commentedon Jun 14, 2024
I've been running
TestContainer|TestModulein a loop (clearing cache each iteration) for going on ~6 hours now and it just refuses to do anything but pass over and over...Whatever this is, I suspect it's very timing related or requires more parallelism. I'm gonna artificially bump
--parallelbeyond my number of CPUs to see if I can hit it that way, for lack of any better ideas.helderco commentedon Jun 17, 2024
This error message incorrectly shows on any "import not found" error, but fixed in:
However, the
TestPythonProjectLayouttest doesn't use any dependencies. You'd have to be in a state where the user package hasn't been installed. I don't know how you could get intoexec /runtimesuccessfully without having correctly installed the package.vito commentedon Jun 19, 2024
Another one:
vito commentedon Jun 24, 2024
Another one:
I seem to be hitting this pretty often, not sure if it's something unique to my PR (#7532) or if it's also on
main.jedevc commentedon Jun 25, 2024
Also seen this on an unrelated PR, don't think it's just you @vito: https://github.com/dagger/dagger/actions/runs/9660455332/job/26646092473?pr=7749
helderco commentedon Jun 25, 2024
I have no idea what's going on. According to this, there may be an issue with accessing a lock in uv's cache volume (concurrency), but then everything appears to be installed correctly:
So I don't understand why
mainisn't found:[-]flakey test: `TestPythonProjectLayout` - `The "main" module could not be found`[/-][+]flaky test: `TestPythonProjectLayout` - `The "main" module could not be found`[/+]sipsma commentedon Jul 19, 2024
Hit a somewhat different variant on this (maybe separate issue entirely?): https://dagger.cloud/dagger/traces/6dcab88c1bf49c3e56b08e8f80b141aa?span=e8d33f81fe0b06fd
@helderco does this happen to give any other hints on what might be going on here? Or still a mystery?
On a general note, I had some mild hope that the fix for #7900 may also fix this one, but turns out to not be the case.
TestLegacyis indeed seemingly gone after that fix but still hitting these python flakes.It's extremely frustrating because I cannot for the life me ever manage to repro these Python ones locally. May need to bite the bullet and do println debugging in CI at this point.
helderco commentedon Jul 19, 2024
Uh, yeah that looks like cache related to me. It actually does give a bit more info than the other.
The test that failed is requesting a Python 3.10 version (latest patch):
dagger/core/integration/module_python_test.go
Lines 315 to 319 in b983583
uv seems to think that the requirement is
==3.10.10but that's only pinned on the next test:dagger/core/integration/module_python_test.go
Lines 329 to 335 in b983583
Since this problem seems to hapen more on Python, I wonder if the issue is with uv's cache volume. If that's true, we need to then figure out if it's uv's concurrent cache handling or with our cache volumes. \cc @charliermarsh in case it rings a bell.
There's things we can do to debug:
--verboset.Logfthe contents ofpyproject.tomland the source filehelderco commentedon Jul 27, 2024
@sipsma, I think I understand what's going on now. Let's merge this and see if the problem persists or not:
helderco commentedon Jul 29, 2024
This was closed automatically but I'm not 100% sure it'll solve the issue so let's just look out for it and re-open if it happens again.
helderco commentedon Jul 31, 2024
Oh crap, this surfaced again. In main:
jedevc commentedon Aug 27, 2024
Hm, this could definitely still be the issue. But surely the UV cache is computed based on the absolute path inside the module container - and the workdir at this point won't have an effect?
How did you realize the cache key is computed based on absolute path? Trying to understand that part. I guess that's the
Identifierinterface?I wonder if the warnings here indicate something's wrong? If we're somehow clashing the paths, that would explain the issue 🤔
jedevc commentedon Aug 27, 2024
Hm, yup I've become pretty convinced this is part of the issue. Here's an example structure of a uv cache:
The
editableis the source name. Then, we have a hash of the absolute path to the place where the project is installed from at the next level. Then, we have a content hash of thepyproject.toml(and maybe other things). Alongside those hashes, we also haverevision.revwhich indicates the latest one. Finally, we have the actual data.Now. The fix here is that we need to change the absolute paths. There's not really another good option, we could try and apply some change to
pyproject.tomls before installing, but this will really screw uprevision.rev.helderco commentedon Aug 30, 2024
@jedevc, wow I really botched that one. Obviously the fix couldn't be on the container that runs
dagger callin the tests, but rather in the runtime 🤦 😅. Thanks for looking into it, and great work!There's another possible solution here. We can see if the folks from uv can figure out a solution in the tool itself since people using docker could also hit this problem (i.e., reusing the same cache volume accross different projects in the same path).
I reached out on Discord a while ago, but I'll create a GH issue for it. \cc @charliermarsh