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

Offlinizing java buildpack does not support cflinuxfs4 #986

Closed
AnnaAAL opened this issue Dec 9, 2022 · 3 comments · Fixed by #989
Closed

Offlinizing java buildpack does not support cflinuxfs4 #986

AnnaAAL opened this issue Dec 9, 2022 · 3 comments · Fixed by #989
Labels

Comments

@AnnaAAL
Copy link

AnnaAAL commented Dec 9, 2022

We are offlinizing the java_buildpack.
We've noticed that when the packaging command for the offline buildpack is executed (as it says in the README):

bundle exec rake clean package OFFLINE=true PINNED=true

In the output it's visible that it's pointing to bionic instead of jammy.

However, on cf push we get the following error:
ERROR Finalize failed with exception #<RuntimeError: Jvmkill Agent error: Unable to find cached file for https://java-buildpack.cloudfoundry.org/jvmkill/jammy/x86_64/index.yml>
Jvmkill Agent error: Unable to find cached file for https://java-buildpack.cloudfoundry.org/jvmkill/jammy/x86_64/index.yml
Failed to compile droplet: Failed to run finalize script: exit status 1

We've tried locally to edit package.rb line76 with jammy, i.e. PLATFORMS = %w[bionic jammy].freeze and it works.

Could you, please review our proposal and adjust it/add it to the buildpack, so we can use it offlinized?

@dmikusa
Copy link
Contributor

dmikusa commented Dec 9, 2022

Are you able to access https://java-buildpack.cloudfoundry.org/jvmkill/jammy/x86_64/index.yml? That looks like the correct URL and that loads for me.

@AnnaAAL
Copy link
Author

AnnaAAL commented Dec 12, 2022

Hi @dmikusa , thank you for the prompt feedback.
We do have access to the given index file, however when we use the given command from the README :
bundle exec rake clean package OFFLINE=true PINNED=true
it does not use jammy, rather than bionic. Here's a screenshot of what's being cached using rake:
image

Currently, just for testing, we edited the mentioned line above manually. Could you please recheck and confirm how the buildpack can be offlinized for jammy(cflinuxfs4) using the rake command?

@dmikusa
Copy link
Contributor

dmikusa commented Dec 12, 2022

For now, I would suggest that you just edit that variable prior to packaging. It is possible something was missed in the commit for Jammy support. Jammy support is still pretty new, so I don't think this code has been exercised much yet.

The platforms list is going to control what dependencies are included. If you need one buildpack to support both platforms, then include both jammy and bionic. If you want to have support for just a single platform, then include just that single platform. If you include both, the buildpack is going to be larger. Watch that it does not go above 1G, as that will often cause problems in CF (at least it historically has).


Obviously, we should have a control/setting exposed for that. Perhaps, PLATFORMS= as an option like OFFLINE and PINNED which would override the default. If anyone would like to submit a PR, that would be appreciated.

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

Successfully merging a pull request may close this issue.

2 participants