WeAreFarmGeek / diplomat

A HTTP Ruby API for Consul
BSD 3-Clause "New" or "Revised" License
370 stars 116 forks source link

WARNING: Unexpected middleware set after the adapter. This won't be supported from Faraday 1.0. #148

Closed EugenMayer closed 7 years ago

EugenMayer commented 7 years ago

This seems to get cause by diplomat nowdas:

WARNING: Unexpected middleware set after the adapter. This won't be supported from Faraday 1.0.

see https://github.com/lostisland/faraday/commit/067be864a67e791e6766253ce4ef3f5c740caf70

EugenMayer commented 7 years ago

in case that is of any importance, all i configure for diplomat is:

Diplomat.configure do |config|
        config.url = "#{address}:#{port}"
        if token
          config.acl_token = token
        end
      end

Not sure if this actually does trigger any middleware layer to be reconfigured or whatever

EugenMayer commented 7 years ago

According to https://github.com/lostisland/faraday/pull/685 it is related to https://github.com/WeAreFarmGeek/diplomat/blob/master/lib/diplomat/rest_client.rb#L84 and the order of https://github.com/WeAreFarmGeek/diplomat/blob/master/lib/diplomat/rest_client.rb#L84 / https://github.com/WeAreFarmGeek/diplomat/blob/master/lib/diplomat/rest_client.rb#L85

See my pull request to fix it

EugenMayer commented 7 years ago

@johnhamelink thanks for taking action, very appreciated