Skip to content

Generalize implementation workflows for multi-buildpack repositories - #1451

Merged
dmikusa merged 7 commits into
mainfrom
add-multi-implementation
Nov 11, 2026
Merged

dmikusa merged 7 commits into
mainfrom
add-multi-implementation

Conversation

@dmikusa

@dmikusa dmikusa commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

A few implementation repos (jvm-vendors, build-tools) package a combined buildpack plus one buildpack per component. A separate workflow set would duplicate most of implementation and drift from it.

What changed

Multi-buildpack support is now opt-in in the standard implementation set. A repo adds a multi-implementation.json at its root describing the combined buildpack, components, images, and the libpak-tools command. Without that file, behavior is unchanged.

  • create-draft-release has two gated paths: the existing single-buildpack release job, and a separate multi path (release-prep -> generate-notes -> release-multi). The single path is unchanged apart from the gate and needs.
  • scripts/.util/implementation.sh loads the config into one normalized shape, synthesizing single-buildpack defaults in memory when the file is absent.
  • package.sh uses libpak-tools when the config exists, otherwise the existing jam/pack path.
  • push-buildpackage runs once per configured buildpack; a single repo is a one-item matrix.
  • The has-warnings check is now shared in update-dependencies-from-metadata.

Verification

  • scripts/sanity.sh, yamllint, shellcheck, and zizmor pass; actionlint reports no workflow-expression errors.
  • The existing single-buildpack release job body is identical to main.
  • Exercised config normalization and release asset naming for both layouts.

Follow-ups: switch jvm-vendors and build-tools to the implementation set and drop their local multi workflow copies.

Note

This PR was written by opencode and reviewed by a human.

Add a multi-implementation set for repositories that package a combined
buildpack plus one buildpack per component. Repositories provide a
multi-implementation.json at the root describing the combined buildpack, the
components, image names, and the libpak-tools command.

The create-draft-release, push-buildpackage and update-dependencies workflows
derive their matrices and artifact names from that file. The update-dependencies
workflow also gains the warning check that jvm-vendors previously carried as a
local customization, and package.sh is now generic so jvm-vendors and build-tools
can share it.
@dmikusa
dmikusa force-pushed the add-multi-implementation branch from 7375d02 to e93fae3 Compare October 28, 2026 03:21
@dmikusa
dmikusa marked this pull request as draft October 28, 2026 03:58
@dmikusa
dmikusa marked this pull request as ready for review November 5, 2026 13:27
anthonydahanne
anthonydahanne previously approved these changes Nov 5, 2026

@pacostas pacostas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess the main reasons that is a different implementation are:

  • Not making unrelated changes accross all the paketo buidpacks as this is related only to a very few repos
  • The reconsolidation, would add as a fallback the single implementation which in terms of code readability does not make it very clear

My main concern is the maintenance of having two implementations where 95% are similar, as in case of a bug in one of the implementations, the other will not get benefited from the upcoming patch

Comment thread multi-implementation/scripts/package.sh Resolved
Replace the separate multi-implementation workflow set with optional behavior in the standard implementation set. Repositories opt in with a multi-implementation.json at the repo root; without it the existing single-buildpack behavior and release job are unchanged.

The create-draft-release workflow now has two job graphs gated on the config file: the existing single-buildpack release job and a separate multi-buildpack path (release-prep, generate-notes, release-multi). The single path is unchanged apart from the gate and needs entries.

Add scripts/.util/implementation.sh to normalize config defaults, branch package.sh for libpak-tools packaging, and make push-buildpackage run per configured buildpack. Move the update-dependencies warnings check into the shared implementation workflow.
@dmikusa dmikusa changed the title Add multi-implementation workflow set Add optional multi-implementation support to implementation workflows Nov 7, 2026
@dmikusa

dmikusa commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Excellent catch there @pacostas. I just assumed there'd be too much difference, but turns out there really wasn't.

The separate multi-implementation set is gone and the behavior is folded into implementation, where things look for the presence of multi-implementation.json.

The single-buildpack create-draft-release job is unchanged apart from the config check and needs entries; multi repos get a separate job graph. push-buildpackage runs once per configured buildpack, and the warnings check is now in the shared update-dependencies-from-metadata workflow. This was the biggest change, because the multi workflow needs to dynamically set the matrix items (and has a matrix of what to release). I did it this way cause it doesn't change the existing implementation workflow. I could have combine them into one where the matrix set for the standard implementation is just a single item, but that seemed like a bigger change so I opted not to do that.

Mind taking another look?

@dmikusa dmikusa changed the title Add optional multi-implementation support to implementation workflows Generalize implementation workflows for multi-buildpack repositories Nov 7, 2026
dmikusa added a commit to paketo-buildpacks/jvm-vendors that referenced this pull request Nov 7, 2026
The implementation set now supports multi-buildpack repositories via multi-implementation.json (paketo-buildpacks/github-config#1451), so jvm-vendors no longer needs a separate workflow set.

Point update-github-config at the implementation set, sync the shared release/push/update-dependencies workflows and package script, and add the implementation helper. Keep the custom build.sh and CODEOWNERS repo-local.

@pacostas pacostas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In terms of semantics, Im not really sure if the name implementation.sh gives an extra info to the developer, based on that should all the functionality of the implementation.sh be under the tools.sh and omit the implementation string from the name of each function?

Normalize multi-implementation.json into one config shape and synthesize the same shape in memory when the file is absent. This keeps default handling in the loader instead of spreading fallbacks through the individual helpers, without checking in a default config file.

Also rename the multi predicate to is_multi for clarity.
dmikusa added a commit to paketo-buildpacks/jvm-vendors that referenced this pull request Nov 10, 2026
Sync the shared implementation helper and workflows with the config-normalization update from paketo-buildpacks/github-config#1451.
@dmikusa

dmikusa commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Reworked the config loading so the defaults live in one place: util::implementation::config now normalizes multi-implementation.json into a single shape, and synthesizes that same shape in memory when the file is absent. The individual helpers just read the normalized config, so there are no per-field fallbacks scattered through the scripts. No default config file is checked in. Moved repo-name out to tools.sh as well.

repo-name is not specific to the implementation config, so move it to the shared tools utility and have implementation.sh source that file.
dmikusa added a commit to paketo-buildpacks/jvm-vendors that referenced this pull request Nov 10, 2026
@dmikusa
dmikusa requested a review from pacostas November 10, 2026 04:43
dmikusa added a commit to paketo-buildpacks/jvm-vendors that referenced this pull request Nov 11, 2026
* Use the shared multi-implementation workflow set

Describe the combined jvm-vendors buildpack, its ten vendor buildpacks and the
image names in multi-implementation.json, then switch the update workflow to the
new multi-implementation set in github-config.

Replace the custom release, publish and update-dependencies workflows and package
script with the shared versions. The workflows derive their matrices from the
config file, and package.sh uses libpak-tools with the command and artifact flag
from the same file. The custom build.sh stays repo-local.

* Switch to the shared implementation workflow set

The implementation set now supports multi-buildpack repositories via multi-implementation.json (paketo-buildpacks/github-config#1451), so jvm-vendors no longer needs a separate workflow set.

Point update-github-config at the implementation set, sync the shared release/push/update-dependencies workflows and package script, and add the implementation helper. Keep the custom build.sh and CODEOWNERS repo-local.

* Apply implementation config defaults when loading

Sync the shared implementation helper and workflows with the config-normalization update from paketo-buildpacks/github-config#1451.

* Move repo-name helper to tools.sh

Sync the shared helper move from paketo-buildpacks/github-config#1451.
@dmikusa
dmikusa merged commit 687d34e into main Nov 11, 2026
4 checks passed
@dmikusa
dmikusa deleted the add-multi-implementation branch November 11, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants