-
Notifications
You must be signed in to change notification settings - Fork 116
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
Not working with ruby 2.5 #171
Comments
Weird, what is your call exactly? How did you configure the lib? |
oh, huh… i see that now with ruby 2.5, too. passing faraday middleware options for which middleware to load doesn't seem to work for me, but that will solve it. either that, or when setting up a connection manually with faraday under ruby 2.5.1 here, this works just fine. i haven't finished making these changes and testing in a branch yet, but i'd start here. |
@EugenMayer @rockpapergoat How? Can you please try this? Create file test.rb (executable):
Run it with (You can replace CONSUL_HTTP_ADDR with the value of the consul agent you are targeting) On my side, with ruby-2.5.3, working quite well... |
sorry for the delay. my issue was not specifying the full path to the key. ubuntu 16.04/ruby 2.5.1 worked/works fine, as far as i can tell. |
@pierresouchay its all up there
|
@EugenMayer So, I suspect you are using :
right? Using:
Would probably fix your issue (note that I removed the first '/') @EugenMayer Can you confirm this? |
Well @pierresouchay i am not sure you are right about that, since in this case, the request is wrapped by https://github.com/markround/tiller - but i remember having issues with my direct ruby diplomat implementation. Still looking at the error and the cause it seem viable - still why did this happen with ruby 2.5 but not with < 2.5? Does not make sense this redirect is only triggered then. Probably in 2.5 the redirect is not followed automatically, similar to curls Thanks |
@EugenMayer might be. I definitely have a 302 if using /anykey for a KV.get(). This is a problem anyway, because I am not sure of behavior if using put for instance. There might be a change in ruby to default following 302 from 2.4 to 2.5, but we might simply fix this globally in diplomat if self to avoid this behavior |
* Avoid having a HTTP 302 if key requested starts with '/' This might fix: #171 * Fixed rubocop warning
When working with 2.5 ( e.g. ruby:2.5-slim-stretch official docker image )
One gets a 301 moved permanently on each KV access
The text was updated successfully, but these errors were encountered: