Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmad Karimi <[email protected]>
  • Loading branch information
therealak12 committed Aug 15, 2023
1 parent 0d5363e commit 02cf83d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
17 changes: 8 additions & 9 deletions cmd/contour/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -836,13 +836,12 @@ func (s *Server) setupDebugService(debugConfig contour_api_v1alpha1.DebugConfig,
}

type xdsServer struct {
log logrus.FieldLogger
registry *prometheus.Registry
config contour_api_v1alpha1.XDSServerConfig
snapshotHandler *xdscache.SnapshotHandler
resources []xdscache.ResourceCache
handlerCacheSyncs []cache.InformerSynced
initialDagBuilt func() bool
log logrus.FieldLogger
registry *prometheus.Registry
config contour_api_v1alpha1.XDSServerConfig
snapshotHandler *xdscache.SnapshotHandler
resources []xdscache.ResourceCache
initialDagBuilt func() bool
}

func (x *xdsServer) NeedLeaderElection() bool {
Expand All @@ -853,9 +852,9 @@ func (x *xdsServer) Start(ctx context.Context) error {
log := x.log.WithField("context", "xds")

log.Printf("waiting for the initial dag to be built")
if err := wait.PollImmediateUntil(initialDagBuildPollPeriod, func() (bool, error) {
if err := wait.PollUntilContextCancel(ctx, initialDagBuildPollPeriod, true, func(ctx context.Context) (done bool, err error) {
return x.initialDagBuilt(), nil
}, ctx.Done()); err != nil {
}); err != nil {
return fmt.Errorf("failed to wait for initial dag build, %w", err)
}
log.Printf("the initial dag is built")
Expand Down
1 change: 0 additions & 1 deletion internal/contour/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ type opDelete struct {

func (e *EventHandler) OnAdd(obj any, isInInitialList bool) {
if isInInitialList {
time.Sleep(time.Second * 3)
e.syncTracker.Start()
}
e.update <- opAdd{obj: obj, isInInitialList: isInInitialList}
Expand Down

0 comments on commit 02cf83d

Please sign in to comment.