Skip to content

Fix security updates in Bundler subdependencies #10249

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

Conversation

deivid-rodriguez
Copy link
Contributor

@deivid-rodriguez deivid-rodriguez commented Jul 19, 2024

What are you trying to accomplish?

I noticed that #9923 seems to have caused an issue where security updates in Bundler subdependencies no longer succeed.

The new issue seems much worse than the original enhancement (a better error message in an edge case).

So I'm trying to fix it.

Closes #10251.

Anything you want to highlight for special attention from reviewers?

I think ideally we'd add support in upstream Bundler for things like bundle lock --update foo=<version>, since right now Bundler only has the capability of updating dependencies to their latest version.

But that's a big feature, so for now I used an approach that creates a Bundler::Definition from the Gemfile but adds an extra top level dependency to force the update.

How will you know you've accomplished your goal?

Hopefully the new smoke test I added to cover this passes.

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.

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/bundler-security-update-subdeps-regression branch from e7d7b68 to 4c76d7d Compare July 19, 2024 11:23
@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review July 19, 2024 11:24
@deivid-rodriguez deivid-rodriguez requested a review from a team as a code owner July 19, 2024 11:24
@deivid-rodriguez deivid-rodriguez changed the title Try fix security updates in Bundler subdependencies Fix security updates in Bundler subdependencies Jul 19, 2024
Copy link
Contributor

@thavaahariharangit thavaahariharangit left a comment

Choose a reason for hiding this comment

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

LGTM

@thavaahariharangit thavaahariharangit merged commit d5805e2 into dependabot:main Jul 19, 2024
107 checks passed
@deivid-rodriguez
Copy link
Contributor Author

Sorry, I should've mentioned that in order to proof that the smoke test passes, I pointed it to my smoke-tests repository fork. The associated smoke tests PR needs to be merged, and then the workflows updated back to point to the main repo and branch.

@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/bundler-security-update-subdeps-regression branch July 19, 2024 15:38
@deivid-rodriguez
Copy link
Contributor Author

For what it's worth, I retried the security update and it now succeeded 🎉

@jeffwidman
Copy link
Member

jeffwidman commented Jul 22, 2024

Thanks @deivid-rodriguez for handling this in #10253. You shouldn't need to mention this, the PR reviewer should have caught it and coordinated with you on this.

@deivid-rodriguez
Copy link
Contributor Author

It's ok. I also wanted to mention that I only fixed this for Bundler v2. I did not mess with Bundler v1 since given there's an ongoing discussion about what to do with it, I did not want to implement anything that may be immediately removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: ruby:bundler RubyGems via bundler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Security Update PRs no longer succeed for Bundler subdependencies
3 participants