Skip to content

gRPC WatchEvent method with WatchEventRequest_Table_Filter_BEST returns best: false on all paths #2902

@roman901

Description

@roman901

Minimal example code using latest GoBGP and gRPC API:

stream, err := client.WatchEvent(ctx, &pb.WatchEventRequest{
	Table: &pb.WatchEventRequest_Table{
		Filters: []*pb.WatchEventRequest_Table_Filter{
			{
				Type: pb.WatchEventRequest_Table_Filter_BEST,
				Init: true,
			},
		},
	},
})

for {
	r, err := stream.Recv()
	if err == io.EOF {
		break
	} else if err != nil {
		return err
	}

	t := r.GetTable()
	if t == nil {
		continue
	}

	destinations := apiutil.NewDestination(&pb.Destination{Paths: t.Paths})
	for _, path := range destinations.Paths {
		...
	}
}

I expect that path.Best will be true or false, but it is always false.
At the same time ListPath method returns correct values.
Is this bug or planned behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions