cloud_controller_ng icon indicating copy to clipboard operation
cloud_controller_ng copied to clipboard

::CompositeIO & ::Parts deprecation warnings

Open samcolson4 opened this issue 3 years ago • 1 comments

Issue

When running unit tests, several deprecation warnings appear:

Top level ::CompositeIO is deprecated, require 'multipart/post' and use `Multipart::Post::CompositeReadIO` instead!
Top level ::Parts is deprecated, require 'multipart/post' and use `Multipart::Post::Parts` instead!

Steps to Reproduce

Run unit tests: bundle exec rake spec:all spec/unit/middleware/rate_limiter_v2_api_spec.rb

Expected result

No deprecation warnings should be shown.

Current result

Deprecation warnings are shown, as above.

Possible Fix

The faraday-multipart dependency on multipart-post is known to be a common cause. This gem has been updated to a new version which could be used.

samcolson4 avatar Sep 27 '22 15:09 samcolson4

Had a bit of a delve into this, but haven't had a chance to try fixes yet.

The two warnings are emitted (here and here) by versions above 2.2.0 of the gem multipart-post. We're consuming v2.2.3.

multipart-post is a child dependency of v0.17.5 of faraday, and it looks to me like the first version of that which won't suffer from this is going to be v2.0.0, which actually removed multipart-post entirely as a dependency. This is roughly how we're consuming multipart-post at the moment:

  • multipart-post 2.2.3
    • faraday 0.17.5
      • faraday_middleware 0.14.0
        • azure-core 0.1.15
          • azure-stoage (fork based on v1.1.0)
            • fog-azure-rm (a special branch for CF: fog-arm-cf)

will-gant avatar Oct 11 '22 17:10 will-gant

Fixed with #3259.

philippthun avatar Apr 24 '23 14:04 philippthun