• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 37855
0%
main: 80%

Build:
Build:
LAST BUILD BRANCH: pex-2.76.1
DEFAULT BRANCH: main
Ran 10 Mar 2021 05:41PM UTC
Jobs 1
Files 436
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
37855

push

travis-ci-com

web-flow
Warn when depending on `files` targets in a `pex_binary` or `python_awslambda` (#11659)

One of our most common reported gotchas is confusion why `files` targets are not showing up with `pex_binary`. https://github.com/pantsbuild/pants/pull/11551 attempted to fix this by simply including the files, but it turned out much more complex than I expected, including:

1) Requiring the user to set the binary to `unzip` or `venv` mode (not the default), and
2) Using `__file__` to anchor the relpath, which behaves differently between `./pants package` and `./pants run`.

While we may still want to allow including `files` if we can address the above, this improves the status quo. It corresponds with new docs warnings:

* https://www.pantsbuild.org/v2.0/docs/resources#files
* https://www.pantsbuild.org/v2.0/docs/python-package-goal#creating-a-pex-file-from-a-pex_binary-target
* https://www.pantsbuild.org/v2.0/docs/awslambda-python#step-2-define-a-python_awslambda-target

Example warning:

> The pex_binary target src/py/project transitively depends on the below files targets, but Pants will not include them in the PEX. Filesystem APIs like `open()` are not able to load files within the binary itself; instead, they read from the current working directory.
>
> Instead, use `resources` targets or wrap this `pex_binary` in an `archive`. See https://www.pantsbuild.org/v2.4/docs/resources.
>
> Files targets dependencies: ['assets/f.txt:files', 'assets:relocated']

[ci skip-rust]

99 of 99 new or added lines in 6 files covered. (100.0%)

0 of 29638 relevant lines covered (0.0%)

0.0 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
100.0
src/python/pants/engine/target.py
11
100.0
src/python/pants/backend/awslambda/python/rules.py
12
100.0
src/python/pants/backend/python/goals/package_pex_binary.py
17
100.0
src/python/pants/backend/awslambda/python/rules_test.py
24
100.0
src/python/pants/engine/target_test.py
33
100.0
src/python/pants/backend/python/goals/package_pex_binary_integration_test.py

Uncovered Existing Lines

Lines Coverage ∆ File
2
100.0
src/python/pants/backend/awslambda/python/rules.py
Jobs
ID Job ID Ran Files Coverage
4 37855.4 (PANTS_CONFIG_FILES="${TRAVIS_BUILD_DIR}/pants.ci.toml" PANTS_DYNAMIC_UI=false LC_ALL="en_US.UTF-8" AWS_BUCKET=ci-public.pantsbuild.org BOOTSTRAPPED_PEX_KEY_PREFIX=daily/${TRAVIS_BUILD_NUMBER}/${TRAVIS_BUILD_ID}/pants.pex NATIVE_ENGINE_SO_KEY_PREFIX=monthly/native_engine_so MACOS_PYENV_PY27_VERSION=2.7.18 MACOS_PYENV_PY37_VERSION=3.7.7 MACOS_PYENV_PY38_VERSION=3.8.3 PYENV_ROOT_OSX=${HOME}/.pants_pyenv PYENV_ROOT="${PYENV_ROOT:-${PYENV_ROOT_OSX}}" PATH="${PYENV_ROOT}/shims:${PATH}" AWS_CLI_ROOT="${HOME}/.aws_cli" AWS_ACCESS_KEY_ID__TO_BE_REEXPORTED_ON_DEPLOYS=AKIAV6A6G7RQ2HFZ5KP7 AWS_SECRET_ACCESS_KEY=[secure] RUST_BACKTRACE="all" BOOTSTRAPPED_PEX_KEY_SUFFIX=py37.linux CACHE_NAME=python_tests.py37) 10 Mar 2021 05:41PM UTC 0
0.0
Travis Job 37855.4
Source Files on build 37855
  • Tree
  • List 436
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Build #37855
  • 77b99ee3 on github
  • Prev Build on master (#37853)
  • Next Build on master (#37862)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc