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 rubocop for ruby 2.7+ #4448

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft

Update rubocop for ruby 2.7+ #4448

wants to merge 16 commits into from

Conversation

p-datadog
Copy link
Member

@p-datadog p-datadog commented Mar 1, 2025

What does this PR do?
Updates rubocop and related dependencies to newer versions.

Removes rubocop from ruby 2.6 configuration since the current versions of rubocop do not support ruby 2.6.
Removes rubocop from jruby 9.3 configuration because jruby 9.3 identifies as ruby 2.6 and hence rubocop does not support it anymore.
Removes standard from rubies that do not have rubocop, because then it would bring an old rubocop that wouldn't behave the same as the one in supported versions.
Updates rubocop to 1.71. Current version of rubocop is 1.73 but standard does not support 1.73 yet.
standard version is not explicitly specified but it gets updated to 1.45 from somewhere in the 1.20 range.
Several files edited for changes demanded by recent rubocops.
rubocop-rspec updated to most recent 2.x release, 3.0 has many new demands producing a huge diff likely to conflict with other PRs.

Motivation:

Noticed old version when testing rubocop/rubocop#13933

Change log entry
None

Additional Notes:

Since rubocop, standard and related libraries need to have synchronized versions, this PR does not update rubocop to its latest version (currently 1.73, PR updates to 1.71) and e.g. rubocop-performance needs to be declared as 1.20 not 1.23.

rubocop-rspec 3.x wants to make MANY changes to our test suite, they will probably conflict with in-progress PRs.

How to test the change?
Existing CI

@p-datadog p-datadog requested a review from a team as a code owner March 1, 2025 05:28
@codecov-commenter
Copy link

codecov-commenter commented Mar 1, 2025

Codecov Report

Attention: Patch coverage is 97.61905% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.68%. Comparing base (9ea35ba) to head (99aa915).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...cing/contrib/mongodb/regression_issue_1235_spec.rb 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4448      +/-   ##
==========================================
- Coverage   97.69%   97.68%   -0.02%     
==========================================
  Files        1381     1381              
  Lines       83955    83954       -1     
  Branches     4253     4249       -4     
==========================================
- Hits        82024    82011      -13     
- Misses       1931     1943      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Mar 1, 2025

Datadog Report

Branch report: update-rubocop
Commit report: 99aa915
Test service: dd-trace-rb

✅ 0 Failed, 20631 Passed, 1371 Skipped, 3m 26.05s Total Time

@p-datadog p-datadog marked this pull request as draft March 1, 2025 05:45
@pr-commenter
Copy link

pr-commenter bot commented Mar 1, 2025

Benchmarks

Benchmark execution time: 2025-03-12 18:40:20

Comparing candidate commit 99aa915 in PR branch update-rubocop with baseline commit 9ea35ba in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 31 metrics, 2 unstable metrics.

@p-datadog p-datadog force-pushed the update-rubocop branch 2 times, most recently from b462716 to d37fb33 Compare March 5, 2025 19:42
@github-actions github-actions bot added core Involves Datadog core libraries integrations Involves tracing integrations profiling Involves Datadog profiling appsec Application Security monitoring product tracing otel OpenTelemetry-related changes labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appsec Application Security monitoring product core Involves Datadog core libraries integrations Involves tracing integrations otel OpenTelemetry-related changes profiling Involves Datadog profiling tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants