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

Add explicit local version of agones in go.mod #706

Merged
merged 2 commits into from
Apr 16, 2019

Conversation

aLekSer
Copy link
Collaborator

@aLekSer aLekSer commented Apr 15, 2019

Update go.mod which is used by ahmetb/gen-crd-api-reference-docs
utility. Now go does not upload the file from agones.dev/agones repo
instead uses local version of sources.

Closes #705.
For #682 will generate docs properly.

Update go.mod which is used by ahmetb/gen-crd-api-reference-docs
utility. Now go does not upload the file from agones.dev/agones repo
instead uses local version of sources.
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: e1391042-57df-40b0-970e-8c551d43a1df

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/706/head:pr_706 && git checkout pr_706
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-697ef1c

@markmandel
Copy link
Member

LGTM, but sanity check - @heartrobotninja you see any issues?

@heartrobotninja
Copy link
Contributor

Would it make sense to make the agones import path absolute instead of relative?

@aLekSer
Copy link
Collaborator Author

aLekSer commented Apr 16, 2019

The gen-crd-api-reference-docs utility need relative path, go mod command could accept absolute, need to check.

@markmandel markmandel added kind/bug These are bugs. kind/documentation Documentation for Agones labels Apr 16, 2019
@markmandel markmandel added this to the 0.10.0 milestone Apr 16, 2019
Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚒

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 74741215-f4d0-4eaf-aec3-6181bb562284

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 6f65b2ed-5cca-4357-8738-d8835919ea3c

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/706/head:pr_706 && git checkout pr_706
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-fc1867b

Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I'm going to block this.. since it changes go.mod... (and it feels like we should commit the change to go.mod?) and then if I try and run:

➜  build git:(master) ✗ make build-controller-binary
mkdir -p ~/.kube/
mkdir -p /home/markmandel/workspace/agones/src/agones.dev/agones/build//.gocache
mkdir -p /home/markmandel/workspace/agones/src/agones.dev/agones/build//.config/gcloud
mkdir -p ~/.helm
docker run --rm -e "CGO_ENABLED=0" -e "GO111MODULE=on" -w /go/src/agones.dev/agones -v /home/markmandel/workspace/agones/src/agones.dev/agones/build//.config/gcloud:/root/.config/gcloud -v ~/.kube/:/root/.kube -v ~/.helm:/root/.helm -v /home/markmandel/workspace/agones/src/agones.dev/agones:/go/src/agones.dev/agones -v /home/markmandel/workspace/agones/src/agones.dev/agones/build//.gocache:/root/.cache/go-build -v /home/markmandel/workspace/agones/src/agones.dev/agones/build//.gomod:/go/pkg/mod agones-build:4f3bdaf670 go build -mod=vendor \
-tags none -o /go/src/agones.dev/agones/cmd/controller/bin/controller \
 -ldflags "-X agones.dev/agones/pkg.Version=0.10.0-97fdbf6" -installsuffix cgo agones.dev/agones/cmd/controller
go: errors parsing go.mod:
/go/src/agones.dev/agones/go.mod:59: invalid module version latest: module lookup disabled by -mod=vendor
Makefile:285: recipe for target 'build-controller-binary' failed
make: *** [build-controller-binary] Error 1

As you can see, it breaks things. So this is a little scary 😢

@aLekSer
Copy link
Collaborator Author

aLekSer commented Apr 16, 2019

I need to investigate this, however it looks strange, cause I make change only in local directory:

cd /go/src/github.com/ahmetb/gen-crd-api-reference-docs
#Use local version of agones
go mod edit --replace=agones.dev/agones@latest=../../../agones.dev/agones/
go build

@markmandel
Copy link
Member

Oh! I read this wrong. Sorry, entirely my fault. Merging!

Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not smart. Sorry! Merging!

@markmandel markmandel merged commit 063fc93 into googleforgames:master Apr 16, 2019
@aLekSer
Copy link
Collaborator Author

aLekSer commented Apr 16, 2019

The new go mod versioning system could lead to some misunderstandings at first.

@aLekSer aLekSer deleted the fix/gen-crd-api branch April 16, 2019 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug These are bugs. kind/documentation Documentation for Agones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gen-api-docs make target is not generating API docs for GameServerAllocation
4 participants