Skip to content

admission: validate spec.desire - #5

Merged
CMGS merged 1 commit into
mainfrom
feat/validate-spec-desire
Jul 26, 2026
Merged

admission: validate spec.desire#5
CMGS merged 1 commit into
mainfrom
feat/validate-spec-desire

Conversation

@CMGS

@CMGS CMGS commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

What

  • Bump cocoon-common to 32dacef, which adds HibernationDesire.IsValid() — until now the only spec enum without the standard validity machinery.
  • Deny CocoonHibernation CREATE when spec.desire is not Hibernate/Wake, matching the belt-and-suspenders enum checks the CocoonSet validator already applies to every other spec enum. Previously a bad desire was accepted at admission and only surfaced asynchronously as a Failed phase from the operator.

Verified

go test -race ./... (2/2 ok, new TestValidateCocoonHibernationRejectsInvalidDesire), make lint (linux + darwin, 0 issues), asl ./... (both GOOS).

@CMGS
CMGS merged commit e981b92 into main Jul 26, 2026
2 checks passed
@CMGS
CMGS deleted the feat/validate-spec-desire branch July 26, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant