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

Properly indicate required steep dependency #4238

Merged
merged 3 commits into from
Dec 19, 2024
Merged

Conversation

p-datadog
Copy link
Member

What does this PR do?

This PR increases the minimum required versions of steep and rbs to the versions specified in #4221, so that after a successful bundle install steep succeeds.

Motivation:

The current minimum versions in master are lower than the versions needed for steep to work. Currently running steep (on a tracer tree that already had dependencies installed, and uses steep 1.7) produces the following error:

big% be steep check
#<NameError: uninitialized constant Steep::Diagnostic::Ruby::UnknownRecordKey>
  Steepfile:30:in `block (3 levels) in parse'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/steep-1.7.1/lib/steep/project/dsl.rb:142:in `configure_code_diagnostics'
  Steepfile:15:in `block (2 levels) in parse'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/steep-1.7.1/lib/steep/project/dsl.rb:194:in `instance_eval'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/steep-1.7.1/lib/steep/project/dsl.rb:194:in `block in target'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `block in tagged'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:38:in `tagged'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `tagged'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/steep-1.7.1/lib/steep/project/dsl.rb:193:in `target'
  Steepfile:6:in `block in parse'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/steep-1.7.1/lib/steep/project/dsl.rb:181:in `instance_eval'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/steep-1.7.1/lib/steep/project/dsl.rb:181:in `block in parse'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `block in tagged'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:38:in `tagged'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `tagged'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/steep-1.7.1/lib/steep/project/dsl.rb:180:in `parse'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/steep-1.7.1/lib/steep/drivers/utils/driver_helper.rb:11:in `block in load_config'
  <internal:kernel>:90:in `tap'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/steep-1.7.1/lib/steep/drivers/utils/driver_helper.rb:10:in `load_config'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/steep-1.7.1/lib/steep/drivers/check.rb:25:in `run'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/steep-1.7.1/lib/steep/cli.rb:136:in `process_check'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/steep-1.7.1/lib/steep/cli.rb:60:in `run'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/gems/steep-1.7.1/exe/steep:11:in `<top (required)>'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/bin/steep:25:in `load'
  /home/w/.cache/vendor/bundle/ruby/3.3.0/bin/steep:25:in `<top (required)>'
  /home/w/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundler/cli/exec.rb:58:in `load'
  /home/w/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundler/cli/exec.rb:58:in `kernel_load'
  /home/w/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundler/cli/exec.rb:23:in `run'
  /home/w/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundler/cli.rb:455:in `exec'
  /home/w/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
  /home/w/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /home/w/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
  /home/w/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundler/cli.rb:35:in `dispatch'
  /home/w/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
  /home/w/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundler/cli.rb:29:in `start'
  /home/w/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/exe/bundle:28:in `block in <top (required)>'
  /home/w/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
  /home/w/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/exe/bundle:20:in `<top (required)>'
  /home/w/.rbenv/versions/3.3/bin/bundle:25:in `load'
  /home/w/.rbenv/versions/3.3/bin/bundle:25:in `<main>'

Because gemfiles specify the lower version bound on steep at 1.7, bundle install does not update steep version, and does not fix this error.

Change log entry
None

Additional Notes:

How to test the change?

@p-datadog p-datadog requested a review from a team as a code owner December 19, 2024 14:24
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Dec 19, 2024

Datadog Report

Branch report: steep-dependency
Commit report: df9de9e
Test service: dd-trace-rb

✅ 0 Failed, 22134 Passed, 1476 Skipped, 5m 27.84s Total Time

Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

👍 Yeap, just got bitten by this today as well, thanks for the fix

@p-datadog
Copy link
Member Author

Ruby 3.0 is no longer supported by the required version of steep:

 > [3/4] RUN /vendor/dd-demo/build_datadog_profiling_native_extension.rb:
#5 0.303 
#5 0.303 == Building profiler native extension ==
#5 0.553 Fetching https://github.com/DataDog/simplecov
#5 1.543 Fetching gem metadata from https://rubygems.org/............
#5 2.469 Resolving dependencies...
#5 3.290 Could not find compatible versions
#5 3.290 
#5 3.290 Because steep >= 1.8.0.pre.1 depends on Ruby >= 3.1.0
#5 3.290   and Gemfile depends on steep >= 1.9.1, < 2.A,
#5 3.290   Ruby >= 3.1.0 is required.
#5 3.290 So, because current Ruby version is = 3.0.7,
#5 3.290   version solving has failed.
#5 3.330 /vendor/dd-demo/build_datadog_profiling_native_extension.rb:7:in `<main>': Failure to compile profiler native extension (RuntimeError)

I will remove steep & rbs from 3.0 gemfiles.

@p-datadog p-datadog added the dev/internal Other internal work that does not need to be included in the changelog label Dec 19, 2024
@pr-commenter
Copy link

pr-commenter bot commented Dec 19, 2024

Benchmarks

Benchmark execution time: 2024-12-19 20:03:57

Comparing candidate commit df9de9e in PR branch steep-dependency with baseline commit 7fd1feb 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 merged commit ba0aaf3 into master Dec 19, 2024
347 checks passed
@p-datadog p-datadog deleted the steep-dependency branch December 19, 2024 22:57
@github-actions github-actions bot added this to the 2.9.0 milestone Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/internal Other internal work that does not need to be included in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants