Skip to content

Updating version for openjdk for 21.X.X - #1197

Open
ari-wg-gitbot wants to merge 1 commit into
masterfrom
pr-by-releng-bot-1793962315
Open

ari-wg-gitbot wants to merge 1 commit into
masterfrom
pr-by-releng-bot-1793962315

Conversation

@ari-wg-gitbot

Copy link
Copy Markdown
Contributor

Automated update of openjdk dependency for version line 21.X.X.

for stack(s) cflinuxfs4, cflinuxfs5

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The manifest leaves both OpenJDK 17 and 21 available on cflinuxfs5, causing JRuby apps without a preinstalled .jdk to fail staging because the JVM installer rejects multiple versions.

1 open issue
What changed in this PR

This automated dependency update adds OpenJDK 21.0.13.0.3+5 to the Ruby buildpack’s manifest for JVM-backed JRuby applications.

Changes:

  • Adds an OpenJDK 21 artifact and checksum for cflinuxfs4 and cflinuxfs5.
  • References the Liberica source archive while retaining the existing OpenJDK 17 entry.
File Description
manifest.yml Adds OpenJDK 21 dependency metadata and supported stacks.

Review effort: Balanced

Comment thread manifest.yml
sha256: '0577229439419dd3decdffdb67ca2749cff0bf237282e655584bb32f91713ec0'
cf_stacks:
- cflinuxfs4
- cflinuxfs5
@benjaminguttmann-avtq

Copy link
Copy Markdown
Contributor

I asked the AI if it is possible as of now to exclude bumps for a certain stack for just ruby via the dependency config here is the answer:

What do you think about implementing option 1?

dependency-builds: no per-buildpack stack restriction (OpenJDK for Ruby)

Checked against cloudfoundry/buildpacks-ci master at 46528156
("[pipelines][dependency-builds] Keep only Java 21 for Ruby").

Question

Can the dependency-builds config bump OpenJDK for the ruby buildpack on
cflinuxfs5 only (not cflinuxfs4)?

Answer

No. The config has no way to restrict a dependency to a stack for one buildpack only.

Current state

In pipelines/dependency-builds/config.yml, openjdk is shared by two buildpacks and is
built once for all stacks:

openjdk:
  buildpacks:
    java:
      lines: [8.X.X, 11.X.X, 17.X.X, 21.X.X, 25.X.X]
    ruby:
      lines: [21.X.X]
  source_type: liberica
  any_stack: true
  versions_to_keep: 2

The only per-stack control is skip_lines, for example
skip_lines: { cflinuxfs4: ['21.X.X'] }. It is keyed by dependency, stack and version line.
It has no buildpack dimension.

  • pipeline.yml reads it per dependency (skip_lines = getattr(dep, "skip_lines", {})).
    Every update-<dep>-<line>-<buildpack> job runs the same update-buildpack-dependency task.
  • tasks/update-buildpack-dependency/run.rb reads
    config.dig('dependencies', source_name, 'skip_lines') and removes the skipped stacks from
    cf_stacks for the current version line.
  • Nothing passes the buildpack name into that check.

Setting openjdk.skip_lines.cflinuxfs4: ['21.X.X'] would therefore also remove cflinuxfs4
from the java buildpack's JRE 21 entry. That is wrong, because the java buildpack still
needs 21 on cflinuxfs4.

Related issues

  1. Case mismatch in run.rb. version_line is lowercased (21.x.x), but
    lines.include?(version_line) compares it to the config value as written (21.X.X).
    With uppercase X, skip_lines most likely never matches in run.rb. It has gone unnoticed
    because the only existing entries are ruby 2.7.X/3.0.X, which are no longer active
    lines, and node's lowercase node-lts. pipeline.yml lowercases both sides, so only
    run.rb is affected. This is untested.
  2. Build job ignores skip_lines for any_stack deps. build_stacks is ["any-stack"],
    so removing a real stack name is a no-op. This is harmless here because it is a single
    any-stack build, and the manifest cf_stacks is decided in run.rb.

Options

  1. Per-buildpack skip (recommended).
    • Add an optional per-buildpack key, for example:
      openjdk:
        buildpacks:
          ruby:
            lines: [ { line: 21.X.X } ]
            skip_stacks: [ cflinuxfs4 ]
    • Pass it from the update-* job in pipeline.yml as a new env var (for example
      SKIP_STACKS).
    • In run.rb, subtract those stacks from cf_stacks for that buildpack.
    • Fix the case comparison for skip_lines.
    • Document the new key in pipelines/dependency-builds/README.md.
  2. Split the dependency. Add a second dependency entry (for example openjdk-ruby) with
    its own skip_lines. This needs new source and bucket resources and a separate build, so
    it is heavier.

@benjaminguttmann-avtq

Copy link
Copy Markdown
Contributor

Related to cloudfoundry/buildpacks-ci#709

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