Skip to content

Commit

Permalink
Remove heroku/procfile from heroku/nodejs (#696)
Browse files Browse the repository at this point in the history
Previously the `heroku/procfile` buildpack was included within the
`heroku/nodejs` composite buildpack.

Whilst this is convenient (it saves having to add the Procfile CNB manually),
this approach has a number of issues:
- If an app uses multiple languages (eg `heroku/nodejs` and `heroku/java`),
  the Procfile CNB will end up being run multiple times, and potentially
  with different versions of the Procfile buildpack.
- It means multiple places need updating after Procfile CNB releases,
  and means the builder image can end up containing several
  different versions of the Procfile buildpack.

After this change, the `heroku/procfile` CNB is no longer included in the
`heroku/nodejs` composite buildpack, and instead will be included in the
Heroku builder image order grouping (added in the PR that releases this
change into the builder).

This matches the approach already used by the Go, Python, PHP and
Ruby buildpacks (and shortly, the Java + Scala buildpacks).

Any app that sets a custom buildpack order in their `project.toml` (rather
than relying on the default buildpack order in the Heroku builder image),
or uses a non-Heroku builder (that does not similarly choose to add the
Procfile to the builder) will need to explicitly add the `heroku/procfile`
buildpack to the end of the buildpacks list in their `project.toml`.

Since this is a breaking change, the buildpack major version number
should be bumped for release.

GUS-W-14356138.
  • Loading branch information
edmorley authored Oct 24, 2023
1 parent c05cb38 commit 984b958
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
4 changes: 4 additions & 0 deletions meta-buildpacks/nodejs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Updated buildpack display name, description and keywords. ([#692](https://github.com/heroku/buildpacks-nodejs/pull/692))

### Removed

- Removed `heroku/procfile`, since it's being added directly to the Heroku builder images instead. If you override the Heroku builder images' default buildpack detection order (or use this buildpack with a non-Heroku builder image), you will need to append `heroku/procfile` to your buildpacks list. ([#696](https://github.com/heroku/buildpacks-node/pull/696))

## [1.1.7] - 2023-10-17

### Changed
Expand Down
15 changes: 0 additions & 15 deletions meta-buildpacks/nodejs/buildpack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ version = "1.1.7"
id = "heroku/nodejs-pnpm-install"
version = "1.1.7"

[[order.group]]
id = "heroku/procfile"
version = "2.0.1"
optional = true

[[order]]

[[order.group]]
Expand All @@ -45,11 +40,6 @@ optional = true
id = "heroku/nodejs-yarn"
version = "1.1.7"

[[order.group]]
id = "heroku/procfile"
version = "2.0.1"
optional = true

[[order]]

[[order.group]]
Expand All @@ -70,10 +60,5 @@ optional = true
id = "heroku/nodejs-npm-install"
version = "1.1.7"

[[order.group]]
id = "heroku/procfile"
version = "2.0.1"
optional = true

[metadata.release]
image = { repository = "docker.io/heroku/buildpack-nodejs" }
3 changes: 0 additions & 3 deletions meta-buildpacks/nodejs/package.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ uri = "libcnb:heroku/nodejs-yarn"

[[dependencies]]
uri = "libcnb:heroku/nodejs-corepack"

[[dependencies]]
uri = "docker://docker.io/heroku/procfile-cnb@sha256:ea7219d4bb50196b4f292c9aae397b17255c59a243d7408535d2a03a5cd2b040"

0 comments on commit 984b958

Please sign in to comment.