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

Added OpenCHAMI middleware and updated go deps #47

Merged
merged 3 commits into from
Aug 12, 2024
Merged

Conversation

davidallendj
Copy link
Contributor

Addresses #46 by adding the OpenCHAMI middleware.

@synackd
Copy link
Collaborator

synackd commented Aug 12, 2024

Looks like the unit tests are failing:

Error: boot-script-service/routers.go:87:61: cannot use tokenAuth (variable of type *"github.com/OpenCHAMI/jwtauth/v5".JWTAuth) as *"github.com/go-chi/jwtauth/v5".JWTAuth value in argument to openchami_authenticator.AuthenticatorWithRequiredClaims

@davidallendj
Copy link
Contributor Author

Looks like the unit tests are failing:

Error: boot-script-service/routers.go:87:61: cannot use tokenAuth (variable of type *"github.com/OpenCHAMI/jwtauth/v5".JWTAuth) as *"github.com/go-chi/jwtauth/v5".JWTAuth value in argument to openchami_authenticator.AuthenticatorWithRequiredClaims

Yep, I'm going to change the import to use the OpenCHAMI jwtauth.

@synackd
Copy link
Collaborator

synackd commented Aug 12, 2024

Uh oh, we might have broken some etcd stuff:

GOOS=linux GOARCH=amd64 go build -v -tags musl  -o boot-script-service ./cmd/boot-script-service/
github.com/coreos/etcd/clientv3/balancer/resolver/endpoint
github.com/coreos/etcd/clientv3/balancer/picker
# github.com/coreos/etcd/clientv3/balancer/picker
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/picker/err.go:37:53: undefined: balancer.PickOptions
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/picker/roundrobin_balanced.go:55:63: undefined: balancer.PickOptions
# github.com/coreos/etcd/clientv3/balancer/resolver/endpoint
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:114:87: undefined: resolver.BuildOption
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:182:40: undefined: resolver.ResolveNowOption

@davidallendj
Copy link
Contributor Author

Uh oh, we might have broken some etcd stuff:

GOOS=linux GOARCH=amd64 go build -v -tags musl  -o boot-script-service ./cmd/boot-script-service/
github.com/coreos/etcd/clientv3/balancer/resolver/endpoint
github.com/coreos/etcd/clientv3/balancer/picker
# github.com/coreos/etcd/clientv3/balancer/picker
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/picker/err.go:37:53: undefined: balancer.PickOptions
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/picker/roundrobin_balanced.go:55:63: undefined: balancer.PickOptions
# github.com/coreos/etcd/clientv3/balancer/resolver/endpoint
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:114:87: undefined: resolver.BuildOption
/root/go/pkg/mod/github.com/coreos/etcd@v3.3.27+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:182:40: undefined: resolver.ResolveNowOption

Huh? Did that happen from updating the packages? Maybe we'll just have to rollback the version for etcd if we can.

@synackd
Copy link
Collaborator

synackd commented Aug 12, 2024

Yeah I think that was it.

Rolling back etcd fixes it.

diff --git a/go.mod b/go.mod
index efc6510..24a6993 100644
--- a/go.mod
+++ b/go.mod
@@ -37,7 +37,7 @@ require (
        github.com/Cray-HPE/hms-securestorage v1.13.0 // indirect
        github.com/aws/aws-sdk-go v1.55.5 // indirect
        github.com/cenkalti/backoff/v3 v3.2.2 // indirect
-       github.com/coreos/etcd v3.3.27+incompatible // indirect
+       github.com/coreos/etcd v3.3.13+incompatible // indirect
        github.com/coreos/go-semver v0.3.1 // indirect
        github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
        github.com/coreos/pkg v0.0.0-20240122114842-bbd7aa9bf6fb // indirect

@synackd
Copy link
Collaborator

synackd commented Aug 12, 2024

(Make sure to go mod tidy after modifying go.mod)

@synackd
Copy link
Collaborator

synackd commented Aug 12, 2024

BSS builds with the downgraded EtcD version.

Copy link
Collaborator

@synackd synackd left a comment

Choose a reason for hiding this comment

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

Tested working. LGTM!

@davidallendj davidallendj merged commit 79ad592 into main Aug 12, 2024
2 checks passed
@davidallendj davidallendj deleted the update-routers branch August 12, 2024 23:59
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