martaannaj / RecommenderServer

GNU General Public License v3.0
1 stars 2 forks source link

Error in blubber-build.sh #76

Closed goramartin closed 11 months ago

goramartin commented 11 months ago

Hello, I have been trying to build the docker images based on the current repo, since the image in docker-hub seems to be updated 2 years ago. I was trying blubber-build.sh scripts which, if I understood correctly, should build the desired images. But I encountered error during the blubber-prepare.sh phase.

Seems like the version used as a base is go1.17 but the dependencies need to have at least go 1.19.

sudo ./blubber-build.sh
Error response from daemon: No such container: recommenderserver-test
Error response from daemon: No such image: recommenderserver-test:latest
Error response from daemon: No such container: recommenderserver
Error response from daemon: No such image: recommenderserver:latest
[+] Building 28.3s (10/10) FINISHED                                                                      docker:default
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 1.02kB                                                                             0.0s
 => [internal] load metadata for docker-registry.wikimedia.org/golang1.17:latest                                   1.7s
 => [internal] load build context                                                                                  4.2s
 => => transferring context: 544.43MB                                                                              4.2s
 => [1/6] FROM docker-registry.wikimedia.org/golang1.17:latest@sha256:15107cb85407f82ca3fb04e8585910f031f3ce9f2b  18.1s
 => => resolve docker-registry.wikimedia.org/golang1.17:latest@sha256:15107cb85407f82ca3fb04e8585910f031f3ce9f2bd  0.0s
 => => sha256:15107cb85407f82ca3fb04e8585910f031f3ce9f2bd34d1f68db5f964dee6d9a 1.16kB / 1.16kB                     0.0s
 => => sha256:1b3811c5531bf33c4f633fa08b1b76fecca838a53fed041db54deb6d56d0a53b 3.79kB / 3.79kB                     0.0s
 => => sha256:fbc076d65ab17967aa74dcbfabe100e83eb2e9294a258fd3a83b417353fd948d 31.43MB / 31.43MB                   2.4s
 => => sha256:dfe8ad59b673a1a42cebbc23b9b69d51da3ffe8b092eb30e3708b2f620440670 263B / 263B                         0.6s
 => => sha256:d93fc5c33d5abf11d8d2b5d48858a60cec9ffd1a6a00d5077e592c779923891f 246B / 246B                         0.6s
 => => sha256:1ff727f5f47e7de95d8f0e0550b193698d62ca22387c4b98713a4b6134d01a21 218.91MB / 218.91MB                 9.4s
 => => extracting sha256:fbc076d65ab17967aa74dcbfabe100e83eb2e9294a258fd3a83b417353fd948d                          1.9s
 => => extracting sha256:dfe8ad59b673a1a42cebbc23b9b69d51da3ffe8b092eb30e3708b2f620440670                          0.0s
 => => extracting sha256:d93fc5c33d5abf11d8d2b5d48858a60cec9ffd1a6a00d5077e592c779923891f                          0.0s
 => => extracting sha256:1ff727f5f47e7de95d8f0e0550b193698d62ca22387c4b98713a4b6134d01a21                          8.4s
 => [2/6] RUN (getent group "65533" || groupadd -o -g "65533" -r "somebody") && (getent passwd "65533" || useradd  1.3s
 => [3/6] RUN (getent group "900" || groupadd -o -g "900" -r "runuser") && (getent passwd "900" || useradd -l -o   0.3s
 => [4/6] WORKDIR /srv                                                                                             0.0s
 => [5/6] COPY --chown=65533:65533 [./, .]                                                                         0.8s
 => ERROR [6/6] RUN ./blubber-prepare.sh                                                                           6.0s
------
 > [6/6] RUN ./blubber-prepare.sh:
0.539 go: downloading github.com/spf13/cobra v1.7.0
0.539 go: downloading github.com/pkg/errors v0.9.1
0.541 go: downloading gitlab.com/tozd/go/mediawiki v0.14.0
0.543 go: downloading google.golang.org/protobuf v1.31.0
0.545 go: downloading github.com/google/uuid v1.3.1
0.547 go: downloading gitlab.com/tozd/go/errors v0.8.0
0.622 go: downloading github.com/pingcap/parser v0.0.0-20210802034743-dd9b189324ce
0.622 go: downloading gitlab.com/tozd/go/x v0.0.0-20231005202212-8fab71759a8f
0.622 go: downloading github.com/elliotchance/phpserialize v1.3.3
0.622 go: downloading github.com/klauspost/pgzip v1.2.6
0.622 go: downloading github.com/foolin/pagser v0.1.5
0.622 go: downloading golang.org/x/text v0.13.0
0.623 go: downloading github.com/hashicorp/go-retryablehttp v0.7.4
0.623 go: downloading github.com/cosnicolaou/pbzip2 v1.0.3
0.637 go: downloading github.com/hashicorp/go-cleanhttp v0.5.2
0.639 go: downloading github.com/whilp/git-urls v1.0.0
0.639 go: downloading github.com/go-git/go-git/v5 v5.9.0
0.641 go: downloading github.com/spf13/cast v1.5.1
0.641 go: downloading github.com/PuerkitoBio/goquery v1.8.1
0.645 go: downloading github.com/klauspost/compress v1.17.1
0.647 go: downloading github.com/spf13/pflag v1.0.5
0.678 go: downloading golang.org/x/net v0.17.0
0.678 go: downloading github.com/andybalholm/cascadia v1.3.2
0.753 go: downloading github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63
0.753 go: downloading github.com/pingcap/log v1.1.0
0.753 go: downloading go.uber.org/zap v1.26.0
0.765 go: downloading go.uber.org/atomic v1.11.0
0.765 go: downloading gopkg.in/natefinch/lumberjack.v2 v2.2.1
0.783 go: downloading github.com/go-git/go-billy/v5 v5.5.0
0.783 go: downloading dario.cat/mergo v1.0.0
0.783 go: downloading github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c
0.787 go: downloading github.com/sergi/go-diff v1.3.1
0.787 go: downloading github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376
0.787 go: downloading github.com/pjbgf/sha1cd v0.3.0
0.790 go: downloading github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
0.791 go: downloading github.com/emirpasic/gods v1.18.1
0.791 go: downloading golang.org/x/sys v0.13.0
0.792 go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
0.792 go: downloading github.com/kevinburke/ssh_config v1.2.0
0.793 go: downloading github.com/skeema/knownhosts v1.2.1
0.802 go: downloading github.com/xanzy/ssh-agent v0.3.3
0.806 go: downloading golang.org/x/crypto v0.14.0
0.814 go: downloading gopkg.in/warnings.v0 v0.1.2
0.815 go: downloading github.com/cyphar/filepath-securejoin v0.2.4
0.824 go: downloading go.uber.org/multierr v1.11.0
0.863 go: downloading github.com/cloudflare/circl v1.3.3
3.708 # go.uber.org/zap/internal/pool
3.708 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:34:13: syntax error: unexpected any, expecting ]
3.708 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:40:6: missing function body
3.708 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:40:9: syntax error: unexpected [, expecting (
3.708 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:40:27: method has no receiver
3.708 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:43:16: method has no receiver
3.708 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:43:20: syntax error: unexpected {, expecting (
3.708 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:44:5: syntax error: unexpected return, expecting )
3.708 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:45:4: syntax error: non-declaration statement outside function body
3.708 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:51:14: syntax error: unexpected [, expecting comma or )
3.708 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:56:14: syntax error: unexpected [, expecting comma or )
3.708 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:40:6: too many errors
3.708 note: module requires Go 1.19
3.764 # go.uber.org/multierr
3.764 /go/pkg/mod/go.uber.org/multierr@v1.11.0/error.go:209:13: undefined: atomic.Bool
3.764 note: module requires Go 1.19
5.349 # github.com/go-git/go-git/v5
5.349 /go/pkg/mod/github.com/go-git/go-git/v5@v5.9.0/blame.go:518:36: undefined: any
5.349 /go/pkg/mod/github.com/go-git/go-git/v5@v5.9.0/blame.go:519:35: undefined: any
5.349 note: module requires Go 1.19
5.774 Failed to build RecommenderServer!
------
Dockerfile:16
--------------------
  14 |     WORKDIR "/srv"
  15 |     COPY --chown=$LIVES_UID:$LIVES_GID ["./", "."]
  16 | >>> RUN ./blubber-prepare.sh
  17 |     ENTRYPOINT ["bash", "./recommender/blubber-entrypoint-test.sh"]
  18 |
--------------------
ERROR: failed to solve: process "/bin/sh -c ./blubber-prepare.sh" did not complete successfully: exit code: 2
[+] Building 7.0s (10/10) FINISHED                                                                       docker:default
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 1.02kB                                                                             0.0s
 => [internal] load metadata for docker-registry.wikimedia.org/golang1.17:latest                                   0.5s
 => [1/6] FROM docker-registry.wikimedia.org/golang1.17:latest@sha256:15107cb85407f82ca3fb04e8585910f031f3ce9f2bd  0.0s
 => [internal] load build context                                                                                  0.0s
 => => transferring context: 5.02kB                                                                                0.0s
 => CACHED [2/6] RUN (getent group "65533" || groupadd -o -g "65533" -r "somebody") && (getent passwd "65533" ||   0.0s
 => CACHED [3/6] RUN (getent group "900" || groupadd -o -g "900" -r "runuser") && (getent passwd "900" || useradd  0.0s
 => CACHED [4/6] WORKDIR /srv                                                                                      0.0s
 => CACHED [5/6] COPY --chown=65533:65533 [./, .]                                                                  0.0s
 => ERROR [6/6] RUN ./blubber-prepare.sh                                                                           6.4s
------
 > [6/6] RUN ./blubber-prepare.sh:
0.575 go: downloading github.com/spf13/cobra v1.7.0
0.581 go: downloading gitlab.com/tozd/go/mediawiki v0.14.0
0.583 go: downloading gitlab.com/tozd/go/errors v0.8.0
0.583 go: downloading github.com/pkg/errors v0.9.1
0.589 go: downloading google.golang.org/protobuf v1.31.0
0.590 go: downloading github.com/google/uuid v1.3.1
0.648 go: downloading github.com/cosnicolaou/pbzip2 v1.0.3
0.648 go: downloading github.com/elliotchance/phpserialize v1.3.3
0.648 go: downloading golang.org/x/text v0.13.0
0.648 go: downloading github.com/foolin/pagser v0.1.5
0.648 go: downloading gitlab.com/tozd/go/x v0.0.0-20231005202212-8fab71759a8f
0.648 go: downloading github.com/pingcap/parser v0.0.0-20210802034743-dd9b189324ce
0.648 go: downloading github.com/klauspost/pgzip v1.2.6
0.649 go: downloading github.com/hashicorp/go-retryablehttp v0.7.4
0.667 go: downloading github.com/whilp/git-urls v1.0.0
0.667 go: downloading github.com/go-git/go-git/v5 v5.9.0
0.667 go: downloading github.com/hashicorp/go-cleanhttp v0.5.2
0.670 go: downloading github.com/spf13/cast v1.5.1
0.670 go: downloading github.com/PuerkitoBio/goquery v1.8.1
0.672 go: downloading github.com/klauspost/compress v1.17.1
0.673 go: downloading github.com/spf13/pflag v1.0.5
0.710 go: downloading golang.org/x/net v0.17.0
0.710 go: downloading github.com/andybalholm/cascadia v1.3.2
0.784 go: downloading github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63
0.786 go: downloading github.com/pingcap/log v1.1.0
0.786 go: downloading go.uber.org/zap v1.26.0
0.798 go: downloading gopkg.in/natefinch/lumberjack.v2 v2.2.1
0.802 go: downloading go.uber.org/atomic v1.11.0
0.814 go: downloading github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c
0.814 go: downloading github.com/go-git/go-billy/v5 v5.5.0
0.814 go: downloading dario.cat/mergo v1.0.0
0.818 go: downloading github.com/sergi/go-diff v1.3.1
0.818 go: downloading github.com/pjbgf/sha1cd v0.3.0
0.818 go: downloading github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376
0.819 go: downloading github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
0.819 go: downloading github.com/emirpasic/gods v1.18.1
0.821 go: downloading golang.org/x/sys v0.13.0
0.821 go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
0.822 go: downloading github.com/kevinburke/ssh_config v1.2.0
0.830 go: downloading github.com/skeema/knownhosts v1.2.1
0.835 go: downloading github.com/xanzy/ssh-agent v0.3.3
0.841 go: downloading golang.org/x/crypto v0.14.0
0.851 go: downloading gopkg.in/warnings.v0 v0.1.2
0.851 go: downloading github.com/cyphar/filepath-securejoin v0.2.4
0.869 go: downloading go.uber.org/multierr v1.11.0
0.900 go: downloading github.com/cloudflare/circl v1.3.3
4.030 # go.uber.org/zap/internal/pool
4.030 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:34:13: syntax error: unexpected any, expecting ]
4.030 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:40:6: missing function body
4.030 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:40:9: syntax error: unexpected [, expecting (
4.030 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:40:27: method has no receiver
4.030 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:43:16: method has no receiver
4.030 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:43:20: syntax error: unexpected {, expecting (
4.030 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:44:5: syntax error: unexpected return, expecting )
4.030 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:45:4: syntax error: non-declaration statement outside function body
4.030 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:51:14: syntax error: unexpected [, expecting comma or )
4.030 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:56:14: syntax error: unexpected [, expecting comma or )
4.030 /go/pkg/mod/go.uber.org/zap@v1.26.0/internal/pool/pool.go:40:6: too many errors
4.030 note: module requires Go 1.19
4.057 # go.uber.org/multierr
4.057 /go/pkg/mod/go.uber.org/multierr@v1.11.0/error.go:209:13: undefined: atomic.Bool
4.057 note: module requires Go 1.19
5.827 # github.com/go-git/go-git/v5
5.827 /go/pkg/mod/github.com/go-git/go-git/v5@v5.9.0/blame.go:518:36: undefined: any
5.827 /go/pkg/mod/github.com/go-git/go-git/v5@v5.9.0/blame.go:519:35: undefined: any
5.827 note: module requires Go 1.19
6.325 Failed to build RecommenderServer!
------
Dockerfile:16
--------------------
  14 |     WORKDIR "/srv"
  15 |     COPY --chown=$LIVES_UID:$LIVES_GID ["./", "."]
  16 | >>> RUN ./blubber-prepare.sh
  17 |     ENTRYPOINT ["bash", "./recommender/blubber-entrypoint.sh"]
  18 |
--------------------
ERROR: failed to solve: process "/bin/sh -c ./blubber-prepare.sh" did not complete successfully: exit code: 2
miselico commented 11 months ago

Thank you for pointing this out. We need to update everything to 1.19

For now, would it be possible for you to install go 1.19 and run directly?

miselico commented 11 months ago

Actually, this was really easy to fix. Can you give it another try?

goramartin commented 11 months ago

Still failing. I noticed it is also hardcoded in blubber-prepare.sh:

export GOROOT=/usr/lib/go-1.17
export PATH=${GOROOT}/bin:${PATH}
goramartin commented 11 months ago

After further investigation, I noticed it is hardcoded in all of the script files.

miselico commented 11 months ago

Let me get through them.

miselico commented 11 months ago

Done. Would you be so kind to check again?

goramartin commented 11 months ago

It builds. Thank you