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

Update Bundler deprecation unsupported check to use detected version #11222

Merged
merged 7 commits into from
Jan 4, 2025

Conversation

kbukum1
Copy link
Contributor

@kbukum1 kbukum1 commented Jan 3, 2025

What are you trying to accomplish?

This PR updates the handling of deprecation and unsupported checks for Bundler by ensuring that detected_version is consistently used instead of raw_version.

This change improves the accuracy of deprecation notices and resolves edge cases where raw_version is either nil or different from the detected_version. It also refines the notice generation and logging behavior to handle all scenarios correctly.

Why?

  • To ensure the consistency and correctness of version checks across Dependabot's ecosystem.
  • To fix potential issues with mismatched version usage in deprecation and unsupported logic.
  • To enhance the reliability and clarity of notices for deprecated and unsupported versions.

Anything you want to highlight for special attention from reviewers?

  • The logic in unsupported? and related methods was updated to handle cases where raw_version is nil.
  • Comprehensive test cases have been added to cover scenarios where:
    • detected_version is deprecated or unsupported.
    • raw_version is nil, deprecated, or different from detected_version.
  • The NoticeHelpers module was updated and thoroughly tested to ensure proper notice generation and logging behavior.

How will you know you've accomplished your goal?

  • All tests, including the complete test suite for NoticeHelpers and deprecation logic, pass successfully.
  • Deprecation and unsupported checks now use detected_version consistently, addressing any discrepancies.
  • Notice generation and logging correctly reflect the updated logic, including edge cases.

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 force-pushed the kamil/update_bundler_detected_version_check branch from 3d35f98 to 89bcb85 Compare January 3, 2025 20:55
@kbukum1 kbukum1 marked this pull request as ready for review January 3, 2025 21:58
@kbukum1 kbukum1 requested a review from a team as a code owner January 3, 2025 21:58
@kbukum1 kbukum1 requested a review from sachin-sandhu January 3, 2025 21:58
@kbukum1
Copy link
Contributor Author

kbukum1 commented Jan 3, 2025

This PR is the fix for bundler based on the change made in the following PR.

@kbukum1 kbukum1 requested a review from honeyankit January 3, 2025 22:10
Copy link
Member

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

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

The code changes look relatively straightforward, but I had some questions about the tests...

common/spec/spec_helper.rb Show resolved Hide resolved
@kbukum1 kbukum1 requested a review from jeffwidman January 3, 2025 22:43
Copy link
Member

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

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

Had a good call with @kbukum1 and this seems relatively straightforward to me. And if I'm missing something and it goes sideways, it shouldn't break things too badly.

@kbukum1 kbukum1 merged commit eb6d6fa into main Jan 4, 2025
127 checks passed
@kbukum1 kbukum1 deleted the kamil/update_bundler_detected_version_check branch January 4, 2025 00:06
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.

2 participants