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

Remove stale "pants.pex for integration tests" mechanism #10279

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,3 @@ files(
name = 'pyproject',
sources = ['pyproject.toml'],
)

# NB: This is used for integration tests. This is generated automatically via `./pants` and
# `build-support/bin/bootstrap_pants_pex.sh`.
files(
name = 'pants_pex',
sources = ['pants.pex'],
)
23 changes: 0 additions & 23 deletions pants
Original file line number Diff line number Diff line change
Expand Up @@ -106,27 +106,4 @@ else
export PANTS_DEV=1
fi

# Integration tests depend on an up-to-date `pants.pex`. Here, we check if we're running tests
# and ensure the `pants.pex` is generated if so. We do this here, rather than via `pants-plugins`,
# because we want the file to be generated _before_ any tests run, not during that Pants invocation,
# as the dependency is marked via BUILD files so should not be constructed at runtime.
#
# Note that we have no way to distinguish between integration tests vs unit tests here, so we
# unfortunately rebuild the pants.pex for unit tests too.
#
# We do not do this when in CI because CI downloads the PEX from AWS and we never want a worker
# shard to try bootstrapping the PEX itself.
test_goal_used=false
for arg in "$@"; do
if [[ "${arg}" == 'test' || "${arg}" == 'test.*' ]]; then
test_goal_used=true
fi
done

no_regen_pex="${NO_REGEN_PEX:-${TRAVIS}}"
if [[ "${test_goal_used}" == 'true' && "${no_regen_pex}" != 'true' ]]; then
"$HERE/build-support/bin/bootstrap_pants_pex.sh"
echo -e "Finished bootstrapping pants.pex for integration tests.\n" >&2
fi
Comment on lines -126 to -130
Copy link
Contributor

Choose a reason for hiding this comment

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

Yay!

Copy link
Contributor

Choose a reason for hiding this comment

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

Yay indeed!


exec_pants_bare "$@"
1 change: 0 additions & 1 deletion src/python/pants/testutil/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ python_library(
sources = ['pants_run_integration_test.py'],
dependencies = [
'//:build_root',
'//:pants_pex',
'3rdparty/python:ansicolors',
'3rdparty/python:dataclasses',
'src/python/pants/base:build_environment',
Expand Down