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

Can't build twice #61

Closed
mamachanko opened this issue Jun 6, 2021 · 3 comments · Fixed by #60
Closed

Can't build twice #61

mamachanko opened this issue Jun 6, 2021 · 3 comments · Fixed by #60
Labels
type:bug A general bug

Comments

@mamachanko
Copy link

What happened?

I am exploring buildpacks. I wanted to build my image again, but the second build breaks.

$ curl -G https://start.spring.io/starter.zip\?type=gradle-project -d dependencies=web -d javaVersion=11 -o demo.zip
$ unzip demo.zip -d .
$ pack config default-builder paketobuildpacks/builder:base # according to https://paketo.io/docs/buildpacks/language-family-buildpacks/java/#about-the-examples
$ pack build demo --path $PWD. # this one works as expected
$ pack build demo --path $PWD
# ...
Paketo Maven Buildpack 5.3.0
  unable to create application layer
  failed to generate expected metadata
  unable to determine java version
  error executing 'javac -version':
   Combined Output: :
  unable to start PTY
  exec: "javac": executable file not found in $PATH
ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 145

Forgive me. I have just begun to use buildpacks. I assume that the build is run in complete isolation. The fact that I am using sdkman to install and select the Java version on the host should not get in the way of buildpacks, should it? The first build works as advertised though. 🤔

$ pack version
0.19.0+git-360dbae.build-2550
@dmikusa
Copy link
Contributor

dmikusa commented Jun 7, 2021

Thanks for this report & apologize for the issue. We recently upgraded to using the lifecycle API 0.6 and I think this is related. There's a change, buildpacks/lifecycle#537, which impacts the layer reuse. I was under the impression this would be handled in libcnb, which is upgraded to support the 0.6 API, but it looks like we need a change to libpak as well.

I have the change staged and initial testing is looking good. It has corrected the problem.

It'll take a little time for all the CI to run & cut new releases, but should be able to have it out in the next 24-48 hours. I'll post back when it's all available.

@dmikusa
Copy link
Contributor

dmikusa commented Jun 8, 2021

FYI, I have cut release 5.9.1 of the Java buildpack which has a fix for this: https://github.com/paketo-buildpacks/java/releases/tag/v5.9.1. It should get picked up by the builders shortly, probably over the next 8-12 hours.

@dmikusa
Copy link
Contributor

dmikusa commented Jun 9, 2021

The fix for this has been picked up in the builders. If you're on the latest builder at the time of writing, 0.1.115-base, you should have the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A general bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants