Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Set provider only if all methods are implemented #26

Merged
merged 7 commits into from
Jul 2, 2019
Merged

Conversation

anandswaminathan
Copy link
Contributor

Interface workqueue.MetricsProvider has backward incompatible interface in the newer versions of Client Go.

Until we permanently upgrade Flytestdlib to the new interface, a temp fix to make Flytestdlib work with newer versions of client-go

@codecov-io
Copy link

codecov-io commented Jul 2, 2019

Codecov Report

Merging #26 into master will increase coverage by 0.02%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #26      +/-   ##
==========================================
+ Coverage   70.34%   70.37%   +0.02%     
==========================================
  Files          51       51              
  Lines        1831     1836       +5     
==========================================
+ Hits         1288     1292       +4     
  Misses        429      429              
- Partials      114      115       +1
Impacted Files Coverage Δ
promutils/workqueue.go 71.42% <66.66%> (-0.99%) ⬇️
sets/generic_set.go 94.56% <0%> (+1.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8786594...40253c0. Read the comment docs.

var provider interface{} //nolint
provider = prometheusMetricsProvider{}
if p, casted := provider.(workqueue.MetricsProvider); casted {
workqueue.SetProvider(p)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you log a warning in the else clause?

@anandswaminathan anandswaminathan merged commit 2577ff2 into master Jul 2, 2019
eapolinario pushed a commit that referenced this pull request Sep 6, 2023
* Set provider only if all methods of interface are implemented
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants