Skip to content

Commit

Permalink
update go packages
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Ding <[email protected]>
  • Loading branch information
jzding committed Oct 17, 2023
1 parent a366416 commit 91c221b
Show file tree
Hide file tree
Showing 608 changed files with 35,979 additions and 66,286 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/hw-event-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: '1.19'
go-version: '1.20'
- name: tidy
run: go mod tidy
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.2.0
uses: golangci/golangci-lint-action@v3.6.0
with:
# Caching conflicts happen in GHA, so just disable for now
skip-pkg-cache: true
skip-build-cache: true
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.48.0
version: v1.53.3
args: --timeout 3m0s
working-directory: ./hw-event-proxy
unit-tests:
Expand All @@ -34,7 +34,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: '1.19'
go-version: '1.20'
- name: tidy
run: make deps-update
- name: Run Test Scripts
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changes to this file are not auto-propagated to the downstream build automation. We need to make the changes manually in the midstream repo located here:
# https://gitlab.cee.redhat.com/cpaas-midstream/telco-5g-ran/baremetal-hardware-event-proxy/-/blob/rhaos-4.13-rhel-8/distgit/containers/baremetal-hardware-event-proxy/Dockerfile.in
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.14 AS go-builder
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.20-openshift-4.15 AS go-builder
ENV GO111MODULE=off
ENV CGO_ENABLED=1
ENV COMMON_GO_ARGS=-race
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Used by quay.io to trigger developer builds
FROM quay.io/redhat-cne/openshift-origin-release:golang-1.19-openshift-4.14 AS go-builder
FROM quay.io/redhat-cne/openshift-origin-release:rhel-8-golang-1.20-openshift-4.15 AS go-builder

ENV GO111MODULE=off
ENV CGO_ENABLED=1
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build hw-event-proxy binaries
FROM quay.io/redhat-cne/openshift-origin-release:golang-1.19-openshift-4.14 AS go-builder
FROM quay.io/redhat-cne/openshift-origin-release:rhel-8-golang-1.20-openshift-4.15 AS go-builder

WORKDIR /go/src/github.com/redhat-cne/hw-event-proxy
COPY ./hw-event-proxy ./hw-event-proxy
Expand Down
5 changes: 3 additions & 2 deletions hw-event-proxy/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (
"github.com/redhat-cne/hw-event-proxy/hw-event-proxy/restclient"
"github.com/redhat-cne/hw-event-proxy/hw-event-proxy/util"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

v1event "github.com/redhat-cne/sdk-go/v1/event"
v1pubsub "github.com/redhat-cne/sdk-go/v1/pubsub"
Expand Down Expand Up @@ -156,7 +157,7 @@ func ackEvent(w http.ResponseWriter, req *http.Request) {
}
}

func webhook(w http.ResponseWriter, r *http.Request) {
func webhook(_ http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
bodyBytes, err := io.ReadAll(r.Body)
if err != nil {
Expand Down Expand Up @@ -210,7 +211,7 @@ func parseMessage(m redfish.EventRecord) (redfish.EventRecord, error) {
addr := fmt.Sprintf("localhost:%d", msgParserPort)
ctx, cancel := context.WithTimeout(context.Background(), msgParserTimeout)
defer cancel()
conn, err := grpc.DialContext(ctx, addr, grpc.WithBlock(), grpc.WithInsecure())
conn, err := grpc.DialContext(ctx, addr, grpc.WithBlock(), grpc.WithTransportCredentials(insecure.NewCredentials()))

if err != nil {
return redfish.EventRecord{}, err
Expand Down
38 changes: 15 additions & 23 deletions hw-event-proxy/go.mod
Original file line number Diff line number Diff line change
@@ -1,37 +1,29 @@
module github.com/redhat-cne/hw-event-proxy/hw-event-proxy

go 1.19
go 1.20

require (
github.com/json-iterator/go v1.1.12
github.com/redhat-cne/sdk-go v0.1.1-0.20230417130643-d8a16493413b
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.8.0
golang.org/x/net v0.8.0
google.golang.org/grpc v1.42.0
google.golang.org/protobuf v1.28.1
github.com/redhat-cne/sdk-go v0.1.1-0.20230620125330-a4ab7d7777d4
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.4
golang.org/x/net v0.17.0
google.golang.org/grpc v1.58.3
google.golang.org/protobuf v1.31.0
)

require golang.org/x/mod v0.8.0 // indirect

require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/cloudevents/sdk-go/v2 v2.13.0 // indirect
github.com/cloudevents/sdk-go/v2 v2.14.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.uber.org/atomic v1.5.0 // indirect
go.uber.org/multierr v1.3.0 // indirect
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee // indirect
go.uber.org/zap v1.13.0 // indirect
golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/tools v0.6.0 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
honnef.co/go/tools v0.0.1-2019.2.3 // indirect
)
Loading

0 comments on commit 91c221b

Please sign in to comment.