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

examples: add go.mod to make examples a separate module #3546

Merged
merged 6 commits into from
Apr 21, 2020

Conversation

chalin
Copy link
Contributor

@chalin chalin commented Apr 17, 2020

Fixes #3539
Supersedes #3540

@dfawley
Copy link
Member

dfawley commented Apr 17, 2020

Looks like the examples test doesn't like this:

https://travis-ci.org/github/grpc/grpc-go/jobs/676263348

Please also run go mod tidy so this creates a go.sum file.

@dfawley dfawley self-requested a review April 17, 2020 16:00
@chalin
Copy link
Contributor Author

chalin commented Apr 17, 2020

We can't do much (including running go mod tidy) without either:

  • A replace rule like:
    go mod edit -replace google.golang.org/grpc@v1.29.0-dev.1=../../
  • Or an actual release v1.29.0-dev.1 containing this PR.

I can add the replace rule for the purpose of testing, but of course we won't want to actually commit it.

Any other suggestions?

@dfawley
Copy link
Member

dfawley commented Apr 17, 2020

Or an actual release v1.29.0-dev.1 containing this PR.

Can we tag this commit with v1.30.0-dev.1 (since this is master and it's on 1.30 now), and reference it in either the same commit -- if that works, which I think it would, even though it's a little paradoxical -- or a subsequent commit?

@chalin chalin changed the title Make examples a module [WIP] Make examples a module Apr 17, 2020
@chalin
Copy link
Contributor Author

chalin commented Apr 17, 2020

FYI, with the replace rule in the examples/go.mod file, all tests are passing, see https://travis-ci.org/github/grpc/grpc-go/builds/676339760:

image

@chalin
Copy link
Contributor Author

chalin commented Apr 17, 2020

(I'm going to remove the replace rule now)

@chalin chalin changed the title [WIP] Make examples a module Make examples a module Apr 17, 2020
@chalin
Copy link
Contributor Author

chalin commented Apr 17, 2020

Without the replace rule, all tests pass except TESTEXTRAS, since v1.30.0-dev.1 is unknown revision: https://travis-ci.org/github/grpc/grpc-go/builds/676345662:

image

@chalin
Copy link
Contributor Author

chalin commented Apr 17, 2020

How would you like to proceed? Given that all tests pass when a grpc package can be found (as shown earlier), maybe consider merging this, and tagging the resulting master branch head as v1.30.0-dev.1?

@dfawley
Copy link
Member

dfawley commented Apr 17, 2020

How would you like to proceed? Given that all tests pass when a grpc package can be found (as shown earlier), maybe consider merging this, and tagging the resulting master branch head as v1.30.0-dev.1?

Did you try tagging your commit in your branch? I'm not sure that will work, but it might be worth a shot. Otherwise I can force merge this and then add the tag after.

@chalin
Copy link
Contributor Author

chalin commented Apr 17, 2020

Did you try tagging your commit in your branch? I'm not sure that will work, but it might be worth a shot. Otherwise I can force merge this and then add the tag after.

Ok, I've tagged the commit and pushed:

$ git push origin v1.30.0-dev.1
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/chalin/grpc-go.git
 * [new tag]           v1.30.0-dev.1 -> v1.30.0-dev.1

Can you restart Travis build #9802? (I don't have the permissions to do so.)

@dfawley
Copy link
Member

dfawley commented Apr 17, 2020

I kicked travis; the EXTRAS run is still failing:

 testing: helloworld 
+go build -o /dev/null ./helloworld/greeter_server/main.go
go: google.golang.org/grpc@v1.30.0-dev.1: reading google.golang.org/grpc/go.mod at revision v1.30.0-dev.1: unknown revision v1.30.0-dev.1

I think this is because go is looking for the tag on github, and it isn't there yet, since it's in this PR. Since it passes with the replace and fails with this message without the replace, then I think we can safely merge this as-is. If github doesn't accept your tag, I'll apply it manually on this commit afterwards.

I'll do this on Monday unless anyone raises any concerns.

@chalin
Copy link
Contributor Author

chalin commented Apr 17, 2020

Thanks for restarting the build. I also suspected that go wouldn't look for tags on anything other than the main repo's master branch. Monday's is good. Have a great weekend!

@chalin
Copy link
Contributor Author

chalin commented Apr 20, 2020

I'll do this on Monday unless anyone raises any concerns.

Still slated to try this today?

@dfawley dfawley added the Type: Documentation Documentation or examples label Apr 21, 2020
@dfawley dfawley added this to the 1.30 Release milestone Apr 21, 2020
@dfawley dfawley changed the title Make examples a module examples: add go.mod to make examples a separate module Apr 21, 2020
@dfawley dfawley merged commit 03def2a into grpc:master Apr 21, 2020
@chalin chalin deleted the chalin-ex-as-mod-200417 branch April 21, 2020 19:25
@chalin
Copy link
Contributor Author

chalin commented Apr 21, 2020

@dfawley - FYI, now that this has been published, my tests work locally, w/o using the replace rule. Maybe the latest TESTEXTRAS Travis job just needs to be restarted. Could you try that?

@chalin
Copy link
Contributor Author

chalin commented Apr 21, 2020

Hurray, the build is green! https://travis-ci.org/github/grpc/grpc-go/builds/677804973
Thanks @dfawley for help in moving this forward!

@dfawley
Copy link
Member

dfawley commented Apr 23, 2020

Everything does seem happy now (it took a few minutes for the go sum DB to be updated, during which time I was mildly concerned)! @chalin will you be making updates to the quick start guide next?

@chalin
Copy link
Contributor Author

chalin commented Apr 23, 2020

... will you be making updates to the quick start guide next?

Yes, that is at the top of my to-do list!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Documentation Documentation or examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make examples a(n independent) module
2 participants