Repository navigation
feat(api)!: adopt Kubernetes watch terms and remove rule operation filters - #398
Conversation
Add a facts page on Kubernetes watch options (selectors, membership events, initial events, bookmarks, recovery) with upstream references, and move the attribution-grace ordering explainer into spec/ with its overlapping-watch limitation corrected. Definitions now use collection, watch, and initial events in prose; identifiers keep their spelling until a code migration. The watches-and-labels design records the plan for issue #146. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedToo many files! This PR contains 113 files, which is 13 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (113)
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThis PR updates documentation about Kubernetes watch selection, initialization, recovery, and event ordering. It adds watch references and design proposals, moves the attribution-ordering explainer into the specification directory, and ignores local-only documentation entries. ChangesWatch documentation
Local documentation ignore rule
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~15 minutes Change: Other Merge Risk: ⚪ Minimal · up to This documentation-only change introduces no identified merge-blocking risk. The reviewed lifecycle and ordering descriptions match current behavior, and the selector proposal is clearly marked as future work. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description gives detailed scope and testing information, but it does not follow the required template. It omits explicit Type of Change selections, checklist confirmations, Related Issues, Screenshots, and Additional Notes sections. Resolution Add the required template headings. Select the applicable Type of Change and Testing checkboxes, complete the Checklist, provide the related issue number or state that none applies, and add Screenshots and Additional Notes entries where applicable. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Rewrite the watches-and-labels design around server-side selection: the rule's objectSelector joins the collection key and is sent as the watch's labelSelector, membership follows the Kubernetes event semantics, and the Always sweep is bounded by the selector evaluated on Git document labels. Overlapping collections of one type must share a selector. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Removing a label is a deletion from the watch's point of view, and spec.prune.mode alone decides whether the document leaves Git; there is no separate retention option. Overlapping collections with different selectors are refused. Record what the user-facing docs must say about both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rename the architecture heading that contradicted its section, drop the cell vocabulary from the target-watch-plan index row, pin the RBAC link to v1.37.0, and match the index row style. Add the four new watch docs to the prose gate; the two step plans say to leave it once they ship. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…perations Rules select whole resource collections. WatchRule and ClusterWatchRule lose spec.rules[].operations: every selected collection observes creates, updates and deletions, and GitTarget spec.prune.mode alone decides whether an observed removal deletes a Git document. The operation event tags move to internal/types; watch_events_total drops the operation_filtered outcome. The project-specific "cell" becomes Kubernetes' resource collection in code, logs and docs: CellKey is CollectionKey, cellSpec is watchSpec (served version only), SourceCell is SourceCollection, and the cell/sourceCell/ *Cells log keys become collection/sourceCollection/*Collections. Redis keys and CollectionKey.String() output are unchanged. BREAKING CHANGE: rules[].operations is removed. A rule that listed a subset now also mirrors updates and removals; set spec.prune.mode: Never on the GitTarget before upgrading to keep documents on removal. See UPGRADING.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TargetView's FollowedType carries NamespaceScopes, matching the WatchedTypeTable after rule operations were removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves the project's read-side vocabulary to Kubernetes' own terms, and makes a rule select whole resource collections.
Breaking API change:
spec.rules[].operationsis removed fromWatchRuleandClusterWatchRule. Every selected collection is observed through creates, updates, and deletions, andGitTarget.spec.prune.modealone decides whether an observed removal deletes a Git document. The filter never described the object set consistently: it only applied to live events, so a create-only rule still wrote every existing object during initialization, and excludingDELETEnever stoppedAlwaysfrom sweeping. A rule that listed a subset now also mirrors updates and removals. Setprune.mode: Neverbefore upgrading to keep documents on removal.UPGRADING.mdcovers the migration:fieldValidation=Stricta stale manifest is refused. UnderWarn/Ignorethe field is pruned.watch_events_totalloses itsoperation_filteredoutcome.cell/sourceCell/*Cellslog keys becomecollection/sourceCollection/*Collections.Cell → resource collection in code and docs, with no aliases:
CellKeyis nowCollectionKey,SourceCellisSourceCollection, andcellSpeciswatchSpec.watchSpecnow carries only the served version, so only a version change or a forced recheck restarts a collection.cellfiles move tocollectionnames.CollectionKey.String()values, Redis cursor keys, status units, and prune behavior.internal/types, keeping the same values. Audit verb mapping and attribution are unchanged.Docs:
docs/facts/kubernetes-watch-options.mdon what a watch covers, selectors, initial events, bookmarks, and recovery. Sources are pinned atv0.37.0.spec/and is corrected: an all-namespaces watch and a named-namespace watch can both deliver the same object, and nothing orders them.collection-terminology-rename.mdis the step-1 plan implemented here, now marked shipped.watches-labels-simplification.mdis step 2 for [FEATURE] Per-rule objectSelector on (Cluster)WatchRule rules #146 (per-ruleobjectSelectorsent as the watch'slabelSelector). It is still a design.Tests:
Strictrejects the stale field andWarn/Ignoreprune it, on both CRDs. A Helm test asserts the values schema refuses the key.task lint,task test, and localtask test-e2e(87/87) pass.🤖 Generated with Claude Code