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

Build release tars using bazel #39898

Merged
merged 7 commits into from Jan 18, 2017

Conversation

ixdy
Copy link
Member

@ixdy ixdy commented Jan 13, 2017

What this PR does / why we need it: builds equivalents of the various kubernetes release tarballs, solely using bazel.

For example, you can now do

$ make bazel-release
$ hack/e2e.go -v -up -test -down

Special notes for your reviewer: this is currently dependent on ixdy/bazel@3b29803, which I have yet to turn into a pull request, since I'm still trying to figure out if this is the best approach.

Basically, the issue comes up with the way we generate the various server docker image tarfiles and load them on nodes:

  • we md5sum the binary being encapsulated (e.g. kube-proxy) and save that to $binary.docker_tag in the server tarball
  • we then build the docker image and tag using that md5sum (e.g. gcr.io/google_containers/kube-proxy:$MD5SUM)
  • we docker save this image, which embeds the full tag in the $binary.tar file.
  • on cluster startup, we docker load these tarballs, which are loaded with the tag that we'd created at build time. the nodes then use the $binary.docker_tag file to find the right image.

With the current bazel docker_build rule, the tag isn't saved in the docker image tar, so the node is unable to find the image after docker loading it.

My changes to the rule save the tag in the docker image tar, though I don't know if there are subtle issues with it. (Maybe we want to only tag when --stamp is given?)

Also, the docker images produced by bazel have the timestamp set to the unix epoch, which is not great for debugging. Might be another thing to change with a --stamp.

Long story short, we probably need to follow up with bazel folks on the best way to solve this problem.

Release note:

NONE

@ixdy ixdy added the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Jan 13, 2017
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 13, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-github-robot k8s-github-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. labels Jan 13, 2017
@ixdy ixdy force-pushed the bazel-release-tars branch 3 times, most recently from 386b1bc to fff44e7 Compare January 14, 2017 00:05
@k8s-ci-robot
Copy link
Contributor

Jenkins kops AWS e2e failed for commit 386b1bcf1ae7959924a34401f63d92ef5a122e94. Full PR test history. cc @ixdy

The magic incantation to run this job again is @k8s-bot kops aws e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot
Copy link
Contributor

Jenkins verification failed for commit 386b1bcf1ae7959924a34401f63d92ef5a122e94. Full PR test history. cc @ixdy

The magic incantation to run this job again is @k8s-bot verify test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot
Copy link
Contributor

Jenkins GCE etcd3 e2e failed for commit fff44e7fd6da44c85369da83fe24b12b17485af6. Full PR test history. cc @ixdy

The magic incantation to run this job again is @k8s-bot gce etcd3 e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot
Copy link
Contributor

Jenkins GCI GCE e2e failed for commit fff44e7fd6da44c85369da83fe24b12b17485af6. Full PR test history. cc @ixdy

The magic incantation to run this job again is @k8s-bot gci gce e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot
Copy link
Contributor

Jenkins unit/integration failed for commit fff44e7fd6da44c85369da83fe24b12b17485af6. Full PR test history. cc @ixdy

The magic incantation to run this job again is @k8s-bot unit test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot
Copy link
Contributor

Jenkins CRI GCE Node e2e failed for commit fff44e7fd6da44c85369da83fe24b12b17485af6. Full PR test history. cc @ixdy

The magic incantation to run this job again is @k8s-bot cri node e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot
Copy link
Contributor

Jenkins GCE e2e failed for commit fff44e7fd6da44c85369da83fe24b12b17485af6. Full PR test history. cc @ixdy

The magic incantation to run this job again is @k8s-bot cvm gce e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot
Copy link
Contributor

Jenkins Kubemark GCE e2e failed for commit fff44e7fd6da44c85369da83fe24b12b17485af6. Full PR test history. cc @ixdy

The magic incantation to run this job again is @k8s-bot kubemark e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@ixdy
Copy link
Member Author

ixdy commented Jan 14, 2017

making a few changes/fixes, sorry for the noise.

I think this should be working now.

@ixdy
Copy link
Member Author

ixdy commented Jan 14, 2017

I think this should be working now.

I lied. But maybe now.

@k8s-ci-robot
Copy link
Contributor

Jenkins GCE Node e2e failed for commit 1ecca07. Full PR test history. cc @ixdy

The magic incantation to run this job again is @k8s-bot node e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@spxtr
Copy link
Contributor

spxtr commented Jan 14, 2017

@k8s-bot node e2e test this
#35983

tags = ["automanaged"],
)

# TODO(#3579): This is a temporary hack. It gathers up the yaml,
Copy link
Contributor

Choose a reason for hiding this comment

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

How temporary?

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 copied the comment from here. I'm still not sure if it's necessary or not.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, "temporary"


genrule(
name = "dummy",
outs = [".dummy"],
Copy link
Contributor

Choose a reason for hiding this comment

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

😕

@spxtr
Copy link
Contributor

spxtr commented Jan 17, 2017

Overall this looks really spiffy. Have you reached out to the bazel people about the docker rule updates?

@spxtr
Copy link
Contributor

spxtr commented Jan 17, 2017

I'm not too happy the build speeds, but we can optimize later. It's still significantly faster than make quick-release for both the initial and incremental builds.

cmd = "touch $@",
)

# Some of the startup scripts fail if there isn't an addons/ directory in the server tarball.
Copy link
Member

Choose a reason for hiding this comment

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

TODOD: delete this

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, this part makes me sad. I'm not sure how many places assume server/addons/ exists, but that can hopefully be addressed in a follow-up.

@mikedanese
Copy link
Member

This is so beautiful i cried

@mikedanese
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 18, 2017
@k8s-ci-robot
Copy link
Contributor

Jenkins GCI GKE smoke e2e failed for commit 1ecca07. Full PR test history. cc @ixdy

The magic incantation to run this job again is @k8s-bot gci gke e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot
Copy link
Contributor

Jenkins GKE smoke e2e failed for commit 1ecca07. Full PR test history. cc @ixdy

The magic incantation to run this job again is @k8s-bot cvm gke e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@ixdy
Copy link
Member Author

ixdy commented Jan 18, 2017

@k8s-bot gke e2e test this

@ixdy ixdy removed the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Jan 18, 2017
@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit b29d9cd into kubernetes:master Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants