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

gem: pin down googleauth gem to below 1.9 #773

Merged
merged 1 commit into from
Apr 15, 2024
Merged

Conversation

ahasunos
Copy link
Contributor

Description

This PR addresses recent CI failures on Windows caused by changes in googleauth gem's method https://github.com/googleapis/google-auth-library-ruby/blob/8f127eee40b0f970706c59cb324f71408dd2fec4/lib/googleauth/compute_engine.rb#L72 . To restore stability to our CI pipelines, we're pinning the googleauth gem to version below 1.9 in our gemspec.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read the CONTRIBUTING document.

@ahasunos ahasunos requested a review from a team as a code owner April 10, 2024 11:37
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
@ahasunos ahasunos force-pushed the ss/pin-down-googleauth branch from 0829b3a to a66e61e Compare April 15, 2024 09:34
@Vasu1105 Vasu1105 merged commit 3056e51 into main Apr 15, 2024
7 checks passed
@ahasunos ahasunos deleted the ss/pin-down-googleauth branch April 15, 2024 10:58
@ahasunos
Copy link
Contributor Author

The intuition behind pinning googleauth below 1.9 is that the CI is failing with the following stacktrace on Windows

Click to see the stacktrace
C:/ruby31/lib/ruby/3.1.0/win32/registry.rb:289:in `OpenKey': The system cannot find the file specified. (Win32::Registry::Error)
  from C:/ruby31/lib/ruby/3.1.0/win32/registry.rb:431:in `open'
  from C:/ruby31/lib/ruby/3.1.0/win32/registry.rb:542:in `open'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/google-cloud-env-2.1.1/lib/google/cloud/env/compute_smbios.rb:123:in `load_product_name'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/google-cloud-env-2.1.1/lib/google/cloud/env/compute_smbios.rb:36:in `block in initialize'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/google-cloud-env-2.1.1/lib/google/cloud/env/lazy_value.rb:462:in `perform_compute'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/google-cloud-env-2.1.1/lib/google/cloud/env/lazy_value.rb:279:in `get'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/google-cloud-env-2.1.1/lib/google/cloud/env/compute_smbios.rb:51:in `product_name'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/google-cloud-env-2.1.1/lib/google/cloud/env/compute_smbios.rb:83:in `google_compute?'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/google-cloud-env-2.1.1/lib/google/cloud/env/compute_metadata.rb:708:in `block in gce_check'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/google-cloud-env-2.1.1/lib/google/cloud/env/compute_metadata.rb:706:in `synchronize'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/google-cloud-env-2.1.1/lib/google/cloud/env/compute_metadata.rb:706:in `gce_check'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/google-cloud-env-2.1.1/lib/google/cloud/env/compute_metadata.rb:397:in `lookup_response'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/google-cloud-env-2.1.1/lib/google/cloud/env/compute_metadata.rb:445:in `lookup'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/google-cloud-env-2.1.1/lib/google/cloud/env/compute_metadata.rb:487:in `check_existence'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/google-cloud-env-2.1.1/lib/google/cloud/env.rb:129:in `metadata?'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/googleauth-1.11.0/lib/googleauth/compute_engine.rb:73:in `on_gce?'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/googleauth-1.11.0/lib/googleauth/application_default.rb:58:in `get_application_default'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/train-3.12.0/lib/train/transports/gcp.rb:96:in `connect'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/train-3.12.0/lib/train/transports/gcp.rb:49:in `initialize'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/train-3.12.0/lib/train/transports/gcp.rb:33:in `new'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/train-3.12.0/lib/train/transports/gcp.rb:33:in `connection'
  from C:/workdir/lib/inspec/backend.rb:38:in `create'
  from C:/workdir/lib/inspec/runner.rb:92:in `configure_transport'
  from C:/workdir/lib/inspec/runner.rb:84:in `initialize'
  from C:/workdir/lib/inspec/cli.rb:407:in `new'
  from C:/workdir/lib/inspec/cli.rb:407:in `block in exec'
  from C:/workdir/lib/inspec/feature/runner.rb:24:in `with_feature'
  from C:/workdir/lib/inspec/feature.rb:6:in `with_feature'
  from C:/workdir/lib/inspec/cli.rb:395:in `exec'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
  from C:/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start'
  from C:/workdir/lib/inspec/base_cli.rb:40:in `start'
  from C:/workdir/inspec-bin/bin/inspec:11:in `<main>'

This arises from the method:

https://github.com/googleapis/google-auth-library-ruby/blob/8f127eee40b0f970706c59cb324f71408dd2fec4/lib/googleauth/compute_engine.rb#L72

which was updated in PR: googleapis/google-auth-library-ruby#459

Hence, using a version which doesn't include the changes in this method.

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.

2 participants