veraison / services

Attestation verification services based on Veraison components
Apache License 2.0
25 stars 14 forks source link

BUG: Error while installing DLV #247

Closed jpbrucker closed 3 months ago

jpbrucker commented 3 months ago

What version of the package are you using?

Main branch, commit b82111a

What did you do?

make docker-deploy

Problem

builder.docker:56
--------------------
  55 |     # Download Go modules
  56 | >>> RUN go mod download &&\
  57 | >>>     go install golang.org/x/tools/gopls@latest &&\
  58 | >>>     go install golang.org/x/tools/cmd/guru@latest &&\
  59 | >>>     go install github.com/golang/mock/mockgen@v1.7.0-rc.1 &&\
  60 | >>>     go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26 &&\
  61 | >>>     go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1 &&\
  62 | >>>     go install github.com/mitchellh/protoc-gen-go-json@v1.1.0 &&\
  63 | >>>     go install github.com/veraison/corim/cocli@latest &&\
  64 | >>>     go install github.com/veraison/evcli/v2@latest &&\
  65 | >>>     go install github.com/veraison/pocli@latest &&\
  66 | >>>     go install github.com/go-delve/delve/cmd/dlv@latest
  67 |     
--------------------
ERROR: failed to solve: process "/bin/bash -c go mod download &&    go install golang.org/x/tools/gopls@latest &&    go install golang.org/x/tools/cmd/guru@latest &&    go install github.com/golang/mock/mockgen@v1.7.0-rc.1 &&    go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26 &&    go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1 &&    go install github.com/mitchellh/protoc-gen-go-json@v1.1.0 &&    go install github.com/veraison/corim/cocli@latest &&    go install github.com/veraison/evcli/v2@latest &&    go install github.com/veraison/pocli@latest &&    go install github.com/go-delve/delve/cmd/dlv@latest" did not complete successfully: exit code: 1

Workaround

I did manage to build everything early last week, but when trying to rebuild on Thursday/Friday it didn't work anymore, so this is a recent issue. If I rollback the DLV version it works:

diff --git a/deployments/docker/src/builder.docker b/deployments/docker/src/builder.docker
index c947d52..28b6d6a 100644
--- a/deployments/docker/src/builder.docker
+++ b/deployments/docker/src/builder.docker
@@ -63,7 +63,7 @@ RUN go mod download &&\
     go install github.com/veraison/corim/cocli@latest &&\
     go install github.com/veraison/evcli/v2@latest &&\
     go install github.com/veraison/pocli@latest &&\
-    go install github.com/go-delve/delve/cmd/dlv@latest
+    go install github.com/go-delve/delve/cmd/dlv@v1.22.1

 ADD --chown=builder:builder builder-dispatcher .
 ADD --chown=builder:builder builder-bashrc /home/builder/.bashrc
thomas-fossati commented 3 months ago

Thanks @jpbrucker, I confirm I can repro this on the latest main (i.e., https://github.com/veraison/services/commit/b82111a3b29638ed5a587a690e5ace40824626e0).

Also, the fix you suggested works.

Since we are not relying on any specific delve feature introduced with v1.23.0 (the one that breaks), we can safely pin it to v1.22.1.

@setrofim what do you think?

setrofim commented 3 months ago

@setrofim what do you think?

IMO, we're better off upgrading Go than letting things go stale on an old compiler version, but we can leave that discussion for later. I'm find with pinning to v1.22.1 as a quick fix for now.

I'll implement the fix.

setrofim commented 3 months ago

I'll implement the fix.

ok, never mind :)

thomas-fossati commented 3 months ago

@setrofim what do you think?

IMO, we're better off upgrading Go than letting things go stale on an old compiler version, but we can leave that discussion for later. I'm find with pinning to v1.22.1 as a quick fix for now.

In general, I agree. I think in this situation a quick workaround is warranted.

I'll implement the fix.

oops :-)