https://pantsbuild.org/ logo
#general
Title
# general
w

wide-zoo-86070

03/28/2022, 6:50 PM
Hi team, sometimes I got the following error while using pants binary. In the pants.toml I have put
pants_version = "2.10.0+gitb27a00dd"
.
Copy code
BuildConfigurationError: Version mismatch: Requested version was 2.10.0, our version is 2.10.0+gitb27a00dd.
h

hundreds-father-404

03/28/2022, 6:52 PM
Hm, is it deterministic?
w

wide-zoo-86070

03/28/2022, 6:52 PM
it seems depends on the env/host/os.
h

hundreds-father-404

03/28/2022, 6:54 PM
And things fail but both if you say
2.10.0
and
2.1.0.0+gitb27a00dd
? There's no way to fix it?
w

wide-zoo-86070

03/28/2022, 6:54 PM
In OSX, it seems I have to put
pants_version = "2.10.0+gitb27a00dd"
. Otherwise, I would get that eror. while it does not always work in Unix.
h

hundreds-father-404

03/28/2022, 6:57 PM
Weird - are you using PANTS_SHA?
w

wide-zoo-86070

03/28/2022, 6:58 PM
For example, if I run it in our gpu agents for jenkins, it does not like
"2.10.0+gitb27a00dd"
. It requires ‘2.10.0’ while OSX does not like it.
h

hundreds-father-404

03/28/2022, 6:58 PM
I wonder if you're using PANTS_SHA locally, but not in CI perhaps? Hence the inconsistency
w

wide-zoo-86070

03/28/2022, 6:59 PM
I dont think so. I am not aware of PANTS_SHA 😞
h

hundreds-father-404

03/28/2022, 7:00 PM
How are you installing Pants? I'm surprised Git is being used on macOS
w

wide-zoo-86070

03/28/2022, 7:00 PM
download pants binary
then just ./pants --version
h

hundreds-father-404

03/28/2022, 7:00 PM
And that is for both CI and local macOS?
w

wide-zoo-86070

03/28/2022, 7:00 PM
yes
👍 1
What is expected? Are we expected to put git-sha together with the pants version in pants.toml?
h

hundreds-father-404

03/28/2022, 7:04 PM
It's plausible there's a bug in pants.pex -- it should be claiming the VERSION to be 2.10.0! No git included Can you please open a bug report? I can't run pants.pex on my mac because I have an M1, but I could try running on a Linux devbox or another contributor look into it
w

wide-zoo-86070

03/28/2022, 7:06 PM
ok I will open one. @curved-electrician-64177 FYI
👍 1
❤️ 1
h

hundreds-father-404

03/28/2022, 7:06 PM
To help with priorities: to clarify, is there any workaround? And to clarify, this is not flaky - it's reproducible?
w

wide-zoo-86070

03/28/2022, 7:07 PM
i guess, if we are expected to put VERSION only, then it should be easily reproduced by just downloading pants.pex then run it.
h

hundreds-father-404

03/28/2022, 7:11 PM
right, which is why I'm confused why this is only sometimes causing the build to fail
(gtg to doctor soon so can't investigate this personally yet)
🙏 1
w

wide-zoo-86070

03/29/2022, 12:12 AM
another thought, given I am using pants.pex, maybe I dont need to put pants_version in toml?
h

hundreds-father-404

03/29/2022, 2:01 PM
worth trying - I have more doctor's visits today so no promises, but I'm hoping to get to this bug today
5 Views