Skip to content

Commit 3f994db

Browse files
authored
Merge branch 'main' into release-please--branches--main--components--sdk
2 parents 4c0540a + 35e25cc commit 3f994db

File tree

11 files changed

+24
-18
lines changed

11 files changed

+24
-18
lines changed

.github/workflows/checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- name: golangci-lint
6666
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8
6767
with:
68-
version: v1.61
68+
version: v1.64
6969
working-directory: ${{ matrix.directory }}
7070
skip-cache: true
7171
args: --out-format=colored-line-number

.golangci.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ linters-settings:
99
# Such cases aren't reported by default.
1010
# Default: false
1111
check-type-assertions: true
12-
# https://github.com/golangci/golangci-lint/issues/4743
13-
ignore: ''
1412

1513
exhaustive:
1614
# Program elements to check for exhaustiveness.
@@ -138,7 +136,7 @@ linters:
138136
- errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error
139137
- errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
140138
- exhaustive # checks exhaustiveness of enum switch statements
141-
# - exportloopref # checks for pointers to enclosing loop variables Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar."
139+
- exptostd # Added in 1.63. Checks for usages of the deprecated experimental packages
142140
# - fatcontext
143141
- forbidigo # forbids identifiers
144142
- forcetypeassert # finds forced type assertions
@@ -173,14 +171,14 @@ linters:
173171
# - spancheck # checks for incorrect usage of opentracing.Span # Added in golangci-lint 1.56
174172
- sqlclosecheck # checks that sql.Rows and sql.Stmt are closed
175173
- stylecheck # is a replacement for golint
176-
- tenv # detects using os.Setenv instead of t.Setenv since Go1.17
177174
- testableexamples # checks if examples are testable (have an expected output)
178175
- testifylint
179176
#- testpackage # makes you use a separate _test package
180177
- tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes
181178
- unconvert # removes unnecessary type conversions
182179
- unparam # reports unused function parameters
183180
- usestdlibvars # detects the possibility to use variables/constants from the Go standard library
181+
- usetesting # Replaced tenv in golangci-lint 1.63
184182
- wastedassign # finds wasted assignment statements
185183
- whitespace # detects leading and trailing whitespace
186184

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"lib/fixtures": "0.2.10",
3-
"lib/ocrypto": "0.1.7",
3+
"lib/ocrypto": "0.1.8",
44
"lib/flattening": "0.1.3",
55
"protocol/go": "0.2.26",
66
"sdk": "0.3.27",

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ all: toolcheck clean build lint license test
1717
toolcheck:
1818
@echo "Checking for required tools..."
1919
@which buf > /dev/null || (echo "buf not found, please install it from https://docs.buf.build/installation" && exit 1)
20-
@which golangci-lint > /dev/null || (echo "golangci-lint not found, run 'go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0'" && exit 1)
20+
@which golangci-lint > /dev/null || (echo "golangci-lint not found, run 'go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.5'" && exit 1)
2121
@which protoc-gen-doc > /dev/null || (echo "protoc-gen-doc not found, run 'go install github.com/pseudomuto/protoc-gen-doc/cmd/[email protected]'" && exit 1)
22-
@golangci-lint --version | grep "version v\?1.6[123]" > /dev/null || (echo "golangci-lint version must be v1.61 or later [$$(golangci-lint --version)]" && exit 1)
22+
@golangci-lint --version | grep "version v\?1.6[456]" > /dev/null || (echo "golangci-lint version must be v1.64 or later [$$(golangci-lint --version)]" && exit 1)
2323
@which goimports >/dev/null || (echo "goimports not found, run 'go install golang.org/x/tools/cmd/goimports@latest'")
2424

2525
fix: tidy fmt

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@
2424
- [Podman Compose](https://github.com/containers/podman-compose)
2525
- [Buf](https://buf.build/docs/ecosystem/cli-overview) is used for managing protobuf files.
2626
Required for developing services.
27+
- [golangci-lint](https://golangci-lint.run/) is used for ensuring good coding practices.
28+
Use `make go-lint` to run it before submitting a PR
2729

2830
On macOS, these can be installed with [brew](https://docs.brew.sh/Installation)
2931

3032
```sh
31-
brew install buf go
33+
brew install buf go golangci-lint
3234
```
3335

3436
#### Optional tools
3537

3638
- _Optional_ [Air](https://github.com/cosmtrek/air) is used for hot-reload development
3739
- install with `go install github.com/cosmtrek/air@latest`
38-
- _Optional_ [golangci-lint](https://golangci-lint.run/) is used for ensuring good coding practices
39-
- install with `brew install golangci-lint`
4040
- _Optional_ [grpcurl](https://github.com/fullstorydev/grpcurl) is used for testing gRPC services
4141
- install with `brew install grpcurl`
4242
- _Optional_ [openssl](https://www.openssl.org/) is used for generating certificates

docs/Contributing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ Run `go run github.com/opentdf/platform/service provision fixtures -h` for more
2727

2828
## Advice for Code Contributors
2929

30+
* Make sure to run our linters with `make lint`
3031
* Follow our [Error Guidelines](./Contributing-errors.md)

lib/ocrypto/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [0.1.8](https://github.com/opentdf/platform/compare/lib/ocrypto/v0.1.7...lib/ocrypto/v0.1.8) (2025-02-25)
4+
5+
6+
### Features
7+
8+
* **core:** EXPERIMENTAL: EC-wrapped key support ([#1902](https://github.com/opentdf/platform/issues/1902)) ([652266f](https://github.com/opentdf/platform/commit/652266f212ba10b2492a84741f68391a1d39e007))
9+
* **kas:** collect metrics ([#1702](https://github.com/opentdf/platform/issues/1702)) ([def28d1](https://github.com/opentdf/platform/commit/def28d1984b0b111a07330a3eb59c1285206062d))
10+
311
## [0.1.7](https://github.com/opentdf/platform/compare/lib/ocrypto/v0.1.6...lib/ocrypto/v0.1.7) (2024-11-15)
412

513

lib/ocrypto/asym_decryption.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ func FromPrivatePEM(privateKeyInPem string) (PrivateKeyDecryptor, error) {
5555

5656
switch privateKey := priv.(type) {
5757
case *ecdsa.PrivateKey:
58-
if sk, err := privateKey.ECDH(); err != nil {
58+
sk, err := privateKey.ECDH()
59+
if err != nil {
5960
return nil, fmt.Errorf("unable to create ECDH key: %w", err)
60-
} else {
61-
return NewECDecryptor(sk)
6261
}
62+
return NewECDecryptor(sk)
6363
case *ecdh.PrivateKey:
6464
return NewECDecryptor(privateKey)
6565
case *rsa.PrivateKey:

service/entityresolution/keycloak/keycloak_entity_resolution.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,8 @@ func EntityResolution(ctx context.Context,
225225
if exErr != nil {
226226
return entityresolution.ResolveEntitiesResponse{},
227227
connect.NewError(connect.CodeNotFound, ErrNotFound)
228-
} else {
229-
keycloakEntities = expandedRepresentations
230228
}
229+
keycloakEntities = expandedRepresentations
231230
default:
232231
logger.Error("no group found for", slog.String("entity", ident.String()))
233232
var entityNotFoundErr entityresolution.EntityNotFoundError

service/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ require (
3636
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0
3737
go.opentelemetry.io/otel/sdk v1.31.0
3838
go.opentelemetry.io/otel/trace v1.31.0
39-
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
4039
google.golang.org/grpc v1.67.1
4140
google.golang.org/protobuf v1.35.1
4241
gopkg.in/natefinch/lumberjack.v2 v2.2.1
@@ -78,6 +77,7 @@ require (
7877
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect
7978
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect
8079
go.opentelemetry.io/otel/metric v1.31.0 // indirect
80+
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
8181
golang.org/x/oauth2 v0.22.0 // indirect
8282
)
8383

0 commit comments

Comments
 (0)