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

Fix edge condition in deprecation silence checker #11749

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

lamont-granquist
Copy link
Contributor

Catches a case where deprecations can be thrown against eval'd code.

/opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/deprecated.rb:82:in `initialize'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/deprecated.rb:82:in `open'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/deprecated.rb:82:in `silenced?'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/formatters/doc.rb:369:in `deprecation'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/event_dispatch/dispatcher.rb:78:in `call'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/event_dispatch/dispatcher.rb:78:in `block in call_subscribers'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/event_dispatch/dispatcher.rb:68:in `each'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/event_dispatch/dispatcher.rb:68:in `call_subscribers'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/event_dispatch/dispatcher.rb:91:in `process_events_until_done'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/event_dispatch/dispatcher.rb:38:in `enqueue'
  (eval):2:in `run_completed'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/client.rb:291:in `run'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/application.rb:305:in `run_with_graceful_exit_option'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/application.rb:281:in `block in run_chef_client'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/local_mode.rb:42:in `with_server_connectivity'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/application.rb:264:in `run_chef_client'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/application/base.rb:352:in `run_application'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/application.rb:67:in `run'
  /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-bin-17.2.29/bin/chef-client:25:in `<top (required)>'
  /usr/local/bin/chef-client:143:in `load'
  /usr/local/bin/chef-client:143:in `<main>'
[2021-06-23T12:32:33-07:00] FATAL: Errno::ENOENT: No such file or directory @ rb_sysopen - (eval)

Unclear what triggers this, but its a bug.

Catches a case where deprecations can be thrown against
eval'd code.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
@lamont-granquist lamont-granquist requested review from a team as code owners June 23, 2021 21:22
@tas50 tas50 merged commit c9a2b9f into master Jun 24, 2021
@tas50 tas50 deleted the lcg/fix-deprecation-edge-case branch June 24, 2021 15:20
@tas50 tas50 mentioned this pull request Jul 15, 2021
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants