-
Notifications
You must be signed in to change notification settings - Fork 47
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: refactor networkedge to Internal/ #622
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #622 +/- ##
===========================================
- Coverage 60.46% 14.43% -46.04%
===========================================
Files 106 45 -61
Lines 18760 4018 -14742
===========================================
- Hits 11344 580 -10764
+ Misses 6896 3411 -3485
+ Partials 520 27 -493 ☔ View full report in Codecov by Sentry. |
The best way to advance this PR will be to split out the helper refactorings into separate (easy to review) PRs. This will prevent the creeping in of new code with the patterns we want to move away from. |
Extracted from #622 Also ran goimports for clean up (triggered by stray imports based test failure)
Remove isStringInSlice in favor of slices.Contains. Extracted from #622 Related to #665 Signed-off-by: Marques Johansson <[email protected]>
d6b13e7
to
f3b96d7
Compare
This PR moves the helper functions from provider.go to a new comparisons package. This package will be used by provider, tests, and resources. The refactoring will assist with splitting resources into resource specific packages. #106 The previous helper functions have been deprecated and will be removed in a future commit. Extracted from #622 (PR grew to large to maintain. Refactoring is not a priority and rebasing gets hard as the underlying code changes) Related to #674 Related to #654 Signed-off-by: Marques Johansson <[email protected]>
f3b96d7
to
20a6b6b
Compare
@ctreatma @equinix/governor-ne-network-edge-engineering I updated this refactor branch and The biggest trick was moving the There are a few more rounds of cleanup that could happen to make this PR easier to review:
|
// from https://stackoverflow.com/a/45428032 | ||
func Difference(a, b []string) []string { | ||
mb := make(map[string]struct{}, len(b)) | ||
// Difference returns the elements in `a` that aren't in `b`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
making Difference
use generics doesn't have to be done in this PR.
#720 should be merged ahead of this so this PR can rebase and apply the sweeper related changes from that PR |
8709181
to
2404fa2
Compare
After the latest rebase to pickup sweeper changes, and some changes to use SetMap (and a diag equivalent) for which more will be needed, there are new errors:
I'm wondering if the init() calls in acceptance_test.go are not initializing the provider list correctly for cross-package testing. |
Signed-off-by: Marques Johansson <[email protected]>
Signed-off-by: Marques Johansson <[email protected]>
Signed-off-by: Marques Johansson <[email protected]>
Signed-off-by: Marques Johansson <[email protected]>
Signed-off-by: Marques Johansson <[email protected]>
Signed-off-by: Marques Johansson <[email protected]>
Signed-off-by: Marques Johansson <[email protected]>
…ovider-equinix on networkedge files Signed-off-by: Marques Johansson <[email protected]>
7fb2dce
to
921c699
Compare
Part of #106 (experimenting to gauge scope of work)
Build appears fine, tests need more refactoring of constants shared between Fabric and NE.