Page MenuHomePhabricator

[builds-builder] Add support for Heroku's "24" builder stack based on Ubuntu 2024.04 noble
Open, In Progress, MediumPublicFeature

Description

The Ubuntu 2024.04 noble base would allow access to newer apt packages. Heroku themselves uses a system of opt-in upgrades to transition from one stack to another. We do not currently have a mechanism for doing something similar. Making a direct move from Ubuntu 2022.04 to Ubuntu 2024.04 should probably require some mechanism for folks to test rebuilding their images while preserving the ability to run the prior image.

https://github.com/heroku/cnb-builder-images/tree/main/builder-24

Things that changed/testing (WIP):

  • Apt buildpack was replaced by deb-packages T394466: [build-service] remove legacy fagiani/apt 0.2.5 builder from `--use-latest-versions` stack
  • Procfile changed behavior, no extra arguments are passed anymore at all (can't pass custom args at runtime to procfile defined entries) - still testing to make sure
  • Golang and procfile now behave correctly (procfile can override golang defined processes)
  • Test php (+nodejs)
  • Test ruby (+nodejs)
  • Test python (+nodejs)
  • Test nodejs
  • Test static
  • Replace injected dotnet with built-in dotnet (test compatibility with existing dotnet project)
  • Test java/scala - jvm
  • Test clojure injected buildpack for compatibility
  • Poetry + requirements.txt compatibility (I think it will not allow poetry.lock + requirements.txt at the same time)
  • ...add more things...

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
bd808 renamed this task from Add support for Heroku's "24" builder stack based on Ubuntu 2024.04 noble to [builds-builder] Add support for Heroku's "24" builder stack based on Ubuntu 2024.04 noble.Nov 28 2024, 3:54 PM

I think we can add a flag like '--new-builder' or similar, for people to try (the tekton pipeline already allows customizing it, might have to be added to the api too). Then when we are happy, make it the default, and move the flag to --old-builder for people to migrate if they have not yet, and eventually deprecate, we can probably be a bit more relaxed than with the API changes and give tool maintainers a bit more time to migrate.

I think we can add a flag like '--new-builder' or similar, for people to try (the tekton pipeline already allows customizing it, might have to be added to the api too). Then when we are happy, make it the default, and move the flag to --old-builder for people to migrate if they have not yet, and eventually deprecate, we can probably be a bit more relaxed than with the API changes and give tool maintainers a bit more time to migrate.

Hmm, maybe might be better to keep those flags always there, and change their behavior, so they will have no effect most of the time, but when rolling out a new builder then they have some effect (that way if you want to always be on the latest, you can use --new-builder always, and if you want to be on the catching up side, you can use --old-builder).

dcaro changed the task status from Open to In Progress.Mar 12 2025, 3:13 PM
dcaro claimed this task.
dcaro moved this task from Next Up to In Progress on the Toolforge (Toolforge iteration 18) board.

group_203_bot_f4d95069bb2675e4ce1fff090c1c1620 opened https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-deploy/-/merge_requests/752

builds-api: bump to 0.0.187-20250423130326-2e1c3b05

Much looking forward to this change, thanks so much for doing it! Can't wait :-)

group_203_bot_f4d95069bb2675e4ce1fff090c1c1620 opened https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-deploy/-/merge_requests/775

builds-api: bump to 0.0.190-20250512093109-f2cdc829

group_203_bot_f4d95069bb2675e4ce1fff090c1c1620 updated https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-deploy/-/merge_requests/914

components-api: bump to 0.0.141-20250811094820-170ea067

@dcaro Is it possible to test this new heroku stack? I'm trying to migrate to openjdk 25, it's supposed to work with heroku-22 but it doesn't, so I'm hoping it would work with the new one.

EDIT: I tried to add --use-latest-versions but it seems to still pick heroku-22 build runner.

EDIT2: no, it uses heroku-24 but I still cannot use jdk 25, is it possible to refresh the heroku images? Here's my error:

[step-set-stack-toml] 2025-09-23T18:19:40.402757880Z Using run image: tools-harbor.wmcloud.org/toolforge/heroku-runner:24
[step-detect] 2025-09-23T18:19:43.665626150Z 3 of 6 buildpacks participating
[step-detect] 2025-09-23T18:19:43.666898836Z heroku/jvm 6.2.0
[step-detect] 2025-09-23T18:19:43.666946250Z heroku/maven 6.2.0
[step-detect] 2025-09-23T18:19:43.666960346Z heroku/procfile 4.2.1
[step-build] 2025-09-23T18:19:44.380870594Z
[step-build] 2025-09-23T18:19:44.380966600Z ## Heroku OpenJDK Buildpack
[step-build] 2025-09-23T18:19:44.380985154Z
[step-build] 2025-09-23T18:19:44.385525182Z - OpenJDK version resolution
[step-build] 2025-09-23T18:19:44.385565043Z - Using version string provided in system.properties
[step-build] 2025-09-23T18:19:44.390233334Z - Done (finished in < 0.1s)
[step-build] 2025-09-23T18:19:44.397278222Z ! ERROR: Unsupported OpenJDK version
[step-build] 2025-09-23T18:19:44.397344059Z !
[step-build] 2025-09-23T18:19:44.397363553Z ! The OpenJDK major version 25 you specified in your system.properties file is not supported.
[step-build] 2025-09-23T18:19:44.397378698Z ! Please specify a supported major version in your system.properties file.
[step-build] 2025-09-23T18:19:44.397388712Z !
[step-build] 2025-09-23T18:19:44.399329026Z ERROR: failed to build: exit status 1

EDIT3: Sorry for the noise, I created T405415 for the problem above.

I am not sure whether my comment is related to this, but my campwiz-nxt build (which used to be build using go 1.24 properly) suddenly is broken (See the logs using toolforge build logs campwiz-backend-dev-buildpacks-pipelinerun-x8c54). it is showing that heroku/go:0.1.13 is being used which only supports upto go1.21. Before the Push-and-Deploy, I used to build the backend using go1.24. I am getting the following:

[step-detect] 2026-02-06T17:56:14.471730657Z 2 of 4 buildpacks participating
[step-detect] 2026-02-06T17:56:14.471846552Z heroku/go       0.1.13
[step-detect] 2026-02-06T17:56:14.471863050Z heroku/procfile 2.0.2
[step-restore] 2026-02-06T17:56:03.647139396Z 2026/02/06 17:56:03 warning: unsuccessful cred copy: ".docker" from "/tekton/creds" to "/tekton/home": unable to open destination: open /tekton/home/.docker/config.json: permission denied
[step-build] 2026-02-06T17:56:15.253735558Z 
[step-build] 2026-02-06T17:56:15.253795469Z [Reading build configuration]
[step-build] 2026-02-06T17:56:15.261732071Z Detected Go version requirement: =1.24.1
[step-build] 2026-02-06T17:56:15.262765305Z 
[step-build] 2026-02-06T17:56:15.262802661Z [Error: Heroku Go Buildpack version resolution error]
[step-build] 2026-02-06T17:56:15.262807802Z Couldn't resolve go version for: =1.24.1
[step-build] 2026-02-06T17:56:15.264415401Z ERROR: failed to build: exit status 1