Skip to content

Commit 4d220b3

Browse files
Danielius1922Daniel Adam
authored andcommitted
Upgrade dependencies
Submodule: github.com/googleapis/googleapis 32bc03653260356351854429bd7e2dfbf670d352 Direct: github.com/goreleaser/goreleaser/v2 v2.2.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 github.com/jellydator/ttlcache/v3 v3.3.0 github.com/plgd-dev/device/v2 v2.5.3-0.20240904102627-4c2719d9d856 github.com/plgd-dev/go-coap/v3 v3.3.5-0.20240904100911-1afdeb72cb92 github.com/plgd-dev/hub/v2 v2.24.1 go.opentelemetry.io/otel/trace v1.29.0 google.golang.org/grpc v1.66.1 Indirect: cloud.google.com/go v0.112.2 cloud.google.com/go/auth v0.3.0 cloud.google.com/go/auth/oauth2adapt v0.2.2 cloud.google.com/go/iam v1.1.7 cloud.google.com/go/storage v1.40.0 code.gitea.io/sdk/gitea v0.19.0 github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2 github.com/Microsoft/go-winio v0.6.2 github.com/anchore/quill v0.4.2 github.com/atc0005/go-teams-notify/v2 v2.11.0 github.com/aws/aws-sdk-go v1.55.3 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 github.com/aws/aws-sdk-go-v2/service/kms v1.31.0 github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 github.com/blacktop/go-dwarf v1.0.10 github.com/blacktop/go-macho v1.1.225 github.com/bufbuild/protocompile v0.14.1 github.com/caarlos0/env/v11 v11.2.2 github.com/caarlos0/log v0.4.6 github.com/charmbracelet/bubbletea v0.26.6 github.com/charmbracelet/lipgloss v0.12.1 github.com/charmbracelet/x/ansi v0.1.4 github.com/charmbracelet/x/exp/ordered v0.1.0 github.com/charmbracelet/x/input v0.1.0 github.com/charmbracelet/x/term v0.1.1 github.com/charmbracelet/x/windows v0.1.0 github.com/cpuguy83/go-md2man/v2 v2.0.4 github.com/distribution/reference v0.6.0 github.com/docker/cli v27.1.1+incompatible github.com/docker/docker v27.1.1+incompatible github.com/docker/go-connections v0.5.0 github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f github.com/gabriel-vasile/mimetype v1.4.4 github.com/go-json-experiment/json v0.0.0-20240815174924-0599f16bf0e2 github.com/google/go-containerregistry v0.20.2 github.com/google/go-github/v63 v63.0.0 github.com/google/ko v0.16.0 github.com/goreleaser/nfpm/v2 v2.39.0 github.com/hashicorp/go-retryablehttp v0.7.7 github.com/jhump/protoreflect v1.17.0 github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 github.com/nats-io/nats.go v1.37.0 github.com/pelletier/go-toml/v2 v2.2.2 github.com/slack-go/slack v0.13.1 github.com/spf13/cobra v1.8.1 github.com/spf13/viper v1.19.0 github.com/xanzy/go-gitlab v0.107.0 github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e go.mongodb.org/mongo-driver v1.16.1 go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo v0.54.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 go.opentelemetry.io/otel v1.29.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.29.0 go.opentelemetry.io/otel/metric v1.29.0 go.opentelemetry.io/otel/sdk v1.29.0 gocloud.dev v0.38.0 golang.org/x/crypto v0.27.0 golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 golang.org/x/mod v0.21.0 golang.org/x/net v0.29.0 golang.org/x/oauth2 v0.23.0 golang.org/x/sys v0.25.0 golang.org/x/term v0.24.0 golang.org/x/text v0.18.0 golang.org/x/tools v0.25.0 google.golang.org/api v0.176.1 google.golang.org/genproto v0.0.0-20240415180920-8c6c420018be google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1
1 parent e72e9f8 commit 4d220b3

18 files changed

+328
-308
lines changed

.golangci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ linters:
2323
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
2424
- bidichk # Checks for dangerous unicode character sequences
2525
- bodyclose # Checks whether HTTP response body is closed successfully
26-
# - copyloopvar # Detects places where loop variables are copied
26+
- copyloopvar # Detects places where loop variables are copied
2727
- decorder # Check declaration order and count of types, constants, variables and functions
2828
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
2929
- dupl # Tool for code clone detection
@@ -33,7 +33,6 @@ linters:
3333
- errchkjson # Checks types passed to the json encoding functions. Reports unsupported types and optionally reports occasions, where the check for the returned error can be omitted.
3434
- errname # Checks that sentinel errors are prefixed with the `Err` and error types are suffixed with the `Error`.
3535
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
36-
- exportloopref # checks for pointers to enclosing loop variables
3736
- forcetypeassert # finds forced type assertions
3837
- gci # Gci control golang package import order and make it always deterministic.
3938
- gocheckcompilerdirectives # Checks that go compiler directive comments (//go:) are valid.

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"MFG_CLIENT_APPLICATION_KEY": "${workspaceFolder}/.tmp/devsim/pki_certs/mfgclientapplicationkey.pem",
1515
"TEST_OAUTH_SERVER_ID_TOKEN_PRIVATE_KEY": "${workspaceFolder}/.tmp/oauth-server/idTokenKey.pem",
1616
"TEST_OAUTH_SERVER_ACCESS_TOKEN_PRIVATE_KEY": "${workspaceFolder}/.tmp/oauth-server/accessTokenKey.pem",
17+
"M2M_OAUTH_SERVER_PRIVATE_KEY": "${workspaceFolder}/.tmp/oauth-server/m2mAccessTokenKey.pem",
1718
"TEST_ROOT_CA_KEY": "${workspaceFolder}/.tmp/certs/rootcakey.pem",
1819
"TEST_ROOT_CA_CERT": "${workspaceFolder}/.tmp/certs/rootcacrt.pem",
1920
"TEST_CLOUD_SID": "adebc667-1f2b-41e3-bf5c-6d6eabc68cc6",
@@ -31,6 +32,6 @@
3132
],
3233
"go.useLanguageServer": true,
3334
"gopls": {
34-
"formatting.gofumpt": true,
35+
"formatting.gofumpt": true,
3536
},
3637
}

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ UI_SEPARATOR ?= "--------UI--------"
2525
OAUTH_SERVER_PATH = $(shell pwd)/.tmp/oauth-server
2626
OAUTH_SERVER_ID_TOKEN_PRIVATE_KEY = $(OAUTH_SERVER_PATH)/idTokenKey.pem
2727
OAUTH_SERVER_ACCESS_TOKEN_PRIVATE_KEY = $(OAUTH_SERVER_PATH)/accessTokenKey.pem
28+
M2M_OAUTH_SERVER_ACCESS_TOKEN_PRIVATE_KEY = $(OAUTH_SERVER_PATH)/m2mAccessTokenKey.pem
2829
CLOUD_SID = adebc667-1f2b-41e3-bf5c-6d6eabc68cc6
2930

3031
certificates:
@@ -68,6 +69,8 @@ privateKeys:
6869
mkdir -p $(OAUTH_SERVER_PATH)
6970
openssl genrsa -out $(OAUTH_SERVER_ID_TOKEN_PRIVATE_KEY) 4096
7071
openssl ecparam -name prime256v1 -genkey -noout -out $(OAUTH_SERVER_ACCESS_TOKEN_PRIVATE_KEY)
72+
openssl ecparam -name prime256v1 -genkey -noout -out $(M2M_OAUTH_SERVER_ACCESS_TOKEN_PRIVATE_KEY)
73+
7174
.PHONY: privateKeys
7275

