open-telemetry / opentelemetry-ruby-contrib

Contrib Packages for the OpenTelemetry Ruby API and SDK implementation.
https://opentelemetry.io
Apache License 2.0
80 stars 166 forks source link

Error Opening Release Request: NoMethodError: undefined method `bump_segment' for nil:NilClass #673

Closed arielvalentin closed 11 months ago

arielvalentin commented 12 months ago

This error is happening when I run the release request workflow on the main branch:

https://github.com/open-telemetry/opentelemetry-ruby-contrib/actions/runs/6291356590/job/17079660093

[2023-09-24 17:10:49  INFO]  exec: ["git", "log", "d91d0cf85c8fac292df7ba1df0acb3f9c9b15736^..d91d0cf85c8fac292df7ba1df0acb3f9c9b15736", "--format=%B"]
NoMethodError: undefined method `bump_segment' for nil:NilClass
     29: /opt/hostedtoolcache/Ruby/3.0.6/x64/bin/toys:25:in `<main>'
     28: /opt/hostedtoolcache/Ruby/3.0.6/x64/bin/toys:25:in `load'
     27: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-0.14.7/bin/toys:11:in `<top (required)>'
     26: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/cli.rb:457:in `run'
     25: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/errors.rb:132:in `capture_path'
     24: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/cli.rb:464:in `block in run'
     23: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/cli.rb:719:in `execute_tool'
     22: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/cli.rb:719:in `catch'
     21: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/cli.rb:720:in `block in execute_tool'
     20: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/cli.rb:775:in `block in make_executor'
     19: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/standard_middleware/show_help.rb:240:in `run'
     18: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/cli.rb:775:in `block in make_executor'
     17: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/standard_middleware/show_root_version.rb:69:in `run'
     16: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/cli.rb:775:in `block in make_executor'
     15: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/standard_middleware/handle_usage_errors.rb:40:in `run'
     14: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/cli.rb:736:in `block in build_executor'
     13: /opt/hostedtoolcache/Ruby/3.0.6/x64/lib/ruby/gems/3.0.0/gems/toys-core-0.14.7/lib/toys/cli.rb:717:in `block in execute_tool'
     12: /home/runner/.cache/toys/git/6aae6748a2d9c5a8e22c933d80ef9e54/e8af67f1e5f8a4801a47f0ddac334f5de730febc/.toys/release/request.rb:84:in `run'
     11: /home/runner/.cache/toys/git/6aae6748a2d9c5a8e22c933d80ef9e54/e8af67f1e5f8a4801a47f0ddac334f5de730febc/.toys/release/request.rb:101:in `populate_requester'
     10: /home/runner/.cache/toys/git/6aae6748a2d9c5a8e22c933d80ef9e54/e8af67f1e5f8a4801a47f0ddac334f5de730febc/.toys/release/request.rb:101:in `each'
      9: /home/runner/.cache/toys/git/6aae6748a2d9c5a8e22c933d80ef9e54/e8af67f1e5f8a4801a47f0ddac334f5de730febc/.toys/release/request.rb:108:in `block in populate_requester'
      8: /home/runner/.cache/toys/git/6aae6748a2d9c5a8e22c933d80ef9e54/e8af67f1e5f8a4801a47f0ddac334f5de730febc/.toys/release/.lib/release_requester.rb:280:in `gem_info'
      7: /home/runner/.cache/toys/git/6aae6748a2d9c5a8e22c933d80ef9e54/e8af67f1e5f8a4801a47f0ddac334f5de730febc/.toys/release/.lib/release_requester.rb:280:in `new'
      6: /home/runner/.cache/toys/git/6aae6748a2d9c5a8e22c933d80ef9e54/e8af67f1e5f8a4801a47f0ddac334f5de730febc/.toys/release/.lib/release_requester.rb:18:in `initialize'
      5: /home/runner/.cache/toys/git/6aae6748a2d9c5a8e22c933d80ef9e54/e8af67f1e5f8a4801a47f0ddac334f5de730febc/.toys/release/.lib/release_requester.rb:105:in `analyze_messages'
      4: /home/runner/.cache/toys/git/6aae6748a2d9c5a8e22c933d80ef9e54/e8af67f1e5f8a4801a47f0ddac334f5de730febc/.toys/release/.lib/release_requester.rb:105:in `reverse_each'
      3: /home/runner/.cache/toys/git/6aae6748a2d9c5a8e22c933d80ef9e54/e8af67f1e5f8a4801a47f0ddac334f5de730febc/.toys/release/.lib/release_requester.rb:111:in `block in analyze_messages'
      2: /home/runner/.cache/toys/git/6aae6748a2d9c5a8e22c933d80ef9e54/e8af67f1e5f8a4801a47f0ddac334f5de730febc/.toys/release/.lib/release_requester.rb:118:in `analyze_message'
      1: /home/runner/.cache/toys/git/6aae6748a2d9c5a8e22c933d80ef9e54/e8af67f1e5f8a4801a47f0ddac334f5de730febc/.toys/release/.lib/release_requester.rb:130:in `analyze_title'
Error during tool execution!
    NoMethodError: undefined method `bump_segment' for nil:NilClass
    in config file: /home/runner/.cache/toys/git/6aae6748a2d9c5a8e22c933d80ef9e54/e8af67f1e5f8a4801a47f0ddac334f5de730febc/.toys/release/request.rb:108
    while executing tool: "release request"
    with arguments: ["--yes", "--verbose", "--gems=", "--release-ref=refs/heads/main"]
