Skip to content

Simplify bin/report implementation #369

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Malax
Copy link
Member

@Malax Malax commented Jun 18, 2025

This PR simplifies the buildpack's metadata collection system by replacing the custom key-value store with a JSON-based metrics system. The intent is to port this to all JVM buildpacks. (See: heroku/heroku-buildpack-java#247)

  • Removed the need for manual field categorization and string escaping by leveraging jq for safe output formatting.
  • Since we don't need manual field categorization, buildpacks that use heroku/jvm don't have to be kept in sync with metrics changes in heroku/jvm!
  • Replaced complex custom YAML generation logic with simple JSON-to-YAML conversion.
  • Replaced hardcoded conditional functions with a generic wrapper (_install_conditional_function_wrapper).
  • All functions now use the metrics:: namespace

Example

bin/report output with the changes in this PR, no changes from before:

app_has_jdk_overlay: true
openjdk_distribution: "zulu"
openjdk_install_duration: 4.078
openjdk_version: "1.8.0_452"
openjdk_version_selector: "8"

GUS-W-18837218

@Malax Malax added the skip changelog Pull requests that do not require changes to the CHANGELOG file label Jun 18, 2025
@Malax Malax force-pushed the malax/simplify-bin-report branch from e9da380 to 7bf822f Compare June 18, 2025 13:40
@Malax Malax force-pushed the malax/simplify-bin-report branch from e646cdf to 70e6b15 Compare June 20, 2025 10:15
@Malax Malax marked this pull request as ready for review June 20, 2025 10:52
@Malax Malax requested a review from a team as a code owner June 20, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changelog Pull requests that do not require changes to the CHANGELOG file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant