OK. Any suggestions on where my rule is failing? M...
# plugins
p
OK. Any suggestions on where my rule is failing? Maybe something to do with environments that I didn't plumb? Or is pex trying to use the wrong interpreter for some reason (and why would that have changed between 2.16.0a0 and 2.16.0a1)? Here's the test error: https://github.com/StackStorm/st2/actions/runs/4577090796/jobs/8082076631?pr=5950#step:7:229 Here's the test: https://github.com/StackStorm/st2/blob/master/pants-plugins/uses_services/platform_rules_test.py Here's the rule under test: https://github.com/StackStorm/st2/blob/master/pants-plugins/uses_services/platform_rules.py Here's the script that rule runs via `VenvPex`: https://github.com/StackStorm/st2/blob/master/pants-plugins/uses_services/scripts/inspect_platform.py
1
b
p
The only way that would be invalid syntax is if it is trying to use a python2 interpreter
b
That was the issue that sparked the PR. PEX choosing 2.7 🙂
p
sorry did you mean to link back to my GHA logs? or something else?
This is the relevant bit of the logs
Copy code
E         File "/tmp/pants-sandbox-yKexC5/.cache/pex_root/venvs/bbd16d7f110473a5a1fb4d5f57d0d53fcfdca204/d17f107617a7c22c1510ce981ad56ef6420683d2/pex", line 258, in <module>
224
E           ast = compile(content, filename, "exec", flags=0, dont_inherit=1)
225
E         File "./inspect_platform.py", line 23
226
E           arch: str
227
E               ^
228
E       SyntaxError: invalid syntax
229
b
Yeah I'm feeling more likely it's the linked issue.
p
you didn't link to an issue - got a link?
b
Oh wow my link was not what I thought it was lol
p
oh. Ok. That sounds like my issue.
Has it been cherry-picked to 2.16 yet?
Would you like me to cherry-pick it?
b
Be my guest!
Sounds like John is going to do it 🙏
p
I cherry-picked - he just approved. 🙂
@bitter-ability-32190 that PexPEX fix (landed in 2.16.0rc0) resolved my issue. Thanks!
🙌 1