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

Use dependabot-common gem if available #11558

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

kbukum1
Copy link
Contributor

@kbukum1 kbukum1 commented Feb 11, 2025

What are you trying to accomplish?

We should try to load the common/lib path and fallback to the gem. This should cover running in the dry-run, api and now dependabot-omnibus gem.

The files could not be located when running in the dependabot-omnibus gem.

An error occurred while loading ./spec/actions/activate_account_spec.rb.
Failure/Error: require File.expand_path("../config/environment", __dir__)

Zeitwerk::Error:
  the root directory /home/dependabot/.local/share/gem/ruby/gems/common/lib does not exist
# /home/dependabot/.local/share/gem/ruby/gems/zeitwerk-2.7.1/lib/zeitwerk/loader/config.rb:125:in `push_dir'
# /home/dependabot/.local/share/gem/ruby/gems/dependabot-bun-0.296.2/lib/dependabot/bun.rb:9:in `<main>'
# /home/dependabot/.local/share/gem/ruby/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
# /home/dependabot/.local/share/gem/ruby/gems/dependabot-bun-0.296.2/lib/dependabot/javascript.rb:4:in `<main>'
# /home/dependabot/.local/share/gem/ruby/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
# /home/dependabot/.local/share/gem/ruby/gems/dependabot-omnibus-0.296.2/lib/dependabot/omnibus.rb:23:in `<main>'
# ./config/application.rb:47:in `<top (required)>'
# ./config/environment.rb:4:in `require_relative'
# ./config/environment.rb:4:in `<top (required)>'
# ./spec/rails_helper.rb:4:in `<top (required)>'
# ./spec/actions/activate_account_spec.rb:3:in `<top (required)>'
# ------------------
# --- Caused by: ---
# LoadError:
#   cannot load such file -- dependabot-omnibus
#   ./config/application.rb:47:in `<top (required)>'

An error occurred while loading ./spec/actions/azure_blob_storage_spec.rb.
Failure/Error: require File.expand_path("../config/environment", __dir__)

Anything you want to highlight for special attention from reviewers?

Ideally we could test building the dependabot-omnibus gem without going through the whole release process.

How will you know you've accomplished your goal?

dependabot-omnibus should build successfully.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@kbukum1 kbukum1 self-assigned this Feb 14, 2025
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.

2 participants