Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pex: upgrade to v2.32.0 #21877

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

tdyas
Copy link
Contributor

@tdyas tdyas commented Jan 27, 2025

Upgrade to Pex v.2.32.0 from v2.29.0.

@tdyas tdyas added the category:internal CI, fixes for not-yet-released features, etc. label Jan 27, 2025
@tdyas tdyas requested review from cburroughs and huonw January 27, 2025 17:44
@tdyas tdyas changed the title pex: upgrade to v2.23.0 pex: upgrade to v2.32.0 Jan 27, 2025
@@ -130,7 +130,6 @@ def test_pex_execution(
sources=sources,
)

assert "pex" not in pex_data.files
Copy link
Contributor Author

@tdyas tdyas Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this check to get this test to pass because there is now a pex file included in the pex_data.files for this.

Failure in GHA:

Only the internal_only == True tests failed for test_pex_execution, specifically:

  • src/python/pants/backend/python/util_rules/pex_test.py::test_pex_execution[True-Pex]
  • src/python/pants/backend/python/util_rules/pex_test.py::test_pex_execution[True-VenvPex]

@jsirois: Before I start delving into Pex changes, are you aware of any changes between v2.29 and v2.32 which would add the pex file to the pex_data when using a venv pex?

Relevant PexData is:

PexData(pex=VenvPex(digest=Digest('f7fd9ec9cdbd1165f1f246b4cd0ed0cb08da11df6a70ce23f8eeaa85203d019e', 284), append_only_caches=FrozenDict({}), pex_filename='test.pex', pex=Script(path=PurePosixPath('test.pex_pex_shim.sh')), python=Script(path=PurePosixPath('test.pex_bin_python_shim.sh')), bin=FrozenDict({}), venv_rel_dir='venvs/1/8c7e6816119a1f801a5f9f0c566f7661cb5619ab/2f401880ce8ed59ec909f9e5481e61fbf6cd2978'), is_zipapp=False, sandbox_path=PurePosixPath('test.pex'), local_path=PurePosixPath('/private/tmp/_BUILD_ROOT8fx573rr/test.pex'), info={'bootstrap_hash': '475e35042156072187c0e895ee87c1c627601d02', 'build_properties': {'pex_version': '2.32.0'}, 'code_hash': 'e926df35e64ccb7a59e00efe26726609d2826482', 'deps_are_wheel_files': True, 'distributions': {}, 'emit_warnings': False, 'entry_point': 'main', 'excluded': [], 'ignore_errors': False, 'includes_tools': True, 'inherit_path': 'false', 'inject_args': [], 'inject_env': {}, 'inject_python_args': [], 'interpreter_constraints': [], 'max_install_jobs': 1, 'overridden': [], 'pex_hash': '8c7e6816119a1f801a5f9f0c566f7661cb5619ab', 'pex_path': '', 'pex_paths': [], 'requirements': [], 'strip_pex_env': True, 'venv': True, 'venv_bin_path': 'prepend', 'venv_copies': False, 'venv_hermetic_scripts': True, 'venv_site_packages_copies': True, 'venv_system_site_packages': False}, files=('subdir', '__pex__', 'pex', '.bootstrap', 'PEX-INFO', 'main.py', '__main__.py', 'subdir/sub.py', '__pex__/__init__.py'))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the release notes and nothing stands out.

Copy link
Contributor Author

@tdyas tdyas Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the inclusion of pex is intentional: Relevant discussion seems to be pex-tool/pex#2645 (comment) where pex is now a symlink.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is intentional. This is largely for Pants own benefit - it should be able to kill VenvPex et. al.

Copy link
Contributor Author

@tdyas tdyas Jan 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Should Pants change in any way to better take advantage of the recent changes in Pex?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I think its all detailed well already by @huonw in the Pants issue linked to the Pex PR you already found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:internal CI, fixes for not-yet-released features, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants