FYI I'm trying to get a build of `scie-pants` out,...
# development
b
FYI I'm trying to get a build of
scie-pants
out, but currently an integration test is failing
Copy code
>> Verifying the tools.pex built by the package crate matches the tools.pex built by Pants
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"65317bb3100d4574ae8a0caa2013a9e20a0686ac2392fe8901a13cfcd7765262"`,
 right: `"b79929b15ab2fe3f07b09c6af0af4abd382407c728bcec06eba1228ec53a3412"`', package/src/test.rs:288:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I can trace the failure back to https://github.com/pantsbuild/scie-pants/pull/259, however instead of reverting I want us to move forward. If I
pants package tools:tools
I get
tools/tools.pex
which has
"build_properties": {"pex_version": "2.1.134"
in
PEX-INFO
. This checks with the default
pex-clie
in 2.16.0 of
2.1.134
(docs) Then if I
cargo run -p package -- scie
I get
tools.pex
which has
"build_properties": {"pex_version": "2.1.137"}
which is surprising, since `pbt.toml`lists:
Copy code
[[lift.files]]
name = "pex"
type = "blob"
digest = { size = 4098329, fingerprint = "faad51a6a108fba9d40b2a10e82a2646fccbaf8c3d9be47818f4bffae02d94b8" }
source = { url = "<https://github.com/pantsbuild/pex/releases/download/v2.1.134/pex>", lazy = true }
In fact I get no relevant hits grepping
137
in the repo.
CC @broad-processor-92400 and @happy-kitchen-89482
Oh turns out I guess the
lazy=True
in the
pbtotml
was doing.... something? The
.134
release of Pex doesn't match the specified size or digest (which can be verified https://www.pantsbuild.org/v2.16/docs/reference-pex-cli)
w
I believe
lazy
changes when the interpreter (or whatever) is fetched (fat vs thin scies) - fetched on first run vs at build
b
Removing it certainly resulted in
2.1.134
being used
Ugh....
Copy code
josh@cephandrius:~/work/scie-pants/dist$ diff -r -u pants-built/ scie-built/
Only in pants-built/.deps/ansicolors-1.1.8-py2.py3-none-any.whl/colors: __pycache__
Only in pants-built/.deps/packaging-23.0-py3-none-any.whl/packaging: __pycache__
Only in scie-built/scie_pants: __pycache__
w
Ah wait, there was a note about this from a PR.
Related? Like, relevant to which dep gets pulled? https://github.com/a-scie/jump/pull/137#issuecomment-1708680780
h
Weird that this passed in the PR but not on main?
b
It's a cache issue
But nuking my pex cache, not using pantsd, having pants not use local cache all fail to make this work
Yeah I've elapsed my patience and time for this. If someone else wants to pick up the release they can...
Copy code
josh@cephandrius:~/work/scie-pants$ sha256sum dist/tools.pex
99dedb9ee1725c3b62d4074437ef61395da565d7fb73b2e6d40d361e57721ee2  dist/tools.pex
josh@cephandrius:~/work/scie-pants$ sha256sum dist/tools/tools.pex 
9034ccb8b328eacc7610fe26a73a67a7adb5f2f67c14b4dffd0a9daa6c0eaf9d  dist/tools/tools.pex
josh@cephandrius:~/work/scie-pants/dist$ unzip tools.pex -d scie-built && unzip tools/tools.pex -d pants-built
josh@cephandrius:~/work/scie-pants/dist$ diff -r pants-built scie-built
josh@cephandrius:~/work/scie-pants/dist$
h
I'm seeing
Bootstrapping Pants 2.15.0rc5 using cpython 3.9.16
there
b
The way to get things building propoerly on
main
would be:
Copy code
diff --git a/package/pbt.toml b/package/pbt.toml
index 6223333..a726d5d 100644
--- a/package/pbt.toml
+++ b/package/pbt.toml
@@ -20,8 +20,8 @@ version = "3.8.16"
 [[lift.files]]
 name = "pex"
 type = "blob"
-digest = { size = 4098329, fingerprint = "faad51a6a108fba9d40b2a10e82a2646fccbaf8c3d9be47818f4bffae02d94b8" }
-source = { url = "<https://github.com/pantsbuild/pex/releases/download/v2.1.137/pex>", lazy = true }
+digest = { size = 4085867, fingerprint = "82b24645769c19483c1306c1ba7a888471a5e1df3a2b538788bc7e0d1b20dbf0" }
+source = { url = "<https://github.com/pantsbuild/pex/releases/download/v2.1.134/pex>" }
 
 [[lift.commands]]
 name = "pex"
and
Copy code
diff --git a/package/src/tools_pex.rs b/package/src/tools_pex.rs
index dfd8478..8c70978 100644
--- a/package/src/tools_pex.rs
+++ b/package/src/tools_pex.rs
@@ -45,7 +45,7 @@ pub(crate) fn build_tools_pex(
     let requirements = path_as_str(&requirements_path)?;
     let test_requirements_path = tools_path.join("test-requirements.txt");
     let test_requirements = path_as_str(&test_requirements_path)?;
-    let interpreter_constraints = ["--interpreter-constraint", "CPython>=3.8,<3.10"];
+    let interpreter_constraints = ["--interpreter-constraint", "CPython>=3.9,<3.10"];
 
     if update_lock {
         build_step!("Updating the scie_jump tools lock file");
I'm gonna have the test just compare
PEX-INFO
Today is not my day...
Copy code
2.14.0a0+git8e381dbf
Fatal Python error: PyGILState_Release: thread state 0x7fd05c001060 must be current when releasing
Python runtime state: finalizing (tstate=0x55a7ffae6860)

Thread 0x00007fd095de9c00 (most recent call first):
<no Python frame>
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Command cd "/tmp/.tmpX93LSS" && PANTS_SHA="8e381dbf90cae57c5da2b223c577b36ca86cace9" "/home/josh/work/scie-pants/target/debug/build/package-de41f4f460c5403f/out/dist/scie-pants/scie-pants-linux-x86_64" "--no-verify-config" "-V" failed with exit code: None
OK I'm officially tapped out. I'll push my branch upstream for someone else to pick up
h
I'm taking a look
Am I missing something? I see
Copy code
waldorf:[~/src/scie-pants][main]$ git grep 137
package/pbt.toml:source = { url = "<https://github.com/pantsbuild/pex/releases/download/v2.1.137/pex>", lazy = true }
And that file hasn't changed in months
AFAICT it's behaving as told, we're just telling it wrong?