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 #11555

Merged
merged 8 commits into from
Feb 12, 2025

Conversation

markhallen
Copy link
Contributor

@markhallen markhallen 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.

@markhallen markhallen requested a review from a team as a code owner February 11, 2025 20:19
robaiken
robaiken previously approved these changes Feb 11, 2025
kbukum1
kbukum1 previously approved these changes Feb 11, 2025
@markhallen markhallen dismissed stale reviews from robaiken and kbukum1 via b2a13f4 February 11, 2025 20:33
robaiken
robaiken previously approved these changes Feb 11, 2025
kbukum1
kbukum1 previously approved these changes Feb 11, 2025
@jeffwidman
Copy link
Member

Hang on, are we sure we even need to support the dependabot-omnibus use case?

@kbukum1 kbukum1 dismissed stale reviews from robaiken and themself via a60d727 February 11, 2025 21:15
@kbukum1 kbukum1 force-pushed the markhallen/use-dependabot-common-if-available branch from b62a7fa to c69b13d Compare February 11, 2025 23:04
@markhallen markhallen merged commit 0f4c942 into main Feb 12, 2025
130 of 132 checks passed
@markhallen markhallen deleted the markhallen/use-dependabot-common-if-available branch February 12, 2025 12:55
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.

4 participants