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

Switch from stacks to targets AKA "Stay on target" #283

Merged
merged 14 commits into from
May 15, 2024

Conversation

schneems
Copy link
Contributor

@schneems schneems commented May 10, 2024

Buildpack API 0.10 removed the concept of stacks in favor of targets heroku/libcnb.rs#773.

This commit works to upgrade applications in place by migrating metadata to support the new serialization format. This is supported by implementing TryMigrate from the magic_migrate crate https://docs.rs/magic_migrate/latest/magic_migrate/macro.try_migrate_link.html.

https://www.youtube.com/watch?v=NnP5iDKwuwk

Notably, this does NOT introduce support for heroku-24 and multiple architectures. That work will come after upgrading from stacks to targets.

Bumps the libcnb group with 3 updates in the / directory: [libcnb](https://github.com/heroku/libcnb.rs), [libherokubuildpack](https://github.com/heroku/libcnb.rs) and [libcnb-test](https://github.com/heroku/libcnb.rs).


Updates `libcnb` from 0.17.0 to 0.19.0
- [Release notes](https://github.com/heroku/libcnb.rs/releases)
- [Changelog](https://github.com/heroku/libcnb.rs/blob/main/CHANGELOG.md)
- [Commits](heroku/libcnb.rs@v0.17.0...v0.19.0)

Updates `libherokubuildpack` from 0.17.0 to 0.21.0
- [Release notes](https://github.com/heroku/libcnb.rs/releases)
- [Changelog](https://github.com/heroku/libcnb.rs/blob/main/CHANGELOG.md)
- [Commits](heroku/libcnb.rs@v0.17.0...v0.21.0)

Updates `libcnb-test` from 0.17.0 to 0.19.0
- [Release notes](https://github.com/heroku/libcnb.rs/releases)
- [Changelog](https://github.com/heroku/libcnb.rs/blob/main/CHANGELOG.md)
- [Commits](heroku/libcnb.rs@v0.17.0...v0.19.0)

---
updated-dependencies:
- dependency-name: libcnb
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: libcnb
- dependency-name: libherokubuildpack
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: libcnb
- dependency-name: libcnb-test
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: libcnb
...

Signed-off-by: dependabot[bot] <[email protected]>
@schneems schneems force-pushed the schneems/upgrade-libcnb branch from f2f6e54 to 820b1a0 Compare May 10, 2024 16:13
schneems added 2 commits May 10, 2024 12:19
The layer trait interface was changed to mutable in heroku/libcnb.rs#669
Buildpack API 0.10 removed the concept of stacks in favor of targets heroku/libcnb.rs#773.

This commit works to upgrade applications in place by migrating metadata to support the new serialization format. This is supported by implementing TryMigrate from the `magic_migrate` crate https://docs.rs/magic_migrate/latest/magic_migrate/macro.try_migrate_link.html.

https://www.youtube.com/watch?v=NnP5iDKwuwk
@schneems schneems force-pushed the schneems/upgrade-libcnb branch from 820b1a0 to 220b2eb Compare May 10, 2024 16:19
@schneems schneems marked this pull request as ready for review May 10, 2024 16:22
@schneems schneems requested a review from a team as a code owner May 10, 2024 16:22
@schneems schneems marked this pull request as draft May 10, 2024 17:22
@schneems schneems force-pushed the schneems/upgrade-libcnb branch from 5c95a12 to 79758c4 Compare May 11, 2024 16:47
@schneems schneems force-pushed the schneems/upgrade-libcnb branch from 79758c4 to 557d888 Compare May 11, 2024 16:51
@schneems schneems marked this pull request as ready for review May 11, 2024 17:09
buildpacks/ruby/buildpack.toml Outdated Show resolved Hide resolved
buildpacks/ruby/buildpack.toml Outdated Show resolved Hide resolved
buildpacks/ruby/buildpack.toml Show resolved Hide resolved
buildpacks/ruby/src/target_id.rs Show resolved Hide resolved
buildpacks/ruby/src/layers/bundle_install_layer.rs Outdated Show resolved Hide resolved
buildpacks/ruby/src/target_id.rs Outdated Show resolved Hide resolved
buildpacks/ruby/src/layers/bundle_install_layer.rs Outdated Show resolved Hide resolved
buildpacks/ruby/buildpack.toml Show resolved Hide resolved
schneems and others added 5 commits May 14, 2024 09:26
- Add explanation for when stacks can be removed
- Move "targets" closer to "stacks" as they're logically tied together.
@schneems schneems force-pushed the schneems/upgrade-libcnb branch 2 times, most recently from 610d881 to b11fbb1 Compare May 14, 2024 20:01
This buildpack does not support heroku-24 (yet) remove this stack from the TargetId struct. It also supports heroku-20 which was previously not present.
@schneems schneems force-pushed the schneems/upgrade-libcnb branch from b11fbb1 to d0c1bbd Compare May 14, 2024 20:08
@schneems schneems requested a review from edmorley May 15, 2024 18:11
@schneems schneems requested a review from runesoerensen May 15, 2024 18:11
Copy link
Member

@edmorley edmorley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

buildpacks/ruby/tests/integration_test.rs Show resolved Hide resolved
buildpacks/ruby/src/layers/bundle_install_layer.rs Outdated Show resolved Hide resolved
@schneems schneems merged commit 6966b88 into main May 15, 2024
6 checks passed
@schneems schneems deleted the schneems/upgrade-libcnb branch May 15, 2024 20:35
heroku-linguist bot added a commit to heroku/cnb-builder-images that referenced this pull request May 20, 2024
* Update heroku/buildpacks-ruby to v3.0.0

## heroku/ruby

### Changed

- The buildpack now implements Buildpack API 0.10 instead of 0.9, and so requires `lifecycle` 0.17.x or newer. ([#283](heroku/buildpacks-ruby#283))

### Added

- Added support for Ubuntu 24.04 (and thus Heroku-24 / `heroku/builder:24`). ([#284](heroku/buildpacks-ruby#284))

* Add Ruby to heroku/builder:24

---------

Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com>
Co-authored-by: Ed Morley <[email protected]>
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.

3 participants