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

Add support for alternate packages in the pex that is built #5283

Merged
merged 1 commit into from Jan 17, 2018

Conversation

Projects
None yet
3 participants
@stuhood
Copy link
Member

stuhood commented Jan 6, 2018

Problem

Currently the package(s) included in built pexes are hardcoded, which does not support a deployment model where relevant plugins are embedded in the deployed pex.

Solution

Add support for overriding the included packages.

Result

The following command would build a pex with an embedded copy of pantsbuild.pants.contrib.go:

PANTS_PEX_PACKAGES="pantsbuild.pants pantsbuild.pants.contrib.go" build-support/bin/release.sh -p

@stuhood stuhood requested review from jsirois and kwlzn Jan 6, 2018

@jsirois

jsirois approved these changes Jan 6, 2018

@jsirois

This comment has been minimized.

Copy link
Member

jsirois commented Jan 6, 2018

Late realization: the mechanics here look good, but I don't understand the purpose. Since the release script is none too repurposeable (maybe I have that wrong), it seems like we should just hard code which plugins (all?) we include in the pex. What's the driving use-case here?

@kwlzn

kwlzn approved these changes Jan 6, 2018

Copy link
Member

kwlzn left a comment

lgtm

@stuhood

This comment has been minimized.

Copy link
Member

stuhood commented Jan 9, 2018

Late realization: the mechanics here look good, but I don't understand the purpose.

As it stands, this pathway through the script has no consumers, since we're not yet building pexes in travis. I'll do a bit more design today to decide how we would want to advertise pexes to users, and then possibly land this as is or adjust it to include all plugins by default.

@stuhood

This comment has been minimized.

Copy link
Member

stuhood commented Jan 17, 2018

I'm going to defer the decision of whether to do this by default until we're actually making the decision to publish them as part of the release process. Will include the option for now.

@stuhood stuhood merged commit 26f4fba into pantsbuild:master Jan 17, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@stuhood stuhood deleted the twitter:stuhood/support-for-alternate-packages-in-built-pex branch Jan 17, 2018

@stuhood stuhood added this to the 1.4.x milestone Jan 17, 2018

stuhood added a commit that referenced this pull request Jan 18, 2018

Add support for alternate packages in the pex that is built. (#5283)
### Problem

Currently the package(s) included in built pexes are hardcoded, which does not support a deployment model where relevant plugins are embedded in the deployed pex.

### Solution

Add support for overriding the included packages.

### Result

The following command would build a pex with an embedded copy of `pantsbuild.pants.contrib.go`:
```
PANTS_PEX_PACKAGES="pantsbuild.pants pantsbuild.pants.contrib.go" build-support/bin/release.sh -p
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment