-
Notifications
You must be signed in to change notification settings - Fork 515
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
glide, makefile, and circleCI #3
Conversation
Signed-off-by: Shriram Rajagopalan <[email protected]>
@rshriram FYI I'm going to make Circle a required check right now, pending the rest of the reviews you all are doing. |
Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
Yep thanks. |
Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
This reverts commit e73ec18. Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
@kyessenov / @junr03 / @bndw PTAL. Glide setup, automatic version / SHA tagging, and circle ci setup. I also have some bits in there for proto generation using makefile, but its unused. I will leave that to @kyessenov as he is already working on bazel based pb.go generation. |
completes all the tasks in #1 |
Makefile
Outdated
@protoc --go_out=plugins=grpc:pkg/ vendor/github.com/envoyproxy/data-plane-api/api/*.proto \ | ||
--proto_path=vendor/github.com/envoyproxy/data-plane-api \ | ||
--proto_path=vendor/github.com/googleapis/googleapis/ | ||
@protoc --go_out=plugins=grpc:pkg/ vendor/github.com/envoyproxy/data-plane-api/api/filter/*.proto \ |
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 don't think this is right. When I run this command I get a file with imports like this
package envoy_api_v2_filter
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import envoy_api_v21 "api"
import envoy_api_v22 "api"
import envoy_api_v24 "api"
These should be github.com/envoyproxy/go-control-plane/pkg/envoy/api
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.
Looks like the same issue as golang/protobuf#63
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.
Thanks for catching this @davecheney .. I think I will take this line out for now, since @kyessenov is generating protos using bazel (using same proto version as envoy repo), and our plan is to commit these protos into the repo, so that others can just import this library.
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.
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.
Very excited to see this moving
tools: tools.goimports tools.golint tools.govet | ||
|
||
tools.goimports: | ||
@command -v goimports >/dev/null ; if [ $$? -ne 0 ]; then \ |
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.
For the Go dependencies I think the existence check can be removed and go get -u
should be used
Makefile
Outdated
LDFLAGS += -X $(BUILD_SYM).goVersion=$(word 3,$(shell go version)) | ||
|
||
.PHONY: compile | ||
compile: |
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 think this target should be renamed build
Makefile
Outdated
echo "--> installing golint"; \ | ||
go get github.com/golang/lint/golint; \ | ||
fi | ||
|
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.
Can we add an installer for Glide?
tools.glide:
@command -v glide 1>/dev/null ; if [ $$? -ne 0 ]; then \
echo "--> installing glide"; \
curl https://glide.sh/get | sh; \
fi
Makefile
Outdated
@protoc --go_out=plugins=grpc:pkg/ vendor/github.com/envoyproxy/data-plane-api/api/*.proto \ | ||
--proto_path=vendor/github.com/envoyproxy/data-plane-api \ | ||
--proto_path=vendor/github.com/googleapis/googleapis/ | ||
@protoc --go_out=plugins=grpc:pkg/ vendor/github.com/envoyproxy/data-plane-api/api/filter/*.proto \ |
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.
Looks like the same issue as golang/protobuf#63
Makefile
Outdated
|
||
SHELL := /bin/bash | ||
BINDIR := bin | ||
BUILDDIR := build |
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.
Nit -- indentation
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.
Its GH doing the weird thing.. IT looks correct on the terminal.
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.
it's tabs
Signed-off-by: Shriram Rajagopalan <[email protected]>
@bndw updated. |
Signed-off-by: Shriram Rajagopalan <[email protected]>
.circleci/config.yml
Outdated
build: | ||
working_directory: /go/src/github.com/envoyproxy/go-control-plane | ||
docker: | ||
- image: rshriram/envoy-go-build:956131ed |
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.
can we pin to a generic image?
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.
So, the standard go image from circle CI does not have protoc and glide installed. So, i had to create this. I thought that once we land this, we can (a) try to reuse lyft/envoy-build (with some improvements), or push this as a standard build image to dockerhub.
@@ -0,0 +1,16 @@ | |||
#!/bin/bash | |||
VERSION=3.4.0 |
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.
Why are we setting this version var here? It's not used anywhere. Am I missing something?
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.
Duh.. I hardcoded it everywhere else.. good catch
Makefile
Outdated
BUILDDIR := build | ||
DOCKERDIR := docker | ||
RELEASEDIR := release | ||
OUTPUT_NAME := envoyctl |
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.
should this be go-control-plane
?
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.
envoyctl is so cool! :( .. Either way, I thought that this would change rapidly, when we start putting in CLIs in cmd/ folder.. We need one per CLI tool.
Makefile
Outdated
|
||
SHELL := /bin/bash | ||
BINDIR := bin | ||
BUILDDIR := build |
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.
it's tabs
glide.lock
Outdated
hash: d6fc1ffda5336bc94cc564496911ac0f6d812481c65b06e2a7833116cf3d127c | ||
updated: 2017-10-24T09:32:55.826752182-04:00 | ||
imports: | ||
- name: github.com/envoyproxy/data-plane-api |
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.
not needed (there's no code there)
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.
glide.yaml
Outdated
- package: golang.org/x/net | ||
subpackages: | ||
- context | ||
- package: github.com/envoyproxy/data-plane-api |
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.
yup, not needed in glide
Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
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.
@rshriram did you decide to leave the glide.yaml file empty until code starts needing deps?
Yes. That way its simpler in this PR. |
update the issuer dto with certificate path
Makefile with some useful stuff, glide.yaml to initialize the code base.
Signed-off-by: Shriram Rajagopalan [email protected]