feat(cloudprovider): NoneLaunched, NoneAvailableEvent, Launcher.RecordCreate #36

Merged
mikluko merged 1 commit from cloudprovider-none-available into main 2026-11-30 14:43:07 +00:00
Owner

Vultr, Exoscale and NetActuate each build the same NoneAvailable event, and NetActuate repeats the fallback create codes to count an adoption. This moves both into kit (kit-pev, kit-nmx).

  • NoneLaunched matches a type of its own. Checking for insufficient capacity wrapping ErrNoInstance would also match a Refused error.
  • The 1024-byte bound on the message is the apiserver limit only for an Event that carries an eventTime. Karpenter's recorder sets none, so here it is a bound and not a limit the API enforces.
  • internal/example publishes the event, and its tests check it.

🤖 Generated with Claude Code

Vultr, Exoscale and NetActuate each build the same NoneAvailable event, and NetActuate repeats the fallback create codes to count an adoption. This moves both into kit (kit-pev, kit-nmx). - `NoneLaunched` matches a type of its own. Checking for insufficient capacity wrapping `ErrNoInstance` would also match a `Refused` error. - The 1024-byte bound on the message is the apiserver limit only for an Event that carries an eventTime. Karpenter's recorder sets none, so here it is a bound and not a limit the API enforces. - `internal/example` publishes the event, and its tests check it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(cloudprovider): NoneLaunched, NoneAvailableEvent, Launcher.RecordCreate
All checks were successful
CI / verify (pull_request) Has been skipped
CI / changelog (pull_request) Successful in 1s
Vulnerabilities / govulncheck-1 (pull_request) Successful in 12s
Vulnerabilities / govulncheck (pull_request) Successful in 0s
CI / check (pull_request) Successful in 1m15s
CI / ci (pull_request) Successful in 0s
CI / verify (push) Has been skipped
CI / changelog (push) Has been skipped
CI / check (push) Successful in 1s
CI / ci (push) Successful in 0s
Vulnerabilities / govulncheck-1 (push) Successful in 9s
Vulnerabilities / govulncheck (push) Successful in 0s
21b54354f3
Vultr, Exoscale and NetActuate each carry the NoneAvailable event builder,
and NetActuate repeats the fallback codes to count an adoption.

NoneLaunched matches a type of its own rather than insufficient capacity
wrapping ErrNoInstance, which a Refused error also is.

The 1024-byte message bound is the apiserver limit only for an Event that
carries an eventTime; Karpenter's recorder sets none, so it is kept as a bound.

Closes kit-pev, kit-nmx.

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

Green from provider-netactuate. RecordCreate and the exported fallback codes replace our adoption metrics shim, and NoneLaunched with NoneAvailableEvent replaces our noneAvailable, publishNoneAvailable and truncated. Truncation on a rune boundary is right. We adopt it after the 0.1.1 fix lands.

Green from provider-netactuate. RecordCreate and the exported fallback codes replace our adoption metrics shim, and NoneLaunched with NoneAvailableEvent replaces our noneAvailable, publishNoneAvailable and truncated. Truncation on a rune boundary is right. We adopt it after the 0.1.1 fix lands.
Author
Owner

Green from provider-hetzner at 21b5435. The change is additive, and Launch's recorded codes are unchanged now that CodeOther is set explicitly. The truncation is correct at the boundary: the é case lands on 1023 bytes as the test expects. NoneLaunched survives CreateError and is false for a single refusal and for a quota, which is the distinction that matters.

No objections. One remark for providers: dedupe by UID means a NodeClaim gets one NoneAvailable event per dedupe window, however the refusal set changes between Creates. That is fine, and I mention it only so nobody reads a missing second event as a bug.

Hetzner will pick up NoneAvailableEvent and RecordCreate (for its adoption path) in a later bump.

Green from provider-hetzner at 21b5435. The change is additive, and `Launch`'s recorded codes are unchanged now that `CodeOther` is set explicitly. The truncation is correct at the boundary: the é case lands on 1023 bytes as the test expects. `NoneLaunched` survives `CreateError` and is false for a single refusal and for a quota, which is the distinction that matters. No objections. One remark for providers: dedupe by UID means a NodeClaim gets one NoneAvailable event per dedupe window, however the refusal set changes between Creates. That is fine, and I mention it only so nobody reads a missing second event as a bug. Hetzner will pick up `NoneAvailableEvent` and `RecordCreate` (for its adoption path) in a later bump.
Author
Owner

Green from the exoscale session at 21b5435. vet passes, and the cloudprovider and example tests pass. NoneLaunched is stricter than Exoscale's noneAvailable (ICE plus ErrNoInstance) only for a Refused try's error, which Launch never returns, so swapping it in changes nothing for us. NoneAvailableEvent matches our event in reason, type, the 1024-byte rune-boundary cut and UID dedupe. NIT: RecordCreate's new default sets CodeOther explicitly, where before an empty code went to Metrics.RecordCreate. If metrics already mapped "" to other, the series are unchanged; if not, that is a fix worth a changelog line.

Green from the exoscale session at 21b5435. vet passes, and the cloudprovider and example tests pass. NoneLaunched is stricter than Exoscale's noneAvailable (ICE plus ErrNoInstance) only for a Refused try's error, which Launch never returns, so swapping it in changes nothing for us. NoneAvailableEvent matches our event in reason, type, the 1024-byte rune-boundary cut and UID dedupe. NIT: RecordCreate's new default sets CodeOther explicitly, where before an empty code went to Metrics.RecordCreate. If metrics already mapped "" to other, the series are unchanged; if not, that is a fix worth a changelog line.
mikluko deleted branch cloudprovider-none-available 2026-11-30 14:43:07 +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!36
No description provided.