From af24431286531e707eefcdc79232ab1db539a689 Mon Sep 17 00:00:00 2001 From: Ruslan Bayandinov Date: Mon, 20 Feb 2023 10:57:26 +0000 Subject: [PATCH 1/2] fix dependencies Signed-off-by: Ruslan Bayandinov --- .github/workflows/ci.yaml | 2 +- .golangci.yml | 7 ++++++- go.mod | 7 ++++--- go.sum | 14 ++++++++------ internal/imports/imports_linux.go | 2 +- main.go | 4 ++-- 6 files changed, 22 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 38968dc..f5b8f04 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,7 +18,7 @@ jobs: golangci-lint: uses: networkservicemesh/.github/.github/workflows/golangci-lint.yaml@main with: - linter-version: v1.45.2 + linter-version: v1.51.1 excludeFmtErrorf: uses: networkservicemesh/.github/.github/workflows/exclude-fmt-errorf.yaml@main diff --git a/.golangci.yml b/.golangci.yml index c734c74..d9f608b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,7 +1,7 @@ --- run: # concurrency: 6 - go: "1.17" + go: "1.19" timeout: 2m issues-exit-code: 1 tests: true @@ -166,3 +166,8 @@ issues: exclude-use-default: false max-issues-per-linter: 0 max-same-issues: 0 + exclude-rules: + - path: 'main.go' + linters: + - revive + text: 'package-comments: should have a package comment' diff --git a/go.mod b/go.mod index eda4ce5..0a4630a 100644 --- a/go.mod +++ b/go.mod @@ -4,12 +4,13 @@ go 1.18 require ( github.com/antonfisher/nested-logrus-formatter v1.3.1 + github.com/edwarnicke/genericsync v0.0.0-20220910010113-61a344f9bc29 github.com/edwarnicke/grpcfd v1.1.2 github.com/edwarnicke/vpphelper v0.0.0-20210225052320-b4f1f1aff45d github.com/kelseyhightower/envconfig v1.4.0 github.com/networkservicemesh/api v1.7.2-0.20230123083145-4a6c3ec589e1 - github.com/networkservicemesh/sdk v0.5.1-0.20230213134519-3aa9aa0d5e1b - github.com/networkservicemesh/sdk-vpp v0.0.0-20230213142924-f83ab06a3e97 + github.com/networkservicemesh/sdk v0.5.1-0.20230217110131-ff8f08b1d404 + github.com/networkservicemesh/sdk-vpp v0.0.0-20230220095933-cfada7063631 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.0 github.com/spiffe/go-spiffe/v2 v2.0.0 @@ -41,7 +42,7 @@ require ( github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/lunixbochs/struc v0.0.0-20200521075829-a4cb8d33dbbe // indirect github.com/miekg/dns v1.1.50 // indirect - github.com/networkservicemesh/sdk-kernel v0.0.0-20230213141018-c280bc6ee279 // indirect + github.com/networkservicemesh/sdk-kernel v0.0.0-20230220094641-02169645d09e // indirect github.com/open-policy-agent/opa v0.44.0 // indirect github.com/r3labs/diff v1.1.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect diff --git a/go.sum b/go.sum index a1076ed..6bb8767 100644 --- a/go.sum +++ b/go.sum @@ -80,6 +80,8 @@ github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8 github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/edwarnicke/exechelper v1.0.2 h1:dD49Ui2U0FBFxxhalnKw6vLS0P0TkgnXBRvKL/xmC5w= github.com/edwarnicke/exechelper v1.0.2/go.mod h1:/T271jtNX/ND4De6pa2aRy2+8sNtyCDB1A2pp4M+fUs= +github.com/edwarnicke/genericsync v0.0.0-20220910010113-61a344f9bc29 h1:4/2wgileNvQB4HfJbq7u4FFLKIfc38a6P0S/51ZGgX8= +github.com/edwarnicke/genericsync v0.0.0-20220910010113-61a344f9bc29/go.mod h1:3m+ZfVq+z0pTLW798jmqnifMsalrVLIKmfXaMFvqSuc= github.com/edwarnicke/govpp v0.0.0-20230130211138-14ef5d20b1d0 h1:3qXBk0lN7PhPrS/2TVJE30TZA/Ecd6LwkFW4rBxxb2w= github.com/edwarnicke/govpp v0.0.0-20230130211138-14ef5d20b1d0/go.mod h1:kHDnxA+SSNFeMEHz7xvhub1zvx4mOTRlWWRCay2n5NM= github.com/edwarnicke/grpcfd v1.1.2 h1:2b8kCABQ1+JjSKGDoHadqSW7whCeTXMqtyo6jmB5B8k= @@ -224,12 +226,12 @@ github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7Xn github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721/go.mod h1:Ickgr2WtCLZ2MDGd4Gr0geeCH5HybhRJbonOgQpvSxc= github.com/networkservicemesh/api v1.7.2-0.20230123083145-4a6c3ec589e1 h1:RxNKksXsXsnDsEo+Cfn43pdPfML024ad//QcdKfgXK4= github.com/networkservicemesh/api v1.7.2-0.20230123083145-4a6c3ec589e1/go.mod h1:hOF2844BSstH1311oDMDgqqXS+kdc77htZNPRKl9mf8= -github.com/networkservicemesh/sdk v0.5.1-0.20230213134519-3aa9aa0d5e1b h1:0FNADw+V7ZmS1BQ02fIAll8bO45VYVQTeGHDZk/DsbI= -github.com/networkservicemesh/sdk v0.5.1-0.20230213134519-3aa9aa0d5e1b/go.mod h1:0AB74FQa4HEAvazQ0v92E2Cnb7k0E1/gsbp+vFd0ukw= -github.com/networkservicemesh/sdk-kernel v0.0.0-20230213141018-c280bc6ee279 h1:8M3W+i2sJvCMbs2+xNLz/vqcIbngDPxzrbkDYnZ8jJk= -github.com/networkservicemesh/sdk-kernel v0.0.0-20230213141018-c280bc6ee279/go.mod h1:6Sxg3ytjRrwhv8BR9807rHR4LMgyPYqvSOdsgBgSeM4= -github.com/networkservicemesh/sdk-vpp v0.0.0-20230213142924-f83ab06a3e97 h1:iCo6Ch1BOFecWMoSVo/gCFVUlZ5moaDP5R9q4coYg4E= -github.com/networkservicemesh/sdk-vpp v0.0.0-20230213142924-f83ab06a3e97/go.mod h1:CBh1JuDun/uFDbl/wV7qGLhmGmzhusI9hRjJiHh5B6k= +github.com/networkservicemesh/sdk v0.5.1-0.20230217110131-ff8f08b1d404 h1:1jjRWttF6zNDPZDfAa/3hv1ger3oTFKsmzg8+sW7wzE= +github.com/networkservicemesh/sdk v0.5.1-0.20230217110131-ff8f08b1d404/go.mod h1:4w0ue1+jI3lHNdSr+rzSpFIBwoGfM5vRcjVkNKZNRxk= +github.com/networkservicemesh/sdk-kernel v0.0.0-20230220094641-02169645d09e h1:JB1JxTW+NmGQMNVFGq5JrcNcYEmjnabh78tW0qcElOo= +github.com/networkservicemesh/sdk-kernel v0.0.0-20230220094641-02169645d09e/go.mod h1:KMfThk5K3zZuyYx98cnehauJ8O+1J715P8NHw5LhMSA= +github.com/networkservicemesh/sdk-vpp v0.0.0-20230220095933-cfada7063631 h1:5cy8qH4xvaXTE51ZD9Pl2mk7POZ6AgdjCLOIcNaaYYs= +github.com/networkservicemesh/sdk-vpp v0.0.0-20230220095933-cfada7063631/go.mod h1:NsFMTfNK5b4ZIa+VbeRUMNN4CDS8EKewoz5NOquaTYI= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.1.0 h1:e3YP4dN/HYPpGh29X1ZkcxcEICsOls9huyVCRBaxjq8= github.com/onsi/gomega v1.1.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= diff --git a/internal/imports/imports_linux.go b/internal/imports/imports_linux.go index 23139c5..87433b4 100644 --- a/internal/imports/imports_linux.go +++ b/internal/imports/imports_linux.go @@ -5,6 +5,7 @@ import ( _ "context" _ "crypto/tls" _ "github.com/antonfisher/nested-logrus-formatter" + _ "github.com/edwarnicke/genericsync" _ "github.com/edwarnicke/grpcfd" _ "github.com/edwarnicke/vpphelper" _ "github.com/kelseyhightower/envconfig" @@ -42,7 +43,6 @@ import ( _ "github.com/networkservicemesh/sdk/pkg/registry/common/clientinfo" _ "github.com/networkservicemesh/sdk/pkg/registry/common/sendfd" _ "github.com/networkservicemesh/sdk/pkg/tools/debug" - _ "github.com/networkservicemesh/sdk/pkg/tools/dnsconfig" _ "github.com/networkservicemesh/sdk/pkg/tools/grpcutils" _ "github.com/networkservicemesh/sdk/pkg/tools/log" _ "github.com/networkservicemesh/sdk/pkg/tools/log/logruslogger" diff --git a/main.go b/main.go index 5539f00..96d7d4c 100644 --- a/main.go +++ b/main.go @@ -61,6 +61,7 @@ import ( "github.com/networkservicemesh/sdk/pkg/tools/tracing" nested "github.com/antonfisher/nested-logrus-formatter" + "github.com/edwarnicke/genericsync" "github.com/edwarnicke/grpcfd" "github.com/edwarnicke/vpphelper" "github.com/kelseyhightower/envconfig" @@ -87,7 +88,6 @@ import ( registryclient "github.com/networkservicemesh/sdk/pkg/registry/chains/client" registryauthorize "github.com/networkservicemesh/sdk/pkg/registry/common/authorize" "github.com/networkservicemesh/sdk/pkg/tools/debug" - "github.com/networkservicemesh/sdk/pkg/tools/dnsconfig" "github.com/networkservicemesh/sdk/pkg/tools/grpcutils" "github.com/networkservicemesh/sdk/pkg/tools/log" "github.com/networkservicemesh/sdk/pkg/tools/log/logruslogger" @@ -113,7 +113,7 @@ type Config struct { LogLevel string `default:"INFO" desc:"Log level" split_words:"true"` dnsServerAddr net.IP dnsServerAddrCh chan net.IP - dnsConfigs dnsconfig.Map + dnsConfigs genericsync.Map[string, []*networkservice.DNSConfig] } // Process prints and processes env to config From 6f9a317c37c9491a90dd1124602590e6431c2e49 Mon Sep 17 00:00:00 2001 From: Ruslan Bayandinov Date: Mon, 20 Feb 2023 11:28:02 +0000 Subject: [PATCH 2/2] update sdk Signed-off-by: Ruslan Bayandinov --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0a4630a..853647d 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/edwarnicke/vpphelper v0.0.0-20210225052320-b4f1f1aff45d github.com/kelseyhightower/envconfig v1.4.0 github.com/networkservicemesh/api v1.7.2-0.20230123083145-4a6c3ec589e1 - github.com/networkservicemesh/sdk v0.5.1-0.20230217110131-ff8f08b1d404 + github.com/networkservicemesh/sdk v0.5.1-0.20230220110548-26b7ec8d44f2 github.com/networkservicemesh/sdk-vpp v0.0.0-20230220095933-cfada7063631 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.0 diff --git a/go.sum b/go.sum index 6bb8767..950fbc8 100644 --- a/go.sum +++ b/go.sum @@ -226,8 +226,8 @@ github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7Xn github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721/go.mod h1:Ickgr2WtCLZ2MDGd4Gr0geeCH5HybhRJbonOgQpvSxc= github.com/networkservicemesh/api v1.7.2-0.20230123083145-4a6c3ec589e1 h1:RxNKksXsXsnDsEo+Cfn43pdPfML024ad//QcdKfgXK4= github.com/networkservicemesh/api v1.7.2-0.20230123083145-4a6c3ec589e1/go.mod h1:hOF2844BSstH1311oDMDgqqXS+kdc77htZNPRKl9mf8= -github.com/networkservicemesh/sdk v0.5.1-0.20230217110131-ff8f08b1d404 h1:1jjRWttF6zNDPZDfAa/3hv1ger3oTFKsmzg8+sW7wzE= -github.com/networkservicemesh/sdk v0.5.1-0.20230217110131-ff8f08b1d404/go.mod h1:4w0ue1+jI3lHNdSr+rzSpFIBwoGfM5vRcjVkNKZNRxk= +github.com/networkservicemesh/sdk v0.5.1-0.20230220110548-26b7ec8d44f2 h1:AFS9ygJ6g9Snjbpc0V5JdQLoa4NOJbj0HurXaxvX0Tc= +github.com/networkservicemesh/sdk v0.5.1-0.20230220110548-26b7ec8d44f2/go.mod h1:4w0ue1+jI3lHNdSr+rzSpFIBwoGfM5vRcjVkNKZNRxk= github.com/networkservicemesh/sdk-kernel v0.0.0-20230220094641-02169645d09e h1:JB1JxTW+NmGQMNVFGq5JrcNcYEmjnabh78tW0qcElOo= github.com/networkservicemesh/sdk-kernel v0.0.0-20230220094641-02169645d09e/go.mod h1:KMfThk5K3zZuyYx98cnehauJ8O+1J715P8NHw5LhMSA= github.com/networkservicemesh/sdk-vpp v0.0.0-20230220095933-cfada7063631 h1:5cy8qH4xvaXTE51ZD9Pl2mk7POZ6AgdjCLOIcNaaYYs=