7376
env: clean certificates privateKeys nats mongo
@@ -119,6 +122,7 @@ test: env
119122
export MFG_CLIENT_APPLICATION_KEY=$(MFG_CLIENT_APPLICATION_KEY); \
120123
export TEST_OAUTH_SERVER_ID_TOKEN_PRIVATE_KEY=$(OAUTH_SERVER_ID_TOKEN_PRIVATE_KEY); \
121124
export TEST_OAUTH_SERVER_ACCESS_TOKEN_PRIVATE_KEY=$(OAUTH_SERVER_ACCESS_TOKEN_PRIVATE_KEY); \
125+
export M2M_OAUTH_SERVER_PRIVATE_KEY=$(M2M_OAUTH_SERVER_ACCESS_TOKEN_PRIVATE_KEY); \
122126
export TEST_ROOT_CA_KEY=$(WORKING_DIRECTORY)/.tmp/certs/rootcakey.pem; \
123127
export TEST_ROOT_CA_CERT=$(WORKING_DIRECTORY)/.tmp/certs/rootcacrt.pem; \
124128
export TEST_COAP_GW_CERT_FILE=$(WORKING_DIRECTORY)/.tmp/certs/coap.crt; \

dependency/googleapis

Submodule googleapis updated 301 files

go.mod

Lines changed: 88 additions & 84 deletions
Large diffs are not rendered by default.

go.sum

Lines changed: 203 additions & 196 deletions
Large diffs are not rendered by default.

pkg/tar/tar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func Untar(dst string, r io.Reader) error {
164164
}
165165
// if it's a file create it
166166
case tar.TypeReg:
167-
err := copyFile(target, os.FileMode(header.Mode), tr)
167+
err := copyFile(target, os.FileMode(header.Mode), tr) //nolint:gosec
168168
if err != nil {
169169
return err
170170
}

service/grpc/jsonWebKeyCache.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package grpc
22

33
import (
4+
"context"
45
"errors"
56

67
"github.com/golang-jwt/jwt/v5"
@@ -51,7 +52,7 @@ func (c *JSONWebKeyCache) LookupKey(token *jwt.Token) (jwk.Key, error) {
5152
return nil, errors.New("could not find JWK")
5253
}
5354

54-
func (s *ClientApplicationServer) ParseWithClaims(token string, claims jwt.Claims) error {
55+
func (s *ClientApplicationServer) ParseWithClaims(_ context.Context, token string, claims jwt.Claims) error {
5556
if token == "" {
5657
if !s.HasJWTAuthorizationEnabled() {
5758
return nil

service/grpc/updateJSONWebKeys.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (s *ClientApplicationServer) getOwnerForUpdateJSONWebKeys(ctx context.Conte
5555
return owner, nil
5656
}
5757
scopedClaims := plgdJwt.NewScopeClaims()
58-
err = s.ParseWithClaims(token, scopedClaims)
58+
err = s.ParseWithClaims(ctx, token, scopedClaims)
5959
if err != nil {
6060
return "", status.Errorf(codes.Unauthenticated, "cannot parse token: %v", err)
6161
}

service/http/clearCache_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
plgdDevice "github.com/plgd-dev/device/v2/schema/device"
2929
grpcgwPb "github.com/plgd-dev/hub/v2/grpc-gateway/pb"
3030
httpgwTest "github.com/plgd-dev/hub/v2/http-gateway/test"
31-
httpTest "github.com/plgd-dev/hub/v2/test/http"
31+
pkgHttpPb "github.com/plgd-dev/hub/v2/pkg/net/http/pb"
3232
"github.com/plgd-dev/kit/v2/codec/cbor"
3333
"github.com/stretchr/testify/assert"
3434
"github.com/stretchr/testify/require"
@@ -70,7 +70,7 @@ func TestClientApplicationServerClearCache(t *testing.T) {
7070
assert.Equal(t, http.StatusOK, resp.StatusCode)
7171

7272
var device grpcgwPb.Device
73-
err := httpTest.Unmarshal(resp.StatusCode, resp.Body, &device)
73+
err := pkgHttpPb.Unmarshal(resp.StatusCode, resp.Body, &device)
7474
require.NoError(t, err)
7575

7676
var v plgdDevice.Device

0 commit comments

Comments
 (0)