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

[Bug]: start-build-end.sh fails with go.mod file not found #28096

Open
1 of 15 tasks
thomas-flynn-ingka opened this issue Aug 22, 2023 · 2 comments · May be fixed by #32732
Open
1 of 15 tasks

[Bug]: start-build-end.sh fails with go.mod file not found #28096

thomas-flynn-ingka opened this issue Aug 22, 2023 · 2 comments · May be fixed by #32732

Comments

@thomas-flynn-ingka
Copy link

What happened?

I cloned the repository, ran start-build-env.sh and after a while it fails with

=> ERROR [7/8] RUN go get github.com/linkedin/goavro/v2 0.1s

[7/8] RUN go get github.com/linkedin/goavro/v2:
0.134 go: go.mod file not found in current directory or any parent directory.
0.134 'go get' is no longer supported outside a module.
0.134 To build and install a command, use 'go install' with a version,
0.134 like 'go install example.com/cmd@latest'
0.134 For more information, see https://golang.org/doc/go-get-install-deprecation
0.134 or run 'go help get' or 'go help install'.


Dockerfile:10

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
@mohamedawnallah
Copy link
Contributor

.take-issue

@leo9827
Copy link

leo9827 commented Sep 13, 2023

I try to do this and it works:
first, comment 'RUN go get github.com/linkedin/goavro/v2' in start-build-env.sh
second, run start-build-env.sh
now, if there dont have other questions you will in [Beam Build Env]:~/beam
and then do this:

cd $GOPATH && go get github.com/linkedin/goavro/v2 && cd -

it will download the package: github.com/linkedin/goavro/v2 in ./pkg/mod/github


I try to add this to start-build-env.sh's Dockerfile content but it's not working:

...
ENV GOPATH ${DOCKER_HOME_DIR}/beam/sdks/go/examples/.gogradle/project_gopath
# switch to GOPATH to run go get command
WORKDIR ${DOCKER_HOME_DIR}/beam/sdks/go/examples/.gogradle/project_gopath/src
COPY . .
# This next command still runs as root causing the ~/.cache/go-build to be owned by root
RUN go get github.com/linkedin/goavro/v2
...

@mohamedawnallah mohamedawnallah removed their assignment Mar 19, 2024
SidheshwarSarangal added a commit to SidheshwarSarangal/beam that referenced this issue Oct 10, 2024
@SidheshwarSarangal SidheshwarSarangal linked a pull request Oct 10, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants