Show lease time of reservations in the UI - #2317
Open
romanlum wants to merge 3 commits into
Open
Conversation
✅ Deploy Preview for beryju-gravity canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2317 +/- ##
==========================================
+ Coverage 69.79% 69.81% +0.02%
==========================================
Files 140 140
Lines 7733 7739 +6
==========================================
+ Hits 5397 5403 +6
Misses 1794 1794
Partials 542 542
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expiry == -1sentinel for DHCP reservations with an explicitreservationboolean field on leases, so a reservation's actual last-issued lease time can still be tracked and shown instead of being overwritten by the sentinel.Expiryis still updated on eachPutfor informational display; legacy records withexpiry: -1are migrated toreservation: trueon read.reservationfield, and show "last leased until" for reservations that have an actual expiry.Test plan
pkg/roles/dhcp: added unit tests forIsReservation(), legacyexpiry: -1migration inleaseFromKV, and thatPut/CreateLeaseIfAbsentskip granting an etcd TTL lease for reservations while still trackingExpiry.pkg/roles/dhcp: added API-level tests (APILeasesPut/APILeasesGet) verifying thereservationfield round-trips through the API.go test -p 1 ./pkg/roles/dhcp/... ./pkg/convert/...passes locally against etcd.🤖 Generated with the help of Claude Code