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

Remove heroku/procfile from heroku/nodejs #696

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Oct 24, 2023

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.

See also:
heroku/buildpacks-jvm#608

GUS-W-14356138.

@edmorley edmorley self-assigned this Oct 24, 2023
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.
@edmorley edmorley marked this pull request as ready for review October 24, 2023 15:09
@edmorley edmorley requested a review from a team as a code owner October 24, 2023 15:09
@edmorley edmorley enabled auto-merge (squash) October 24, 2023 15:09
@edmorley edmorley merged commit 984b958 into main Oct 24, 2023
21 checks passed
@edmorley edmorley deleted the edmorley/rm-procfile branch October 24, 2023 15:21
colincasey added a commit that referenced this pull request Oct 24, 2023
* main:
  Update Inventory for heroku/nodejs-yarn (#691)
  Remove `heroku/procfile` from `heroku/nodejs` (#696)
@heroku-linguist heroku-linguist bot mentioned this pull request Oct 24, 2023
heroku-linguist bot added a commit that referenced this pull request Oct 24, 2023
* Prepare release v2.0.0

## heroku/nodejs

### Added

- Added `heroku/nodejs-npm-engine` to the buildpack group for npm support ([#623](#623))
- Added `heroku/nodejs-npm-install` to the buildpack group for npm support ([#625](#625))
- Added `heroku/nodejs-corepack` to the buildpack group for npm support ([#685](#685))

### Changed

- Updated buildpack display name, description and keywords. ([#692](#692))
- Updated `heroku/nodejs-corepack` to `2.0.0`.
- Updated `heroku/nodejs-engine` to `2.0.0`.
- Updated `heroku/nodejs-npm-engine` to `2.0.0`.
- Updated `heroku/nodejs-npm-install` to `2.0.0`.
- Updated `heroku/nodejs-pnpm-install` to `2.0.0`.
- Updated `heroku/nodejs-yarn` to `2.0.0`.

### Removed

- Removed the deprecated `heroku/nodejs-npm` from the buildpack group for npm support ([#625](#625))
- 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](#696))

## heroku/nodejs-corepack

### Added

- Added support for using corepack to install npm. ([#685](#685))

### Changed

- Updated buildpack description and keywords. ([#692](#692))
- Switched from supporting explicitly named stacks to supporting the wildcard stack. ([#693](#693))

## heroku/nodejs-engine

### Added

- Added Node.js version 21.0.0.

### Changed

- Updated buildpack description and keywords. ([#692](#692))

### Removed

- Dropped support for the end of life `io.buildpacks.stacks.bionic` stack. ([#693](#693))

## heroku/nodejs-function

### Added

- Added `heroku/nodejs-npm-engine` ([#686](#686))
- Added `heroku/nodejs-npm-install` ([#686](#686))

### Removed

- Removed `heroku/nodejs-npm` ([#686](#686))

### Changed

- Updated buildpack display name and description. ([#692](#692))
- Updated `heroku/nodejs-engine` to `2.0.0`.
- Updated `heroku/nodejs-function-invoker` to `2.0.0`.
- Updated `heroku/nodejs-npm-engine` to `2.0.0`.
- Updated `heroku/nodejs-npm-install` to `2.0.0`.

## heroku/nodejs-function-invoker

### Changed

- Updated buildpack display name, description and keywords. ([#692](#692))

## heroku/nodejs-npm

### Changed

- Updated buildpack display name, description and keywords. ([#692](#692))

### Removed

- Removed redundant explicitly named supported stacks. ([#693](#693))

## heroku/nodejs-npm-engine

### Added

- Initial release

## heroku/nodejs-npm-install

### Added

- Initial release

## heroku/nodejs-pnpm-install

### Changed

- Updated buildpack description and keywords. ([#692](#692))

### Removed

- Removed redundant explicitly named supported stacks. ([#693](#693))

## heroku/nodejs-yarn

### Changed

- Updated buildpack description and keywords. ([#692](#692))

### Removed

- Removed redundant explicitly named supported stacks. ([#693](#693))

* Replace non-breaking spaces with normal spaces

Yey copy-paste from GitHub PR diffs.

---------

Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
heroku-linguist bot added a commit to heroku/cnb-builder-images that referenced this pull request Oct 25, 2023
* Update heroku/buildpacks-nodejs to v2.0.0

## heroku/nodejs

### Added

- Added `heroku/nodejs-npm-engine` to the buildpack group for npm support ([#623](heroku/buildpacks-nodejs#623))
- Added `heroku/nodejs-npm-install` to the buildpack group for npm support ([#625](heroku/buildpacks-nodejs#625))
- Added `heroku/nodejs-corepack` to the buildpack group for npm support ([#685](heroku/buildpacks-nodejs#685))

### Changed

- Updated buildpack display name, description and keywords. ([#692](heroku/buildpacks-nodejs#692))
- Updated `heroku/nodejs-corepack` to `2.0.0`.
- Updated `heroku/nodejs-engine` to `2.0.0`.
- Updated `heroku/nodejs-npm-engine` to `2.0.0`.
- Updated `heroku/nodejs-npm-install` to `2.0.0`.
- Updated `heroku/nodejs-pnpm-install` to `2.0.0`.
- Updated `heroku/nodejs-yarn` to `2.0.0`.

### Removed

- Removed the deprecated `heroku/nodejs-npm` from the buildpack group for npm support ([#625](heroku/buildpacks-nodejs#625))
- 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](heroku/buildpacks-nodejs#696))

## heroku/nodejs-corepack

### Added

- Added support for using corepack to install npm. ([#685](heroku/buildpacks-nodejs#685))

### Changed

- Updated buildpack description and keywords. ([#692](heroku/buildpacks-nodejs#692))
- Switched from supporting explicitly named stacks to supporting the wildcard stack. ([#693](heroku/buildpacks-nodejs#693))

## heroku/nodejs-engine

### Added

- Added Node.js version 21.0.0.

### Changed

- Updated buildpack description and keywords. ([#692](heroku/buildpacks-nodejs#692))

### Removed

- Dropped support for the end of life `io.buildpacks.stacks.bionic` stack. ([#693](heroku/buildpacks-nodejs#693))

## heroku/nodejs-function

### Added

- Added `heroku/nodejs-npm-engine` ([#686](heroku/buildpacks-nodejs#686))
- Added `heroku/nodejs-npm-install` ([#686](heroku/buildpacks-nodejs#686))

### Removed

- Removed `heroku/nodejs-npm` ([#686](heroku/buildpacks-nodejs#686))

### Changed

- Updated buildpack display name and description. ([#692](heroku/buildpacks-nodejs#692))
- Updated `heroku/nodejs-engine` to `2.0.0`.
- Updated `heroku/nodejs-function-invoker` to `2.0.0`.
- Updated `heroku/nodejs-npm-engine` to `2.0.0`.
- Updated `heroku/nodejs-npm-install` to `2.0.0`.

## heroku/nodejs-function-invoker

### Changed

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

## heroku/nodejs-npm

### Changed

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

### Removed

- Removed redundant explicitly named supported stacks. ([#693](heroku/buildpacks-nodejs#693))

## heroku/nodejs-npm-engine

### Added

- Initial release

## heroku/nodejs-npm-install

### Added

- Initial release

## heroku/nodejs-pnpm-install

### Changed

- Updated buildpack description and keywords. ([#692](heroku/buildpacks-nodejs#692))

### Removed

- Removed redundant explicitly named supported stacks. ([#693](heroku/buildpacks-nodejs#693))

## heroku/nodejs-yarn

### Changed

- Updated buildpack description and keywords. ([#692](heroku/buildpacks-nodejs#692))

### Removed

- Removed redundant explicitly named supported stacks. ([#693](heroku/buildpacks-nodejs#693))

* Add `heroku/procfile` to the `heroku/nodejs` order groups

Since the Procfile CNB is no longer included in the `heroku/nodejs` as of:
heroku/buildpacks-nodejs#696

---------

Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
edmorley added a commit to heroku/libcnb.rs that referenced this pull request Nov 2, 2023
The `heroku/builder:22` builder image will now only ever contain one
version of the `heroku/procfile` CNB, after:
heroku/buildpacks-jvm#608
heroku/buildpacks-nodejs#696

As such, we no longer need to use a manual Docker Hub URL to avoid the
"multiple versions of this buildpack exist in the builder image" error,
and instead can use the Procfile CNB directly from the builder image.

This does mean the version is now unpinned, however, it's unlikely to
cause test failures in practice, and at least we'll be testing the
version of procfile actually used in the builder image (for things like
the container starting tests).
edmorley added a commit to heroku/buildpacks-php that referenced this pull request Mar 13, 2024
The Procfile CNB has just moved Docker Hub repo.

Instead of just updating the repo URL used in the tests, I've switched
the tests to use the Procfile CNB from the builder image instead.

This is now safe to do, since there is now only ever one Procfile version
in the builder after:
heroku/buildpacks-jvm#608
heroku/buildpacks-nodejs#696

Using the Procfile version from the builder has a few advantages:
- Greater parity with what will be used in production
- Less churn from us needing to bump the versions here
- Faster, since saves having to pull a new image from Docker Hub

There is the chance of breakage, should the upstream Procfile CNB
make a breaking change, however, that should be very rare and
will only affect tests, so it seems worth the tradeoff.

GUS-W-14356096.
edmorley added a commit to heroku/buildpacks-jvm that referenced this pull request Mar 13, 2024
The Procfile CNB has just moved Docker Hub repo.

Instead of just updating the repo URL used in the tests, I've switched
the tests to use the Procfile CNB from the builder image instead.

This is now safe to do, since there is now only ever one Procfile version
in the builder after:
#608
heroku/buildpacks-nodejs#696

Using the Procfile version from the builder has a few advantages:
- Greater parity with what will be used in production
- Less churn from us needing to bump the versions here
- Faster, since saves having to pull a new image from Docker Hub

There is the chance of breakage, should the upstream Procfile CNB
make a breaking change, however, that should be very rare and
will only affect tests, so it seems worth the tradeoff.

GUS-W-14356096.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants