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

Excon v0.111.0 has broken this gem #586

Closed
bmhughes opened this issue Jul 8, 2024 · 9 comments
Closed

Excon v0.111.0 has broken this gem #586

bmhughes opened this issue Jul 8, 2024 · 9 comments

Comments

@bmhughes
Copy link

bmhughes commented Jul 8, 2024

The VALID_REQUEST_KEYS constant is now frozen so a FrozenError is thrown when requireing this gem.

FrozenError: can't modify frozen Array: [:allow_unstubbed_requests, :body, :chunk_size, :debug_request, :debug_response, :dns_timeouts, :headers, :instrumentor, :logger, :method, :middlewares, :password, :path, :persistent, :pipeline, :query, :read_timeout, :request_block, :resolv_resolver, :response_block, :stubs, :timeout, :user, :versions, :write_timeout]

https://github.com/excon/excon/blame/master/lib/excon/constants.rb#L66

traylenator added a commit to traylenator/puppet-quadlets that referenced this issue Jul 8, 2024
traylenator added a commit to traylenator/puppet-quadlets that referenced this issue Jul 8, 2024
traylenator added a commit to traylenator/puppet-quadlets that referenced this issue Jul 8, 2024
traylenator added a commit to traylenator/puppet-quadlets that referenced this issue Jul 8, 2024
@AdilKh4n
Copy link

AdilKh4n commented Jul 8, 2024

not nice to see this in our production env impacting 1000s of hosts today. How can we prevent this from happening in the future?

@bastelfreak
Copy link

Invest in a CI setup and don't pull random updates into production?

@feld
Copy link

feld commented Jul 8, 2024

Invest in a CI setup and don't pull random updates into production?

Chef automatically installs latest gem(s) that meet defined dependencies on each run. The only way to stop this would be to make sure it uses the Bundler flag --prefer-local so it uses the installed gems if they meet the requirements, but that feature didn't exist until December 2023 (Bundler 2.5) and Chef hasn't shipped a new version with that version of Bundler.

I suspect Puppet users are in the same situation.

The only other way this could have been avoided would be for docker-api to have more strictly pinned the version requirement of excon.

To work around it I had to modify the docker cookbook to pull the gem from my own rubygems server (geminabox) and build/upload a copy of "docker-api-2.2.1" from the fix-excon-frozenerror branch here.

Completely insane behavior all around, really.

ls-todd-lunter added a commit that referenced this issue Jul 8, 2024
Fix #586: require newer excon, use valid parameter keys interface
@ls-todd-lunter
Copy link
Contributor

ls-todd-lunter commented Jul 8, 2024

Hi folks, released v2.3.0 which should fix this error.

@geemus
Copy link

geemus commented Jul 8, 2024

Sorry to hear about this impact (I'm the author of excon). I hadn't seen any reason to believe this freeze would have this kind of impact since the excon test suite otherwise was not impacted by it. This may speak to the hijack middleware being somewhat unusual compared to other things and was doing something that was not expected. In any event, I'm glad you were able to find the fix quickly and feel free to reach out if you have issues or concerns in the future.

@ls-todd-lunter
Copy link
Contributor

No worries @geemus, definitely our fault on this end for not updating to the proper interface.

@geemus
Copy link

geemus commented Jul 8, 2024

Easy to overlook I'm sure, glad it was an easy fix.

@b-dean
Copy link
Contributor

b-dean commented Jul 9, 2024

@ls-todd-lunter, do you mean to add a v2.3.0 tag? I was looking to see if the new version was out and saw no tag and didn't realize it was already on rubygems.org

@ls-todd-lunter
Copy link
Contributor

@b-dean sorry, yes. Pushed the tag now.

kwatson added a commit to ComputeStacks/docker-api that referenced this issue Jul 18, 2024
* 'master' of https://github.com/upserve/docker-api:
  Minor version bump
  Mark as pending broken test for Docker 27
  Don't fail fast, allow for re-runs that will likely succeed
  Fix broken tests, add sleep to allow container to die after kill signal
  Fix some broken tests or mark as pending
  Update build config
  Fix upserve#586: require newer excon, use valid parameter keys interface
lawrencegripper added a commit to lawrencegripper/azbrowse that referenced this issue Jul 30, 2024
I've bumped the version of the `docker-api` gem as per [this
issue](upserve/docker-api#586) and that seems
to addresses the [CI
failure](https://github.com/lawrencegripper/azbrowse/actions/runs/10150688701/job/28068348472?pr=579#step:5:1013)
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

No branches or pull requests

7 participants