Skip to content

Add Protolock.#675

Merged
istio-testing merged 5 commits intoistio:masterfrom
jeffmendoza:protolock-2
Oct 31, 2018
Merged

Add Protolock.#675
istio-testing merged 5 commits intoistio:masterfrom
jeffmendoza:protolock-2

Conversation

@jeffmendoza
Copy link
Copy Markdown
Contributor

Move the protoc docker files to tools/protoc. Add docker files for
protolock image. Update Makefile precommit hook and prow presubmit
check to run protolock.

The contents of tools/protolock will need to be built and pushed to gcr.io/istio-testing/protolock:2018-10-23 before merging for this PR to work.

Move the protoc docker files to tools/protoc. Add docker files for
protolock image. Update Makefile precommit hook and prow presubmit
check to run protolock.
@googlebot googlebot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Oct 24, 2018
@ozevren ozevren requested review from geeknoid and hklai and removed request for andraxylia October 24, 2018 16:28
@jeffmendoza
Copy link
Copy Markdown
Contributor Author

Also, we will need to get protolock on CircleCI.

@ozevren
Copy link
Copy Markdown
Contributor

ozevren commented Oct 24, 2018

@hklai @geeknoid PTAL. Jeff is introducing protolock (https://github.com/nilslice/protolock) into istio/api.

@geeknoid
Copy link
Copy Markdown
Contributor

Looks promising.

@ozevren
Copy link
Copy Markdown
Contributor

ozevren commented Oct 24, 2018

Also, we will need to get protolock on CircleCI.

Is the reason for the call to protolock in each Makefile entry? Can we remove it to expedite things?

@kyessenov
Copy link
Copy Markdown
Contributor

With circle, you might want to put all the tools into the base image for circle jobs. That would also work for prow, by the way.

@jeffmendoza
Copy link
Copy Markdown
Contributor Author

Is the reason for the call to protolock in each Makefile entry? Can we remove it to expedite things?

This is the recommended usage:

 $ protolock status && protoc -I ...

This way if a developer runs make generate-routing-go, for example, they will know right away that they broke the proto.

The status command is taking ~20ms on my computer.

@jeffmendoza
Copy link
Copy Markdown
Contributor Author

With circle, you might want to put all the tools into the base image for circle jobs. That would also work for prow, by the way.

Ah, hmm, it looks like the Circle config is using "gcr.io/istio-testing/protoc:2018-06-12" as the image. So, we will need an image with both protoc and protolock it seems.

@ozevren
Copy link
Copy Markdown
Contributor

ozevren commented Oct 24, 2018

Perhaps we can use multi-stage builds to create a top-level image?
https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds

I suspect we really want to version each tool separately.

@jeffmendoza
Copy link
Copy Markdown
Contributor Author

jeffmendoza commented Oct 24, 2018

Perhaps we can use multi-stage builds to create a top-level image?

Sounds good. I'll add that

@jeffmendoza
Copy link
Copy Markdown
Contributor Author

Added tools/all which we can build and use for CircleCI, and potentially Prow in the future.

@ozevren
Copy link
Copy Markdown
Contributor

ozevren commented Oct 24, 2018

Ok. Do you have permissions to upload the generated image to GCR? If not, @hklai can help there.
Once the image is there, let's get the presubmit passing and shoot for getting this in.

@jeffmendoza
Copy link
Copy Markdown
Contributor Author

No, I don't.

@hklai
Copy link
Copy Markdown
Contributor

hklai commented Oct 24, 2018

@jeffmendoza I can add you to istio-testing so you can push, or I can clone this PR and do it myself (later today) if this PR is ready.

Let me know.

@jeffmendoza
Copy link
Copy Markdown
Contributor Author

jeffmendoza commented Oct 24, 2018 via email

@jeffmendoza
Copy link
Copy Markdown
Contributor Author

/test api-presubmit

@jeffmendoza
Copy link
Copy Markdown
Contributor Author

Looks like prow is working.

Circle CI config needs to be update to use the gcr.io/istio-testing/api-build-tools:2018-10-24 image instead of the current one:

ap-circle

@hklai Can you do this?

@ozevren
Copy link
Copy Markdown
Contributor

ozevren commented Oct 24, 2018 via email

@jeffmendoza
Copy link
Copy Markdown
Contributor Author

@ozevren All CI config updated and passing.

@ozevren
Copy link
Copy Markdown
Contributor

ozevren commented Oct 31, 2018

/lgtm
/approve

@istio-testing
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ozevren

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@istio-testing istio-testing merged commit 011906d into istio:master Oct 31, 2018
@jeffmendoza jeffmendoza deleted the protolock-2 branch October 31, 2018 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants