Skip to content
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

chore(deps) use google/uuid instead of k8s.io/apimachinery/pkg/util/uuid #2886

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

michaelbeaumont
Copy link
Contributor

@michaelbeaumont michaelbeaumont commented Oct 4, 2021

Summary

Use google/uuid to generate UUIDs

@jpeach
Copy link
Contributor

jpeach commented Oct 4, 2021

Maybe the inverse change is preferred?

#2798

Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
@michaelbeaumont michaelbeaumont changed the title chore(deps) use k8s.io/apimachinery/pkg/util/uuid everywhere instead of google/uuid chore(deps) use google/uuid instead of k8s.io/apimachinery/pkg/util/uuid Oct 5, 2021
@michaelbeaumont
Copy link
Contributor Author

True, updated this PR

@codecov-commenter
Copy link

Codecov Report

Merging #2886 (b1d9ee8) into master (851bc8d) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2886      +/-   ##
==========================================
+ Coverage   52.31%   52.34%   +0.02%     
==========================================
  Files         900      900              
  Lines       52296    52296              
==========================================
+ Hits        27361    27373      +12     
+ Misses      22756    22743      -13     
- Partials     2179     2180       +1     
Impacted Files Coverage Δ
pkg/xds/generator/direct_access_proxy_generator.go 82.75% <0.00%> (-1.15%) ⬇️
api/observability/v1/mads.pb.go 35.56% <0.00%> (+1.03%) ⬆️
pkg/mads/v1/client/client.go 43.75% <0.00%> (+2.50%) ⬆️
pkg/core/bootstrap/autoconfig.go 54.46% <0.00%> (+8.03%) ⬆️

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 851bc8d...b1d9ee8. Read the comment docs.

@michaelbeaumont michaelbeaumont merged commit 08f5c6e into kumahq:master Oct 5, 2021
@jpeach
Copy link
Contributor

jpeach commented Oct 5, 2021

@michaelbeaumont probably should use core.NewUUID?

@michaelbeaumont
Copy link
Contributor Author

Good point, I somehow didn't realize that's even an exported method. Is that written as a var for a reason? Is pkg/core meant to contain general utility functions like NewUUID?

@jpeach
Copy link
Contributor

jpeach commented Oct 5, 2021

Good point, I somehow didn't realize that's even an exported method. Is that written as a var for a reason? Is pkg/core meant to contain general utility functions like NewUUID?

Generally, I have seen this kind of thing used in test fixtures. I don't know that there's a general policy. I expect it's ad-hoc when someone needed a stable value for testing.

// overridden package variables
var backupNow func() time.Time
var backupNewUUID func() string
BeforeEach(func() {
backupNow = core.Now
backupNewUUID = core.NewUUID
})
AfterEach(func() {
core.Now = backupNow
core.NewUUID = backupNewUUID
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants