From 6fb1fcdebdbbb49d85008c20449479e24ca215bb Mon Sep 17 00:00:00 2001 From: Rodin Date: Wed, 6 May 2026 17:17:03 -0700 Subject: [PATCH] fix: update drifted line citations in patterns.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two citations were out of bounds against kubernetes/kubernetes HEAD: - delta_fifo.go:797-801 → 797-800 (DeletedFinalStateUnknown struct ends at line 800; file has 800 lines total, off-by-one) - kube_features.go:2798-2811 → 2771-2784 (init() function moved up ~27 lines; file now has 2784 lines, old citation was past EOF) Audited all 30 citations (28 OK, 2 fixed, 0 flagged for review). --- patterns/patterns.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/patterns/patterns.md b/patterns/patterns.md index 42fd4d3..73da687 100644 --- a/patterns/patterns.md +++ b/patterns/patterns.md @@ -428,7 +428,7 @@ func (q *rateLimitingType[T]) AddRateLimited(item T) { ## 4. Tombstone Pattern (DeletedFinalStateUnknown) -**Source:** `staging/src/k8s.io/client-go/tools/cache/delta_fifo.go` (lines 797–801) +**Source:** `staging/src/k8s.io/client-go/tools/cache/delta_fifo.go` (lines 797–800) ### What it does When a watch disconnects and reconnects, some delete events may be missed. The DeltaFIFO synthesizes a `DeletedFinalStateUnknown` ("tombstone") containing the last known state of the object. @@ -437,7 +437,7 @@ When a watch disconnects and reconnects, some delete events may be missed. The D Without this, controllers would never learn about deletions that happened during disconnects. ```go -// staging/src/k8s.io/client-go/tools/cache/delta_fifo.go:797-801 +// staging/src/k8s.io/client-go/tools/cache/delta_fifo.go:797-800 type DeletedFinalStateUnknown struct { Key string Obj interface{} @@ -852,7 +852,7 @@ func (le *LeaderElector) Run(ctx context.Context) { ## 8. Feature Gates Pattern -**Source:** `pkg/features/kube_features.go` (lines 34–2811), `staging/src/k8s.io/client-go/features/features.go` (lines 34–80) +**Source:** `pkg/features/kube_features.go` (lines 34–2784), `staging/src/k8s.io/client-go/features/features.go` (lines 34–80) ### What it does A global registry of boolean flags that control feature rollout. Features progress through Alpha → Beta → GA → Deprecated lifecycle stages. @@ -888,7 +888,7 @@ const ( ### Registration at init() ```go -// pkg/features/kube_features.go:2798-2811 +// pkg/features/kube_features.go:2771-2784 func init() { ca := &clientAdapter{utilfeature.DefaultMutableFeatureGate} runtime.Must(clientfeatures.AddVersionedFeaturesToExistingFeatureGates(ca))