Skip to content

Commit

Permalink
Fix random build failures due to sonic_internal.proto (sonic-net#157)
Browse files Browse the repository at this point in the history
1) Fixed the syntax error in sonic_internal.proto file (introduced by
commit 58a7b20). It appears that sonic_internal.pb.go was manually
updated earlier; hence this syntax error went unnoticed.

2) Removed the makefile target to compile gnmi_server test binary. It
is not used now as 'make check_gotest' runs the go tests directly on
source files. Prevents unnecessary trigger of proto file compilations
  • Loading branch information
sachinholla authored Oct 10, 2023
1 parent cbb7631 commit 8e13400
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
15 changes: 1 addition & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ export PATH := $(PATH):$(GOBIN):$(shell dirname $(GO))
export CGO_LDFLAGS := -lswsscommon -lhiredis
export CGO_CXXFLAGS := -I/usr/include/swss -w -Wall -fpermissive

SRC_FILES=$(shell find . -name '*.go' | grep -v '_test.go' | grep -v '/tests/')
TEST_FILES=$(wildcard *_test.go)
TELEMETRY_TEST_DIR = build/tests/gnmi_server
TELEMETRY_TEST_BIN = $(TELEMETRY_TEST_DIR)/server.test
ifeq ($(ENABLE_TRANSLIB_WRITE),y)
BLD_TAGS := gnmi_translib_write
endif
Expand All @@ -39,7 +35,7 @@ GO_DEPS := vendor/.done
PATCHES := $(wildcard patches/*.patch)
PATCHES += $(shell find $(MGMT_COMMON_DIR)/patches -type f)

all: sonic-gnmi $(TELEMETRY_TEST_BIN)
all: sonic-gnmi

go.mod:
$(GO) mod init github.com/sonic-net/sonic-gnmi
Expand Down Expand Up @@ -140,15 +136,6 @@ clean:
$(RM) -r build
$(RM) -r vendor

$(TELEMETRY_TEST_BIN): $(TEST_FILES) $(SRC_FILES)
mkdir -p $(@D)
cp -r testdata $(@D)/
ifeq ($(CONFIGURED_ARCH),armhf)
touch $@
else
$(GO) test -mod=vendor $(BLD_FLAGS) -c -cover github.com/sonic-net/sonic-gnmi/gnmi_server -o $@
endif

install:
$(INSTALL) -D $(BUILD_DIR)/telemetry $(DESTDIR)/usr/sbin/telemetry
ifneq ($(ENABLE_DIALOUT_VALUE),0)
Expand Down
4 changes: 3 additions & 1 deletion proto/sonic_internal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import "github.com/openconfig/gnmi/proto/gnmi/gnmi.proto";

package gnmi.sonic;

option go_package = "./;gnmi_sonic";


enum State {
STOPPED = 0;
Expand Down Expand Up @@ -36,5 +38,5 @@ message Value {
gnmi.Notification notification = 7;

// Delete to be used to indicate that node was deleted
[]gnmi.Path delete = 8;
repeated gnmi.Path delete = 8;
}

0 comments on commit 8e13400

Please sign in to comment.