-
Notifications
You must be signed in to change notification settings - Fork 276
docs(development_guide/READEME.md): add notes on missing configurations #5132
Conversation
…ns for local development Signed-off-by: Wen Lin <[email protected]>
The OSM packages rely on many external Go libraries. | ||
|
||
Take a peek at the `go.mod` file in the root of this repository to see all dependencies. | ||
The OSM packages rely on many external Go libraries. Take a peek at the [go.mod](https://github.com/openservicemesh/osm/blob/main/go.mod) file in the root of this repository to see all dependencies. | ||
|
||
Run `go get -d ./...` to download all required Go packages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is your go version and are you running these commands in your GOPATH?
I thought running go get is no longer required with never versions of golang, but it might be becuase I don't use GOPATH:
go help gopath-get
The 'go get' command changes behavior depending on whether the
go command is running in module-aware mode or legacy GOPATH mode.
should this maybe updated to go mod tidy
? which shouldn't require setting GO111MODULE
.
I think since 1.17+ GO111MODULE=on
is the default behavior. In my local env I don't have it set:
❯ go env
GO111MODULE=""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My go version is : go version go1.19.1 darwin/amd64
. I think this is the latest version. Interestingly, GO111MODULE
is off
by default. I am not sure this is because I installed go through Homebrew.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it off
or empty? If it is off
I would be surprised but could be something to do with the homebrew installation
(NOTE: these requirements are true for automatic demo deployment using the available demo scripts; [#1416](https://github.com/openservicemesh/osm/issues/1416) tracks an improvement to not strictly require these and use upstream images from official dockerhub registry if a user does not want/need changes on the code) | ||
> Note: These requirements are true for automatic demo deployment using the available demo scripts; [#1416](https://github.com/openservicemesh/osm/issues/1416) tracks an improvement to not strictly require these and use upstream images from official dockerhub registry if a user does not want/need changes on the code | ||
|
||
> Note: For local development, you need to set the `CTR_TAG` environment variable. Without `CTR_TAG`, commands like `make docker-build` and `make build-osm-all` will fail. Example: `export CTR_TAG=latest-main` . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is surprising as well. The tag is defaulted in the make file:
Line 7 in 444ccbf
CTR_TAG ?= latest-main |
did you modify any of the env
files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't change the env file. I tested again with main branch again and you are CORRECT. I think the error might be resolved by another fix I did: log into docker in command line and log into DockerHub on my Docker desktop. I will change Note. The fix I did was from a docker issue.
@lam-man sorry you had so much trouble, If you run into issues you can always reach out in slack (info on how to join in https://github.com/openservicemesh/osm#community) |
Hi James. Not a problem at all. I am in the community Slack. I will try to ask setup questions in the slack channel next time. Thanks for your replies. |
I think the notes I added didn't apply to all. I will close this PR. However, I still think a revisit of the development guide is needed. Thanks! |
If you have suggestions would be happy to review |
Thanks James. I will go over the document again. Those problems could be caused by the way I install my Golang. |
Add missing configurations for local development setup
Signed-off-by: Wen Lin [email protected]
Description:
While following the development guide to set up my local environment for development, I found the following missing configurations and it is not easy to figure out. I think it will be helpful for others who want to contributing to OSM.
GO111MODULE=on
. The default value isoff
and will cause the errors while download dependencies usinggo get -d ./...
. Example error:export CTR_TAG=latest-main
in .env file. Without the tag, commands likemake docker-build
andmake build-osm-all
will have the following error:Testing done:
Tested locally. No other tests needed.
Affected area:
Please answer the following questions with yes/no.
Does this change contain code from or inspired by another project? NO
Is this a breaking change? NO
Has documentation corresponding to this change been updated in the osm-docs repo (if applicable)? N/A