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

glide, makefile, and circleCI #3

Merged
merged 17 commits into from
Oct 24, 2017
Merged

glide, makefile, and circleCI #3

merged 17 commits into from
Oct 24, 2017

Conversation

rshriram
Copy link
Member

Makefile with some useful stuff, glide.yaml to initialize the code base.

Signed-off-by: Shriram Rajagopalan [email protected]

Signed-off-by: Shriram Rajagopalan <[email protected]>
@mattklein123
Copy link
Member

@rshriram FYI I'm going to make Circle a required check right now, pending the rest of the reviews you all are doing.

Shriram Rajagopalan added 3 commits October 23, 2017 16:13
Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
@rshriram
Copy link
Member Author

Yep thanks.

Shriram Rajagopalan added 8 commits October 23, 2017 16:55
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]>
@rshriram rshriram changed the title glide and makefile glide, makefile, and circleCI Oct 24, 2017
@rshriram
Copy link
Member Author

@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.

@rshriram
Copy link
Member Author

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 \

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

Copy link
Contributor

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

Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@bndw bndw left a 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 \
Copy link
Contributor

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:
Copy link
Contributor

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

Copy link
Contributor

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 \
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit -- indentation

Copy link
Member Author

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.

Copy link
Contributor

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]>
@rshriram
Copy link
Member Author

@bndw updated.

Signed-off-by: Shriram Rajagopalan <[email protected]>
build:
working_directory: /go/src/github.com/envoyproxy/go-control-plane
docker:
- image: rshriram/envoy-go-build:956131ed
Copy link
Member

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?

Copy link
Member Author

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
Copy link
Member

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?

Copy link
Member Author

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
Copy link
Member

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?

Copy link
Member Author

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
Copy link
Contributor

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
Copy link
Contributor

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)

Copy link
Member Author

Choose a reason for hiding this comment

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

I just copied this from whatever @junr03 gave me. @junr03 any thoughts on this?

glide.yaml Outdated
- package: golang.org/x/net
subpackages:
- context
- package: github.com/envoyproxy/data-plane-api
Copy link
Contributor

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

Shriram Rajagopalan added 3 commits October 24, 2017 13:46
Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
Signed-off-by: Shriram Rajagopalan <[email protected]>
Copy link
Member

@junr03 junr03 left a 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?

@rshriram
Copy link
Member Author

Yes. That way its simpler in this PR.

@rshriram rshriram merged commit 5cf1c03 into master Oct 24, 2017
@rshriram rshriram deleted the glide branch October 24, 2017 19:39
HeshanSudarshana pushed a commit to HeshanSudarshana/go-control-plane that referenced this pull request Feb 16, 2021
update the issuer dto with certificate path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants