Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Make targets and address various issues #1258

Merged
merged 8 commits into from
Aug 22, 2023
Merged

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Aug 11, 2023

This improves the Makefile a bit more, while still not being picture perfect. Things that could still use some love:

  • Testing keys should really not pollute the user their GnuPG home directory, but rather be e.g. imported to some project specific key ring.
  • Binary for functional tests should not be stored in ./functional-tests/sops. But instead put in ./bin/sops, from where it would be used instead (while building using GoReleaser to match release build?)

@hiddeco hiddeco force-pushed the imprv-make-targets branch 2 times, most recently from ea08e83 to 6c31fab Compare August 14, 2023 21:40
@hiddeco hiddeco marked this pull request as ready for review August 14, 2023 21:54
@hiddeco hiddeco requested a review from a team August 14, 2023 21:54
@hiddeco hiddeco added this to the v3.8.0 milestone Aug 14, 2023
@hiddeco hiddeco force-pushed the imprv-make-targets branch 8 times, most recently from 06c49b7 to 0258725 Compare August 16, 2023 20:26
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
```
stores/dotenv/store.go:74:12: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
stores/dotenv/store_test.go:29:10: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
keyservice/server.go:149:9: assignment copies lock value to key: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:206:20: call of ks.prompt copies lock value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:214:22: keyToString passes lock by value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:231:29: prompt passes lock by value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:232:27: call of keyToString copies lock value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:251:9: assignment copies lock value to key: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
keyservice/server.go:308:20: call of ks.prompt copies lock value: github.com/getsops/sops/v3/keyservice.Key contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
stores/yaml/store_test.go:27:11: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
stores/yaml/store_test.go:39:11: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
stores/yaml/store_test.go:107:5: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
stores/yaml/store_test.go:139:13: github.com/getsops/sops/v3.Comment struct literal uses unkeyed fields
decrypt/example_test.go:34:1: ExampleDecryptFile refers to unknown identifier: DecryptFile
```

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
As it has been deprecated for about ~2 years in favor of `go vet` and
tools like `staticcheck`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Deprecation of `io/ioutil`, removal of unused functions, possible nil
pointer dereference, and other tiny nits.

There are (many) more, but these would require their own (commit)
context.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
My assumption is that this used to be in place because of `go` not
ignoring the `vendor` directory.

However, in 2023 this appears to no longer be an issue, and only
adds complexity. While running `go test ./...` works just fine.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This should just really not be put there, but lets be nice and ignore it
for now.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
@hiddeco hiddeco force-pushed the imprv-make-targets branch from 0258725 to aa7922f Compare August 16, 2023 22:16
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
@hiddeco hiddeco force-pushed the imprv-make-targets branch from aa7922f to 218c412 Compare August 16, 2023 22:27
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
@hiddeco hiddeco force-pushed the imprv-make-targets branch from 218c412 to fe346f9 Compare August 16, 2023 22:33
Copy link
Contributor

@devstein devstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hiddeco hiddeco merged commit 35b673e into main Aug 22, 2023
@hiddeco hiddeco deleted the imprv-make-targets branch August 22, 2023 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants