1
0
Fork 0
mirror of https://github.com/imjasonh/git-k8s synced 2026-07-18 06:55:48 +00:00

Fix LeaderAware interface: use correct Promote signature

The Knative reconciler.LeaderAware interface requires:
  Promote(Bucket, func(Bucket, types.NamespacedName)) error
Our code had the wrong enqueue function signature using
(Bucket, string) error instead.

https://claude.ai/code/session_01QfFzqKQUsxxBsiZUhuJ3pG
This commit is contained in:
Claude 2026-02-28 00:21:10 +00:00
parent 6ddba9902d
commit ffc7c82ae4
No known key found for this signature in database
3 changed files with 6 additions and 3 deletions

View file

@ -10,6 +10,7 @@ import (
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/go-git/go-git/v5/storage/memory"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/dynamic"
"knative.dev/pkg/logging"
"knative.dev/pkg/reconciler"
@ -303,7 +304,7 @@ func splitKey(key string) (string, string, error) {
var _ reconciler.LeaderAware = (*Reconciler)(nil)
func (r *Reconciler) Promote(bkt reconciler.Bucket, enq func(bkt reconciler.Bucket, key string) error) error {
func (r *Reconciler) Promote(bkt reconciler.Bucket, enq func(reconciler.Bucket, types.NamespacedName)) error {
return nil
}