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

ensure that cpi uses the correct gem path during runtime #702

Conversation

fmoehler
Copy link
Contributor

@fmoehler fmoehler commented Nov 13, 2024

when executing create-env on a nix based oci image gems cannot be found.

Error message: "Cannot find [gems] in locally installed gems"

This PR fixes it.

Checklist:

Please check each of the boxes below for which you have completed the corresponding task:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • All unit tests pass locally (after my changes)
  • Rubocop reports zero errors (after my changes)

Please include below the summary portions of the output from the following 2 scripts:

pushd src/bosh_azure_cpi
  bundle install
  bundle exec rake spec:unit
  bundle exec rake rubocop
popd

NOTE: Please see how to setup dev environment and run unit tests in docs/development.md.

Unit Test output:

Finished in 4.85 seconds (files took 3.43 seconds to load)
1034 examples, 0 failures

Rubocop output:

Lots of Rubocop issues in files that are not affected by this PR:

191 files inspected, 50 offenses detected, 28 offenses autocorrectable

Changelog

when executing create-env on an oci image we face the issue that gems cannot be found

Error message: "Cannot find [gems] in locally installed gems"
@jpalermo
Copy link
Member

@fmoehler, if this is something needed for the ruby environment, is it possible to make this change in the runtime.env in the ruby release?

@fmoehler
Copy link
Contributor Author

@jpalermo it is needed for the installation path for the gems used by the azure cpi. Something similar was done for the was cpi some time ago as well: https://github.com/cloudfoundry/bosh-aws-cpi-release/blob/master/jobs/aws_cpi/templates/cpi.erb

@jpalermo
Copy link
Member

jpalermo commented Nov 15, 2024

Yeah, I'm wondering if we should stop copy/pasting it around and put it in the ruby-release runtime.env file so when releases source that they all get the correct behavior.

Ignore me, now I understand. This needs to point to the gems in the release package, not the ruby package itself.

@jpalermo jpalermo requested review from a team, klakin-pivotal and nouseforaname and removed request for a team November 15, 2024 23:16
Copy link
Contributor

@klakin-pivotal klakin-pivotal left a comment

Choose a reason for hiding this comment

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

This change looks reasonable to me.

@klakin-pivotal klakin-pivotal merged commit ab79572 into cloudfoundry:master Nov 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

4 participants