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

[service] Split component.Host functionality into separate serviceHost struct #5292

Merged
merged 2 commits into from
Apr 29, 2022

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented Apr 29, 2022

Description:

Moves service functionality related to component.Host and zpages into a new serviceHost struct. This is an internal refactor only, with the goal of more easily visualizing what it would take to eventually expose the service struct.

Link to tracking Issue: I opened this because of the discussion in #5149. I want to do internal refactors to move towards eventually exposing service. Even if we don't end up going in that route, I think this is an improvement of the code and should be merged regardless.

Testing: Amended unit tests

Documentation: n/a, internal refactor only

@mx-psi mx-psi added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Apr 29, 2022
@mx-psi mx-psi requested review from a team and bogdandrutu April 29, 2022 11:03
@mx-psi mx-psi changed the title [service] Split component.Host functionality into separate service.Host [service] Split component.Host functionality into separate serviceHost struct Apr 29, 2022
@codecov
Copy link

codecov bot commented Apr 29, 2022

Codecov Report

Merging #5292 (1ced543) into main (2acc422) will decrease coverage by 0.00%.
The diff coverage is 74.50%.

@@            Coverage Diff             @@
##             main    #5292      +/-   ##
==========================================
- Coverage   90.57%   90.56%   -0.01%     
==========================================
  Files         189      190       +1     
  Lines       11116    11113       -3     
==========================================
- Hits        10068    10065       -3     
  Misses        826      826              
  Partials      222      222              
Impacted Files Coverage Δ
service/service.go 42.64% <40.90%> (-10.37%) ⬇️
service/host.go 100.00% <100.00%> (ø)
service/telemetry.go 76.25% <100.00%> (ø)
service/zpages.go 70.33% <100.00%> (ø)
pdata/internal/generated_plog.go 96.65% <0.00%> (-0.07%) ⬇️

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 2acc422...1ced543. 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.

LGTM, one comment

service/service.go Outdated Show resolved Hide resolved
@bogdandrutu
Copy link
Member

@mx-psi I would kindly ask you in a followup PR to split tests (make them really unit tests)... Pretty please 🙏

@mx-psi
Copy link
Member Author

mx-psi commented Apr 29, 2022

@mx-psi I would kindly ask you in a followup PR to split tests (make them really unit tests)... Pretty please 🙏

You mean moving the service/service_test.go tests that test the host only to a service/host_test.go file? Sure, I will do that in a follow up PR!

@bogdandrutu bogdandrutu merged commit 041f398 into open-telemetry:main Apr 29, 2022
@mx-psi mx-psi deleted the mx-psi/split-service-and-host branch April 29, 2022 15:14
@bogdandrutu
Copy link
Member

bogdandrutu commented Apr 29, 2022

@mx-psi you are on spot :) Also may require some refactoring :))))

@mx-psi
Copy link
Member Author

mx-psi commented May 5, 2022

I have 15 things in flight that I need to tackle before going on PTO next week, so I put this on an issue so that I don't forget about it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants