fix: runner token expiration renewal#305
Conversation
82874e5 to
91b0933
Compare
|
@BoxBoxJason left some comments even though it is a draft i would like to have this personally. |
|
Hey there ! Thanks for this pre review with very good insights. I will implement your suggestions and fixes this week end. |
|
@BoxBoxJason could you rebase this one too and also remove the draft status? Because i think we're quite close to merging |
a1faeb0 to
7eee0d1
Compare
|
Hello ! I just performed the rebase, I will have more time this thursday to perform all tests and remove the draft status confidently ! |
|
Turns out you were right ! Observation did not properly persist renewAt / createdAt fields set in Create Tell me what you think about this revised (and this time properly tested) version |
bd83edb to
a9765a4
Compare
|
Hey there @henrysachs Any news about the review / merge ? I think there is a missconfig with the codecov, all changes added here are fully covered. (except api type declarations which cannot be) |
Signed-off-by: BoxBoxJason <contact@boxboxjason.dev>
Signed-off-by: BoxBoxJason <contact@boxboxjason.dev>
Signed-off-by: BoxBoxJason <contact@boxboxjason.dev>
Signed-off-by: BoxBoxJason <contact@boxboxjason.dev>
Signed-off-by: BoxBoxJason <contact@boxboxjason.dev>
Signed-off-by: BoxBoxJason <contact@boxboxjason.dev>
Signed-off-by: BoxBoxJason <contact@boxboxjason.dev>
Signed-off-by: BoxBoxJason <contact@boxboxjason.dev>
a9765a4 to
86ffb4f
Compare
markussiebert
left a comment
There was a problem hiding this comment.
Approving. Reviewed the runner token auto-renewal end-to-end:
- Rotation uses
ResetRunnerAuthenticationTokenfromUpdate()(keeps the runner ID);Observe()returnsResourceExists: true, ResourceUpToDate: falsewhen due — no recreate/orphaning. - Token timestamps bridge
Create()->Observe()via annotations (status is reverted after Create; annotations persist via UpdateCriticalAnnotations) and settle in status on the Update path; I traced the rotation cycle and it settles to a single reset — no storm. renewBeforeDays > lifetimeis guarded (!renewAt.After(createdAt)), preventing perpetual resets.- All four of @henrysachs's review comments are addressed, and tests encode the intended reset-on-Update semantics.
Verified go build ./..., full go test ./..., and golangci-lint green on current master (Go 1.26.4). The only red check is the soft codecov coverage delta.
Description of your changes
This PR adds an automatic renewal mechanism on runner token expiration for the project, group & instance runners.
All of the changes are covered by unit tests
Fixes #304
I have:
make reviewable testto ensure this PR is ready for review.How has this code been tested
I have:
unexpected drift. (should result in recreation of the resource if applicable)
unexpected drift. (should result in an update of the resource if applicable)