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

Use a consistent build id between bazel/kubeadm pull jobs. #2509

Merged
merged 2 commits into from
May 11, 2017

Conversation

pipejakob
Copy link
Contributor

Since the kubeadm e2e job uses the CI artifacts pushed by the bazel job, make sure we use a consistent id for their storage (the Kubernetes version isn't stable for pull jobs since each job pulls and applies the PR at different times, resulting in different commit SHAs).

The PULL_NUMBER isn't actually required for uniqueness of this location, but having it as part of the hierarchy makes it easy to find all bazel builds for a PR since this identifier is much friendlier than PULL_REFS, e.g.:

$ gsutil ls gs://kubernetes-release-dev/bazel/44362/
gs://kubernetes-release-dev/bazel/44362/master:ef2edcc94ef07fd782569e72b0da6255b96e3e76,44362:ebe32554395c85b42ee34d7f5901a211bbf80cf1/

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 14, 2017
@fejta
Copy link
Contributor

fejta commented Apr 25, 2017

/assign

I would like the two of us to work on a plan to migrate these jobs (and all the other kubeadm jobs) to a python scenario like the other PR jobs: https://github.com/kubernetes/test-infra/blob/master/jobs/config.json#L286

Also jobs should be hermetic, we should depend on the output from job X in order to run Y.

@pipejakob
Copy link
Contributor Author

Sure, this particular job (the pull variant) is the only one that uses a shell script, and should be easy to convert. The CI and periodic variants of kubeadm e2e jobs are all scenario-based.

@fejta
Copy link
Contributor

fejta commented Apr 26, 2017

Any chance I can convince you to do this in this PR or would you prefer to defer to a later one?

@pipejakob
Copy link
Contributor Author

Sure. I think the two changes are fundamentally isolated, though, so I'll keep them as separate commits.

@fejta
Copy link
Contributor

fejta commented Apr 27, 2017

/lgtm

I would really prefer to see these shell scripts die in a fiery ball of death

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 27, 2017
@pipejakob pipejakob force-pushed the bazel-pull-ci-id-pr branch 2 times, most recently from 1b011d1 to 431379e Compare May 9, 2017 18:12
@pipejakob
Copy link
Contributor Author

Okay, I've added a second commit to convert the pull job to the kubernetes_e2e.py scenario like the other kubeadm variants. Care to take another look?

@pipejakob
Copy link
Contributor Author

(After I fix all of those new bazel failures, of course!)

@pipejakob pipejakob force-pushed the bazel-pull-ci-id-pr branch 5 times, most recently from ab983de to dcf0219 Compare May 9, 2017 21:49
@pipejakob pipejakob removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 9, 2017
@@ -313,28 +339,15 @@ def main(args):
cluster = args.cluster or 'e2e-gce-%s-%s' % (
os.environ['NODE_NAME'], os.getenv('EXECUTOR_NUMBER', 0))

if args.kubeadm:
if args.kubeadm is not None:
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 Author

Choose a reason for hiding this comment

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

Hunh, I thought I was having trouble with that syntax after changing this from a boolean, but it definitely works. I've reverted it back to the original "if args.kubeadm:".

@fejta
Copy link
Contributor

fejta commented May 10, 2017

Fabulous, thanks so much for doing this!

/cc @krzyzacy

@k8s-ci-robot k8s-ci-robot requested a review from krzyzacy May 10, 2017 17:55
@fejta
Copy link
Contributor

fejta commented May 10, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2017
@@ -252,6 +254,8 @@ presubmits:
- "--pull=$(PULL_REFS)"
- "--upload=gs://kubernetes-jenkins/pr-logs"
- "--git-cache=/root/.cache/git"
- "--timeout=75"
- "--json"
Copy link
Member

Choose a reason for hiding this comment

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

maybe now --json can be in the image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah, good point. I'll add a personal TODO to follow this up with another PR.

@krzyzacy
Copy link
Member

/lgtm
no blocking, it looks like a better world :-)
please rebase

Since the kubeadm e2e job uses the CI artifacts pushed by the bazel job,
make sure we use a consistent id for their storage (the Kubernetes
version isn't stable for pull jobs since each job pulls and applies the
PR at different times, resulting in different commit SHAs).
This also changes the --kubeadm boolean flag in kubernetes_e2e.py to an
option to specify the type of job (ci, pull, periodic) so that it knows
where to find the .deb artifacts created by the previous bazel job,
since the output location can differ by type.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants