Skip to content

fix: stamp uid and creation timestamp on objects the server writes itself - #125

Merged
scotwells merged 1 commit into
mainfrom
fix/provisioned-object-metadata
Sep 23, 2026
Merged

scotwells merged 1 commit into
mainfrom
fix/provisioned-object-metadata

Conversation

@scotwells

@scotwells scotwells commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

kubectl get ippools reports 0001-01-01T00:00:00Z for every pool a class provisioned; only the hand-created roots show a real time.

Provisioned pools and the IPAllocation a claim materialises are written straight into the object table rather than POSTed, so neither passed through the create path that stamps metadata.uid and metadata.creationTimestamp. The missing UID is the more consequential half: an owner reference names a UID, so nothing could own or be owned by a provisioned pool.

Change

Both write paths stamp the fields before the insert.

Migration 005 repairs existing rows. The timestamp comes from that row's own created_at, so a repaired object says what it would have said at the time; the UID is generated, since nothing references these yet. Rows are reversioned with a MODIFIED changelog entry so watches opened before the migration do not keep serving the unstamped object.

Left out

Down is a no-op — the migration does not record which document was missing which field, and stripping every UID and timestamp would break the objects that always had them.

…self

Pools provisioned by a class cascade and the IPAllocation a claim materialises
are written straight into the object table, so neither passed through the
create path that stamps metadata.uid and metadata.creationTimestamp. Every
provisioned pool reported 0001-01-01T00:00:00Z and carried no UID, so nothing
could take an owner reference to one.

Both write paths now stamp the fields, and migration 005 repairs existing rows:
the timestamp comes from the row's own created_at, the UID is generated. The
repair is reversioned so watchers see it.
@scotwells
scotwells marked this pull request as ready for review September 22, 2026 23:59
@scotwells
scotwells merged commit 3f14721 into main Sep 23, 2026
11 checks passed
@scotwells
scotwells deleted the fix/provisioned-object-metadata branch September 23, 2026 00:10
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.

2 participants