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

bring back the code from tinkerbell/dhcp #364

Merged
merged 11 commits into from
Jan 15, 2024

Conversation

jacobweinstock
Copy link
Member

Description

The DHCP library was created in order to provide a mechanism for the DHCP functionality to be written in a very clean and composible way. This was not possible with the previous state of Boots and the personnel involved at that time.

The current state of Smee is ready for this functionality to be returned and placed in a very clean and composable way into the code base.

Moving this functionality back in will improve the development process/experience. It is important to note that we do take on the trade off of not having the combined commit history of the DHCP library within Smee. We won't lose the commit history entirely as the DHCP library GitHub repo will remain (archived) in order to have the commit history available.

Why is this needed

Fixes: #

How Has This Been Tested?

How are existing users impacted? What migration steps/scripts do we need?

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

@chrisdoherty4
Copy link
Member

Given we aren't in the business of maintaining libraries, would you be open to nesting under a top level internal package?

Copy link

codecov bot commented Dec 16, 2023

Codecov Report

Attention: 64 lines in your changes are missing coverage. Please review.

Comparison is base (dea4bd4) 28% compared to head (a21ff7d) 68%.

Files Patch % Lines
internal/dhcp/dhcp.go 66% 13 Missing and 5 partials ⚠️
internal/dhcp/handler/reservation/handler.go 89% 10 Missing and 6 partials ⚠️
internal/backend/file/file.go 92% 8 Missing and 4 partials ⚠️
internal/backend/kube/kube.go 95% 3 Missing and 3 partials ⚠️
internal/dhcp/handler/reservation/option.go 95% 2 Missing and 2 partials ⚠️
internal/ipxe/script/ipxe.go 0% 4 Missing ⚠️
internal/dhcp/otel/otel.go 98% 1 Missing and 1 partial ⚠️
cmd/smee/main.go 0% 1 Missing ⚠️
internal/backend/kube/error.go 50% 1 Missing ⚠️
Additional details and impacted files
@@         Coverage Diff          @@
##           main   #364    +/-   ##
====================================
+ Coverage    28%    68%   +40%     
====================================
  Files         5     15    +10     
  Lines       481   1297   +816     
====================================
+ Hits        136    893   +757     
- Misses      337    375    +38     
- Partials      8     29    +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The DHCP library was created in order to
provide a mechanism for the DHCP functionality
to be written in a very clean and composible way.
This was not possible with the previous state of Boots
and the personnel involved at that time.

The current state of Smee is ready for this functionality
to be return and placed in a very clean and composible way
into the code base.

Moving this functionality back in will improve the development
process/experience. It is important to note that we do take on
the trade off of not having the combined commit history of the library
within Smee. The library GitHub repo will still contain history.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
The noop handler is cleaner by not taking
the backend pkg as a dependency. Especially
seems the noop backend was only use in the reservation
handler.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
This minimizes our public/external API surface.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
@jacobweinstock jacobweinstock merged commit a416dd9 into tinkerbell:main Jan 15, 2024
3 checks passed
@jacobweinstock jacobweinstock deleted the unify branch January 15, 2024 15:47
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

2 participants