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

chore(distributor): cleanup of package structure #7028

Merged
merged 2 commits into from
Mar 2, 2022

Conversation

warber
Copy link
Contributor

@warber warber commented Mar 1, 2022

The distributor code did not follow a clean package structure.
This PR tries to improve on this. Packages are now much smaller and semantically divided as much as possible:

image

Moreover I did a bit of renaming and enhanced the unit tests to use random ports when starting the embedded NATS server.

Signed-off-by: warber <bernd.warmuth@dynatrace.com>
@warber warber requested a review from a team as a code owner March 1, 2022 16:17
@warber warber changed the title chore(distributor): cleanip of package structure chore(distributor): cleanup of package structure Mar 1, 2022
@codecov
Copy link

codecov bot commented Mar 1, 2022

Codecov Report

Merging #7028 (0c56879) into master (d596efb) will decrease coverage by 0.07%.
The diff coverage is 78.37%.

@@            Coverage Diff             @@
##           master    #7028      +/-   ##
==========================================
- Coverage   57.74%   57.67%   -0.08%     
==========================================
  Files         511      511              
  Lines       29547    29544       -3     
  Branches     1378     1378              
==========================================
- Hits        17063    17039      -24     
- Misses      11252    11272      +20     
- Partials     1232     1233       +1     
Impacted Files Coverage Δ
distributor/pkg/clientget/client.go 78.57% <ø> (ø)
distributor/pkg/utils/utils.go 80.98% <60.00%> (ø)
distributor/pkg/forwarder/forwarder.go 47.09% <66.66%> (ø)
distributor/pkg/uniform/log/uniformlog.go 71.87% <66.66%> (ø)
distributor/pkg/poller/poller.go 68.88% <85.71%> (ø)
distributor/pkg/receiver/receiver.go 61.01% <90.00%> (ø)
...utor/pkg/natsconnection/nats_connection_handler.go 77.77% <100.00%> (ø)
...stributor/pkg/uniform/controlplane/controlplane.go 97.64% <100.00%> (ø)
distributor/pkg/uniform/watch/uniformwatch.go 60.00% <100.00%> (ø)
... and 1 more
Flag Coverage Δ
distributor 70.17% <78.37%> (-2.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Signed-off-by: warber <bernd.warmuth@dynatrace.com>
@sonarcloud
Copy link

sonarcloud bot commented Mar 2, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@RealAnna RealAnna left a comment

Choose a reason for hiding this comment

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

LGTM

@warber warber merged commit e97875c into master Mar 2, 2022
@warber warber deleted the chore/distributor-package-restructuring branch March 2, 2022 10:02
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