-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Pass warning back from response so we can tell if there is a problem with prometheus #648
Conversation
Signed-off-by: Brian Gibbins <briangibbins@rentalcars.com>
… back from api (always nil atm) Signed-off-by: Brian Gibbins <briangibbins@rentalcars.com>
I wonder |
As you mentioned warnings is hardcoded to Is there any reason to not just remove this from the interface/client? What meaningful warning could this return that would not just be an error? Regarding the change in question. I would like to see the prometheus warnings returned from apiClient Do method. @beorn7, IMO the full change should be:
|
Thanks @joe-elliott for all the insight. I have a closer look ASAP. |
First of all, my apologies for the long delay. It was a really busy month full of conferences. @joe-elliott what you are writing makes sense to me. The warnings in the "top level" client were introduced in 1335ef4 by @jacksontj . @jacksontj was there a reason to have warnings in the If not, I'd just go forward with @joe-elliott 's suggestions. Thanks, everyone. |
The warnings should be passed back -- they were initially added in #562 so the warnings shouldn't always be nil -- how can I reproduce the error you are seeing (not getting warnings back)? |
It looks to me that the methods of This PR illustrates where warnings are not propagated, i.e. |
@beorn7 re-reading the code I also don't see how it ever worked. It seems that the tests there pass because it mocks out the client as well -- so not a great test. So +1 from me for this PR :) |
Thanks for clarifying. I still think we should do wath @joe-elliott suggested. @eroteme are you up for it? Otherwise, @joe-elliott or I could do it. |
@joe-elliott has kindly picked up this issue and created #699, which supersedes this PR. |
@krasi-georgiev
Was having a problem with prometheus not giving back expected results. Seems that warnings where always passing back nil (from the client). So added a simple fix to merge the warnings back from the client with warnings back rom the response.
Signed-off-by: Brian Gibbins brian.eroteme@gmail.com