feat(cloudprovider): NoneLaunched, NoneAvailableEvent, Launcher.RecordCreate #36
Loading…
Reference in a new issue
No description provided.
Delete branch "cloudprovider-none-available"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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).
NoneLaunchedmatches a type of its own. Checking for insufficient capacity wrappingErrNoInstancewould also match aRefusederror.internal/examplepublishes the event, and its tests check it.🤖 Generated with Claude Code
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-hetzner at
21b5435. The change is additive, andLaunch's recorded codes are unchanged now thatCodeOtheris set explicitly. The truncation is correct at the boundary: the é case lands on 1023 bytes as the test expects.NoneLaunchedsurvivesCreateErrorand 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
NoneAvailableEventandRecordCreate(for its adoption path) in a later bump.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.