Repository navigation
feat: serve Post, Release and ChangelogEntry - #23
Closed
mattdjenkinson wants to merge 1 commit into
Closed
mattdjenkinson wants to merge 1 commit into
mattdjenkinson wants to merge 1 commit into
Conversation
Postgres-backed storage for the three GitHub-synced kinds, with the field ownership rules from the design. - Posts: only feedback-sync creates and deletes. Status is merged per caller: sync owns GitHub-derived fields and delivery work items, the controller owns stage, history, highestNotified and part-shipped, the server computes vote counts. Staff can only change spec.hidden; their status writes are Forbidden - Hidden posts are NotFound outside the platform context - Release.status.posts and ChangelogEntry.status.posts are derived from the posts table on read, excluding hidden posts - A title or body change drops the post's embedding for re-embedding - Votes on deleted posts are kept for --vote-retention (30 days), then purged hourly; a returning post keeps its votes - Store hooks: before/after write in the request transaction, a read filter, and decoration of returned objects - --sync-users and --controller-users flags; pgtest package shared by integration tests Closes #4.
This was referenced Nov 12, 2026
Closed
Contributor
Author
|
Closing: the design moved from an aggregated apiserver with Postgres to CRDs in Milo with an operator (datum-cloud/enhancements#925). The CRD version starts in #32. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4. Stacked on #22, which is stacked on #16. Merge in order.
Serves
posts,releasesandchangelogentries, each with astatussubresource, from Postgres, and enforces the design's rules about who writes what.Who writes what
Milo's IAM decides who may use each verb at all. Rules about individual fields can't be expressed there, so the server checks the caller's username against
--sync-usersand--controller-users. Both default to service accounts infeedback-system; #10 settles the real Milo identities.Posts
feedback-syncfeedback-controllerdelivery.stage,highestNotified,historyandwork.partShippedspec.hiddenand metadatavotes.datumandvotes.totalare recomputed on every write, from thevotestable plus GitHub 👍 reactions. Matching 👍 to linked GitHub accounts and the trending score come with vote storage in Vote and Subscription #7.<org>.<repo>.<number>fromstatus.github, lower-cased.v1alpha1.PostNamebuilds it.Hidden posts. They are NotFound outside the platform context. Platform callers (staff, the website's service account, the service's own components) still see them, and can filter with
spec.hidden=false.Releases and changelog entries. Only
feedback-syncwrites them, through either endpoint.Derived and side-effect fields
Release.status.postsis the visible posts whosestatus.releasenames the release.ChangelogEntry.status.postsis the visible posts amongstatus.issueRefs. Whatever sync writes in those fields is dropped, so they can't drift from the posts table.deleted_posts(migration 00003). Its votes and subscriptions are kept for--vote-retention(default 30 days) and then purged by an hourly loop in the apiserver. If the post is created again first, it keeps them.Store changes
pg.Kindgains four hooks:Integration tests now share setup through a
pgtestpackage.Testing
go test ./...passes.APIServicewas Available with all four resources served;hiddenbut its status edit was ignored, and a staff status patch was refused;