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

Image will not build #114

Open
solarisfire opened this issue Sep 2, 2024 · 3 comments
Open

Image will not build #114

solarisfire opened this issue Sep 2, 2024 · 3 comments

Comments

@solarisfire
Copy link

solarisfire commented Sep 2, 2024

When attempting to build the image myself, I'm running into a slew of issues...

The checksum for two files in go.sum are wrong:

go: downloading github.com/benc-uk/go-starter v1.0.0
verifying github.com/benc-uk/[email protected]/go.mod: checksum mismatch
        downloaded: h1:ZPmn7gOJqaD13x5iGhOriexRSQYUcH2ldNg1XNKxnXI=
        go.sum:     h1:3v1UN921Sp8VMKtItGqd6fAA5OrzIfd1h/ZSIL1YWyg=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.su
go: downloading github.com/benc-uk/go-starter v1.0.0
verifying github.com/benc-uk/[email protected]: checksum mismatch
        downloaded: h1:LFUEEKd3lksZ63JFMnPNLzc0IJyz51H5FLJZSJSJOV0=
        go.sum:     h1:40BfCK5pslAs+vFc6zbJiKCVs/IWxiP3ZMn8+46ywXw=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.

Then there are a bunch of errors around modle decleration/requirement:

go: downloading github.com/benc-uk/go-starter v1.0.0
go: github.com/benc-uk/kubeview/cmd/server imports
        github.com/benc-uk/go-starter/pkg/envhelper: github.com/benc-uk/[email protected]: parsing go.mod:
        module declares its path as: github.com/benc-uk/go-rest-api
                but was required as: github.com/benc-uk/go-starter
go: github.com/benc-uk/kubeview/cmd/server imports
        k8s.io/client-go/rest tested by
        k8s.io/client-go/rest.test imports
        github.com/stretchr/testify/assert: github.com/benc-uk/[email protected]: parsing go.mod:
        module declares its path as: github.com/benc-uk/go-rest-api
                but was required as: github.com/benc-uk/go-starter
go: github.com/benc-uk/kubeview/cmd/server imports
        k8s.io/api/apps/v1 imports
        k8s.io/apimachinery/pkg/runtime tested by
        k8s.io/apimachinery/pkg/runtime.test imports
        github.com/stretchr/testify/require: github.com/benc-uk/[email protected]: parsing go.mod:
        module declares its path as: github.com/benc-uk/go-rest-api
                but was required as: github.com/benc-uk/go-starter
go: github.com/benc-uk/kubeview/cmd/server imports
        k8s.io/apimachinery/pkg/apis/meta/v1 imports
        k8s.io/apimachinery/pkg/labels tested by
        k8s.io/apimachinery/pkg/labels.test imports
        github.com/google/go-cmp/cmp/cmpopts imports
        golang.org/x/xerrors: github.com/benc-uk/[email protected]: parsing go.mod:
        module declares its path as: github.com/benc-uk/go-rest-api
                but was required as: github.com/benc-uk/go-starter
go: github.com/benc-uk/kubeview/cmd/server imports
        k8s.io/api/apps/v1 imports
        k8s.io/apimachinery/pkg/runtime imports
        sigs.k8s.io/structured-merge-diff/v4/value imports
        gopkg.in/yaml.v2 tested by
        gopkg.in/yaml.v2.test imports
        gopkg.in/check.v1: github.com/benc-uk/[email protected]: parsing go.mod:
        module declares its path as: github.com/benc-uk/go-rest-api
                but was required as: github.com/benc-uk/go-starter

And that ends in this build failure:

4.711 cmd/server/main.go:17:2: github.com/benc-uk/[email protected]: parsing go.mod:
4.711   module declares its path as: github.com/benc-uk/go-rest-api
4.711           but was required as: github.com/benc-uk/go-starter
------
Dockerfile:45
--------------------
  44 |     # Also inject version and build details 
  45 | >>> RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build \
  46 | >>>     -ldflags "-X main.version=$VERSION -X 'main.buildInfo=$BUILD_INFO'" \
  47 | >>>     -o server \
  48 | >>>     $GO_PACKAGE
  49 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build     -ldflags \"-X main.version=$VERSION -X 'main.buildInfo=$BUILD_INFO'\"     -o server     $GO_PACKAGE" did not complete successfully: exit code: 1
make: *** [makefile:36: image] Error 1
@solarisfire
Copy link
Author

And the linter errors too:

[solarisfire@solaris-arion kubeview]$ make lint
cd ./cmd/server; /home/solarisfire/Documents/coding_projects/kubeview/bin/golangci-lint  run --modules-download-mode=mod --timeout 3m *.go 
WARN [runner] Can't run linter goanalysis_metalinter: buildir: failed to load package : could not load export data: no export data for "github.com/benc-uk/go-starter/pkg/envhelper" 
ERRO Running error: can't run linter goanalysis_metalinter
buildir: failed to load package : could not load export data: no export data for "github.com/benc-uk/go-starter/pkg/envhelper" 
make: *** [makefile:25: lint] Error 3

@solarisfire
Copy link
Author

I think the biggest issue is not knowing what: /go-starter/pkg/envhelper did...

Everything else I can work around.

@solarisfire
Copy link
Author

Fixed with #115

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

No branches or pull requests

1 participant