refactor: fold controllers/jointoken into bootstrap/token #40

Merged
mikluko merged 1 commit from move-jointoken into main 2026-12-01 06:34:55 +00:00
Owner

Move of the layout by concept (map kit-a1f, ticket kit-a1f.8): controllers/jointoken folds into bootstrap/token. Releasing a join token is part of the token's life, and every package that imports the release also imports bootstrap/token.

Inside token, the names gain Release: ReleaseController, NewReleaseController, ReleasePredicate. Releaser keeps its name. A bare token.Controller would not say what it controls. The old path forwards through //go:fix inline for one release, and internal/example was moved by go fix ./.... Package names differ here, so no alias appears.

🤖 Generated with Claude Code

Move of the layout by concept (map kit-a1f, ticket kit-a1f.8): `controllers/jointoken` folds into `bootstrap/token`. Releasing a join token is part of the token's life, and every package that imports the release also imports `bootstrap/token`. Inside `token`, the names gain `Release`: `ReleaseController`, `NewReleaseController`, `ReleasePredicate`. `Releaser` keeps its name. A bare `token.Controller` would not say what it controls. The old path forwards through `//go:fix inline` for one release, and `internal/example` was moved by `go fix ./...`. Package names differ here, so no alias appears. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
refactor: fold controllers/jointoken into bootstrap/token
All checks were successful
CI / changelog (pull_request) Successful in 1s
Vulnerabilities / govulncheck (pull_request) Successful in 0s
CI / verify (pull_request) Has been skipped
Vulnerabilities / govulncheck-1 (pull_request) Successful in 10s
CI / check (pull_request) Successful in 1m56s
CI / ci (pull_request) Successful in 0s
dc3c3b232a
Releasing a join token is part of its life, and every importer of the
release also imports bootstrap/token (kit-a1f). In token the names gain
Release: a bare Controller or Predicate there says nothing. The old path
forwards through go:fix inline for one release.

Closes kit-a1f.8.

Assisted-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Green from provider-netactuate at dc3c3b2. We use jointoken.NewController, which inlines to token.NewReleaseController. Controller, Releaser and Predicate forward too.

Green from provider-netactuate at dc3c3b2. We use jointoken.NewController, which inlines to token.NewReleaseController. Controller, Releaser and Predicate forward too.
Author
Owner

Green from the exoscale session at dc3c3b2. I ran it against provider-exoscale main with a replace: it builds through the stub, and go fix rewrites jointoken.NewController to token.NewReleaseController in setup.go, reusing the existing token import. vet and test pass after.

Green from the exoscale session at dc3c3b2. I ran it against provider-exoscale main with a replace: it builds through the stub, and go fix rewrites jointoken.NewController to token.NewReleaseController in setup.go, reusing the existing token import. vet and test pass after.
Author
Owner

Green from provider-hetzner at dc3c3b2. I ran a trial against a copy of hetzner main with replace sarak.sh/karpenter/kit => <this head>:

  • Before go fix: builds, vets and passes its tests through the forwarders unchanged.
  • go fix: rewrites pkg/bootstrap/jointoken.go to token.NewReleaseController and *token.ReleaseController, and the test's IsType, with no alias needed because hetzner already imports bootstrap/token. Afterwards it builds, vets and passes its tests.

The same cosmetic note as on #39: in app_test.go the new import lands in the provider's local group.

Green from provider-hetzner at dc3c3b2. I ran a trial against a copy of hetzner `main` with `replace sarak.sh/karpenter/kit => <this head>`: - **Before go fix:** builds, vets and passes its tests through the forwarders unchanged. - **go fix:** rewrites `pkg/bootstrap/jointoken.go` to `token.NewReleaseController` and `*token.ReleaseController`, and the test's `IsType`, with no alias needed because hetzner already imports `bootstrap/token`. Afterwards it builds, vets and passes its tests. The same cosmetic note as on #39: in `app_test.go` the new import lands in the provider's local group.
mikluko deleted branch move-jointoken 2026-12-01 06:34:55 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
karpenter/kit!40
No description provided.