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

fix: move compression.go into confighttp.go #4651

Merged
merged 13 commits into from
Jan 13, 2022

Conversation

hyunuk
Copy link
Contributor

@hyunuk hyunuk commented Jan 7, 2022

Description:

This PR moved every code in internal/middleware/compression.go to config/confighttp.go and tests as well.
It also changed functions unexported except CompressionType.

Note: Functions in compression.go was iniatially created for otlphttpexporter, but it was changed to the confighttp in this PR(see #4441 and the code).

Link to tracking Issue:
#4627

@hyunuk hyunuk requested a review from a team as a code owner January 7, 2022 01:42
@hyunuk hyunuk requested a review from Aneurysm9 January 7, 2022 01:42
@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #4651 (bea771c) into main (87365b7) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4651   +/-   ##
=======================================
  Coverage   90.74%   90.74%           
=======================================
  Files         179      180    +1     
  Lines       10652    10652           
=======================================
  Hits         9666     9666           
  Misses        765      765           
  Partials      221      221           
Impacted Files Coverage Δ
config/configcompression/compressionType.go 100.00% <100.00%> (ø)
config/configgrpc/configgrpc.go 92.57% <100.00%> (ø)
config/confighttp/compression.go 78.30% <100.00%> (ø)
config/confighttp/confighttp.go 100.00% <100.00%> (ø)

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 87365b7...bea771c. Read the comment docs.

Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

Not sure if it is ok to make configgrpc depend on confighttp. Can we maybe consider a configcompression? Idea being other protocols (e.g. plain UDP) can use these constants as well.

Another option is confignet? Personally I prefer configcompression, any thoughts @tigrannajaryan @open-telemetry/collector-approvers ?

config/configgrpc/configgrpc.go Show resolved Hide resolved
config/configgrpc/configgrpc.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
config/configgrpc/configgrpc.go Show resolved Hide resolved
config/confighttp/confighttp.go Outdated Show resolved Hide resolved
@bogdandrutu
Copy link
Member

please fix lint

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.

None yet

5 participants