https://pantsbuild.org/ logo
h

happy-kitchen-89482

04/01/2023, 10:01 PM
Does anyone have insight into why src/python/pants/core/goals/tailor_test.py::test_tailor_rule_write_mode is intermittently failing in CI like this: https://github.com/pantsbuild/pants/actions/runs/4585116571/jobs/8097072485
1
The failure is:
ParseError: Name 'my_fortran_lib' is not defined.
And regardless, this seems like the kind of error that should be deterministic one way or another.
h

hundreds-father-404

04/01/2023, 10:03 PM
Yeah, that's weird. Do you know how long it's been happening? If we can roughly bisect it
h

happy-kitchen-89482

04/01/2023, 10:03 PM
Yet this is flaky
I don't
c

curved-television-6568

04/02/2023, 1:56 PM
I suspect a race here…
Copy code
09:54:37.50 [INFO] external invalidation: cleared 0 and dirtied 0 nodes for: {"", "conflict", "conflict/BUILD"}
09:54:37.50 [DEBUG] Launching 1 roots (poll=false).
09:54:37.50 [DEBUG] computed 1 nodes in 0.000320 seconds. there are 2 total nodes.
09:54:37.51 [DEBUG] Launching 1 roots (poll=false).
09:54:37.51 [DEBUG] Starting: `tailor` goal
Iff the filechange notification gets delayed by enough ms to fire just after tailor has written the modified contents for
conflict/BUILD
and the goal is re-run that BUILD file will now hold the unknown target in it.
i.e. a patchy solve is to add a
time.sleep(0.5)
(or whatever time needed) between the
rule_runner.write_files
and the run goal rule call.
or less patchy, disable file watching..
Even though that alias is set:
it is set for tailor to use, but is it known to Pants for parsing BUILD files with?
h

happy-kitchen-89482

04/02/2023, 2:09 PM
aha
Hopefully
🤞 1
c

curved-television-6568

04/02/2023, 4:02 PM
would be amazing to also solve that pantsd integration test flake that reared it’s ugly head in that PR too now.. 😉
h

happy-kitchen-89482

04/02/2023, 4:22 PM
Yeah, I'm looking at it
😍 1