-
Notifications
You must be signed in to change notification settings - Fork 484
Java Buildpack 2.1 #352
Java Buildpack 2.1 #352
Conversation
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: http://www.pivotaltracker.com/story/show/69522964. This repo is managed by the 'Runtime' team. |
/cc @rmorgan |
@nebhale can I get some context for this change? Is the main benefit removing all the tests and such from the buildpack package? Or are there other reasons to copy all the files into cf-release instead of just linking the submodule? |
@youngm with the advent of packaged builds, I'd like the official sanctioned release package to be used. That package has an artifact in it ( This is an enhancement of the previous version information displayed at staging: -----> Java Buildpack Version: v2.1 | https://github.com/cloudfoundry/java-buildpack.git#ded1e56 This information cannot be determined when the package is used since it's not based on a git repository which is why we package it internally. We also can't check the same information in (chicken and egg problem determining the hash). |
@youngm For any Cloud Foundry installation with a custom buildpack, I'd expect that they'd be packaging up their own buildpacks and using |
@nebhale I see. If you produced a distribution package as part of a bosh pre_package script could you get the same result? Sure it wouldn't be a copy of the exact bits but it should be the same given the same git revision right? As a forker of the buildpack and cf-release I think we actually prefer to link our buildpack updates with cf-release updates. Only using |
@youngm I'd be very skeptical of building that package with the same identifiers from source. That puts us in the position where something is labeled as If you've already forked the buildpack, then I'm guessing you've replaced the submodule reference in a fork of |
@MarkKropf, what do you think? |
Thanks @nebhale it is good to know that continuing as a submodule will still be a supported option. I guess we'll have to see for ourselves if the benefits of copying a package in will be worth the efforts. It would be nice to have the best of both options and be in line with how origin works. Thanks, |
I have some concerns about vendoring the built asset - we've experimented with that kind of thing with both UAA and loggregator and eventually moved away from it in both cases. It seems like prepackaging could easily give you the version tag or current git hash it what you're deploying isn't tagged with a version. |
A variant of the approach in this PR might be to publish the packaged build to a tag and have the submodule in cf-release point at this tag. We think this approach solves the chicken and egg problem of determining the hash without vendoring the packaged build. We also think this preserves the reproducibility of a vendored packaged build and might even improve this by being able to trace the submodule/packaged-build sha back to its source sha. – Eric (@ematpl) and Abhi |
@ematpl @MarkKropf Today and Monday are public holidays in the UK so I'm not sure if @nebhale is going to have a chance to respond, I've sent him a note to see if he can look at this today. |
@mkocher Perhaps I'm approaching this incorrectly by specifying a solution with the PR. To phrase this more properly as a requirement, what should we be doing to ensure that the version of the buildpack in the release is identical to the one that we package? |
@nebhale The suggestion @ematpl and I made earlier might be one way to do this that avoids pre-packaging. Do you think this might work? @mkocher Thoughts? |
@hiremaga I'm not a fan of checking binaries into source control. It's a sure way to balloon a repository's size, especially in Git where every clone downloads the entire repository. You wouldn't check in your dependency Gems (or Maven JARs) and I wouldn't expect to check in our binaries either. |
Starting with the 2.1 release of the Java Buildpack, packaged versions of the buildpack should not be linked via submodule. Instead, a packaged version of the buildpack, (complete with version baked into the code) should be used. To facilitate both Cloud Foundry open source and PivotalCF, there are two different versions of the buildpack. The first, online buildpack, should be used in environments that have Internet access (e.g. https://run.pivotal.io). The second, offline buildpack, should be used in environments that do not have Internet access (e.g. PivotalCF). This change removes the existing Java Buildpack submodule and replaces it with a reference to the packaged buildpack in the blobstore. This packaging style was based on the gloang packaging that already existed.
Starting with the 2.1 release of the Java Buildpack, packaged versions of the buildpack should not be linked via submodule. Instead, a packaged version of the buildpack, (complete with version baked into the code) should be used.
This change removes the existing Java Buildpack submodule and replaces it with an exploded packaged version. In addition, the
buildpack_java
package was updated to cope with the lack of a git directory (the git hash of the package is baked into the version). Finally, the packagespec
was updated so that it includes all files since the packaged buildpack is already as minimal as it can be.