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

Error when using the new multi-arch Paketo buildpacks #40697

Open
ThomasVitale opened this issue May 12, 2024 · 5 comments
Open

Error when using the new multi-arch Paketo buildpacks #40697

ThomasVitale opened this issue May 12, 2024 · 5 comments
Assignees
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@ThomasVitale
Copy link

ThomasVitale commented May 12, 2024

The Paketo Buildpacks project is now publishing multi-arch buildpacks for Java and Java Native Image. They both works great to containerize Spring Boot applications (3.2.5, 3.3.0-M1, 3.3.0-SNAPSHOT) when using the pack CLI.

However, when using the Spring Boot plugin (Gradle or Maven), the build only works on ARM64 architectures whereas it gets stuck indefinitely when running on AMD64 architectures (at least on Linux. I hope I'll get to test this on Windows as well and update this issue with more info).

I have created a repo with two examples to demonstrate the problem: https://github.com/ThomasVitale/buildpacks-demo.

> Task :bootBuildImage
Building image 'docker.io/library/demo:latest'

 > Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-buildpackless-tiny:latest' ..................................................
 > Pulled builder image 'paketobuildpacks/builder-jammy-buildpackless-tiny@sha256:589ca95ba0d64b32b5c2e7b65768e2d22c1bbafe61f8348280e6a9064fb8185f'
 > Pulling run image 'docker.io/paketobuildpacks/run-jammy-tiny:latest' ..................................................
 > Pulled run image 'paketobuildpacks/run-jammy-tiny@sha256:c6c34fd722defe44d4630061eec4d8fa8188508508016b7682388adb68a57b42'
 > Pulling buildpack image 'gcr.io/paketo-buildpacks/java:latest' ..................................................
 > Pulled buildpack image 'paketobuildpacks/java@sha256:33b879227101ce429cf6f156178abdb30920ffa9b14435dc1c460b9dcb8121e0'

The task gets stuck after pulling the buildpack image. It will only stop when forcefully shut down (on GitHub Actions that happens after 6 hours by default).

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 12, 2024
@mhalbritter
Copy link
Contributor

mhalbritter commented May 13, 2024

It works on my machine, though. Both projects work fine with g bootBuildImage.

Env:

> docker version
Client: Docker Engine - Community
 Version:           26.1.2
 API version:       1.45
 Go version:        go1.21.10
 Git commit:        211e74b
 Built:             Wed May  8 14:01:38 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.1.2
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.10
  Git commit:       ef1912d
  Built:            Wed May  8 13:59:55 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.31
  GitCommit:        e377cd56a71523140ca6ae87e30244719194a521
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

> uname -a
Linux workstation 6.8.9-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May  2 18:44:19 UTC 2024 x86_64 GNU/Linux

log.txt

@ThomasVitale
Copy link
Author

ThomasVitale commented May 13, 2024

Thanks @mhalbritter for the feedback. I've done some more testing. I have tried the following scenarios and they all worked fine, based on Docker Desktop 4.30.0 (Docker Engine 26.1.1).

  • macOS (ARM64)
  • Windows 10 (AMD64)
  • Ubuntu 22.04 on WSL2/Windows 10 (AMD64)

I get the error in the following scenarios. I wonder if it's something related to the older Docker version or something specific to the VM images used by GitHub.

@mhalbritter
Copy link
Contributor

Thanks for the feedback. The failures on CI are reproducible, and not some flaky internet connection, right?

@wilkinsona wilkinsona changed the title [Buildpacks] Error when using the new multi-arch Paketo buildpacks Error when using the new multi-arch Paketo buildpacks May 13, 2024
@ThomasVitale
Copy link
Author

@mhalbritter yes, the failure on GitHub Actions (Ubuntu 22.04) and GitHub Codespaces (Ubuntu 20.04) is reproducible and happens consistently.

@ThomasVitale
Copy link
Author

I also tried the build on newer GitHub runners (Ubuntu 24.04, Docker 26.1.0) and the outcome is the same: the build hangs indefinitely. Example: https://github.com/ThomasVitale/supply-chain-security-java/actions/runs/9059907830/job/25092379764

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

4 participants