arielvalentin commented 12 months ago

cc: @dazuma

arielvalentin commented 12 months ago

For posterity

🤘 git log d91d0cf85c8fac292df7ba1df0acb3f9c9b15736^..d91d0cf85c8fac292df7ba1df0acb3f9c9b15736 --format=%B
chore(dev-deps): Bump rubocop 1.56.1 (#640)

vibora ~/github/opentelemetry-ruby-contrib(main|✔) %
🤘 git diff --name-only d91d0cf85c8fac292df7ba1df0acb3f9c9b15736^..d91d0cf85c8fac292df7ba1df0acb3f9c9b15736
CONTRIBUTING.md
bin/update-dependencies
instrumentation/action_pack/opentelemetry-instrumentation-action_pack.gemspec
instrumentation/action_view/opentelemetry-instrumentation-action_view.gemspec
instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec
instrumentation/active_model_serializers/opentelemetry-instrumentation-active_model_serializers.gemspec
instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec
instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec
instrumentation/all/opentelemetry-instrumentation-all.gemspec
instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/message_attributes.rb
instrumentation/aws_sdk/opentelemetry-instrumentation-aws_sdk.gemspec
instrumentation/base/opentelemetry-instrumentation-base.gemspec
instrumentation/bunny/opentelemetry-instrumentation-bunny.gemspec
instrumentation/concurrent_ruby/opentelemetry-instrumentation-concurrent_ruby.gemspec
instrumentation/dalli/opentelemetry-instrumentation-dalli.gemspec
instrumentation/delayed_job/opentelemetry-instrumentation-delayed_job.gemspec
instrumentation/ethon/opentelemetry-instrumentation-ethon.gemspec
instrumentation/excon/opentelemetry-instrumentation-excon.gemspec
instrumentation/faraday/opentelemetry-instrumentation-faraday.gemspec
instrumentation/grape/opentelemetry-instrumentation-grape.gemspec
instrumentation/graphql/opentelemetry-instrumentation-graphql.gemspec
instrumentation/gruf/opentelemetry-instrumentation-gruf.gemspec
instrumentation/http/opentelemetry-instrumentation-http.gemspec
instrumentation/http_client/opentelemetry-instrumentation-http_client.gemspec
instrumentation/koala/opentelemetry-instrumentation-koala.gemspec
instrumentation/lmdb/opentelemetry-instrumentation-lmdb.gemspec
instrumentation/mongo/opentelemetry-instrumentation-mongo.gemspec
instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec
instrumentation/net_http/opentelemetry-instrumentation-net_http.gemspec
instrumentation/pg/lib/opentelemetry/instrumentation/pg/patches/connection.rb
instrumentation/pg/opentelemetry-instrumentation-pg.gemspec
instrumentation/que/opentelemetry-instrumentation-que.gemspec
instrumentation/racecar/opentelemetry-instrumentation-racecar.gemspec
instrumentation/rack/opentelemetry-instrumentation-rack.gemspec
instrumentation/rails/opentelemetry-instrumentation-rails.gemspec
instrumentation/rake/opentelemetry-instrumentation-rake.gemspec
instrumentation/rdkafka/opentelemetry-instrumentation-rdkafka.gemspec
instrumentation/redis/opentelemetry-instrumentation-redis.gemspec
instrumentation/resque/opentelemetry-instrumentation-resque.gemspec
instrumentation/restclient/opentelemetry-instrumentation-restclient.gemspec
instrumentation/rspec/opentelemetry-instrumentation-rspec.gemspec
instrumentation/ruby_kafka/opentelemetry-instrumentation-ruby_kafka.gemspec
instrumentation/sidekiq/opentelemetry-instrumentation-sidekiq.gemspec
instrumentation/sinatra/opentelemetry-instrumentation-sinatra.gemspec
instrumentation/trilogy/opentelemetry-instrumentation-trilogy.gemspec
propagator/ottrace/opentelemetry-propagator-ottrace.gemspec
propagator/xray/opentelemetry-propagator-xray.gemspec
resource_detectors/opentelemetry-resource_detectors.gemspec
resources/container/opentelemetry-resource-detector-container.gemspec
arielvalentin commented 12 months ago

I was able to fix this by using a fixed stable version of toys instead of pulling from head. https://github.com/open-telemetry/opentelemetry-ruby-contrib/commit/48baa03246865db68a5804bcc4147ca059aacc79

dazuma commented 11 months ago

shoot, lemme see what's going on.

dazuma commented 11 months ago

This should be fixed on head now.