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

refactor(*): replace ensureDefaultXXX functions with a single generic function #3662

Merged

Conversation

tharun208
Copy link
Contributor

Summary

replace ensureDefaultXXX functions with a single generic function

Full changelog

  • [Implement ...]
  • [Fix ...]

Issues resolved

Fix #2540

Documentation

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

Backwards compatibility

  • Update UPGRADE.md with any steps users will need to take when upgrading.
  • Add backport-to-stable label if the code follows our backporting policy

@tharun208 tharun208 requested a review from a team as a code owner January 7, 2022 07:23
@tharun208 tharun208 changed the title refractor(*): replace ensureDefaultXXX functions with a single generic function refactor(*): replace ensureDefaultXXX functions with a single generic function Jan 7, 2022
… function

Fixes kumahq#2540

Signed-off-by: Tharun <rajendrantharun@live.com>
@tharun208 tharun208 force-pushed the refractor/ensureDefaultFunctionsForResource branch from 72afe1b to a36ba74 Compare January 7, 2022 07:24
@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2022

Codecov Report

Merging #3662 (2837f85) into master (6d49f57) will decrease coverage by 0.02%.
The diff coverage is 68.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3662      +/-   ##
==========================================
- Coverage   50.99%   50.97%   -0.03%     
==========================================
  Files         927      927              
  Lines       56468    56416      -52     
==========================================
- Hits        28798    28756      -42     
+ Misses      25380    25374       -6     
+ Partials     2290     2286       -4     
Impacted Files Coverage Δ
pkg/core/managers/apis/mesh/mesh_manager.go 46.91% <0.00%> (ø)
pkg/defaults/mesh/circuit_breaker.go 100.00% <ø> (+25.00%) ⬆️
pkg/defaults/mesh/retry.go 100.00% <ø> (+25.00%) ⬆️
pkg/defaults/mesh/timeout.go 100.00% <ø> (+25.00%) ⬆️
pkg/defaults/mesh/traffic_permission.go 100.00% <ø> (+25.00%) ⬆️
pkg/defaults/mesh/traffic_route.go 100.00% <ø> (+25.00%) ⬆️
...untime/k8s/controllers/mesh_defaults_controller.go 25.00% <0.00%> (ø)
pkg/defaults/mesh/mesh.go 71.92% <75.00%> (-3.08%) ⬇️
pkg/defaults/mesh/signing_key.go 60.00% <100.00%> (-3.64%) ⬇️
pkg/plugins/leader/postgres/leader_elector.go 93.61% <0.00%> (-6.39%) ⬇️
... and 6 more

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 6d49f57...2837f85. Read the comment docs.

Copy link
Contributor

@lahabana lahabana left a comment

Choose a reason for hiding this comment

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

Some minor comments but LGTM thanks for this patch!

pkg/defaults/mesh/retry.go Outdated Show resolved Hide resolved
pkg/defaults/mesh/mesh.go Outdated Show resolved Hide resolved
Signed-off-by: Tharun <rajendrantharun@live.com>
@tharun208 tharun208 force-pushed the refractor/ensureDefaultFunctionsForResource branch from 8c2d41a to 2837f85 Compare January 7, 2022 08:45
@lahabana
Copy link
Contributor

lahabana commented Jan 7, 2022

@tharun208 please don't force push :)

Signed-off-by: Tharun <rajendrantharun@live.com>
Copy link
Contributor

@lahabana lahabana left a comment

Choose a reason for hiding this comment

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

Thanks for the patch!

@tharun208 tharun208 force-pushed the refractor/ensureDefaultFunctionsForResource branch from f07694a to 6855fd3 Compare January 7, 2022 10:51
@lahabana lahabana merged commit 2666c13 into kumahq:master Jan 7, 2022
@tharun208 tharun208 deleted the refractor/ensureDefaultFunctionsForResource branch January 7, 2022 16:37
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.

Replace ensureDefaultXXX functions with a single generic function
3 participants