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

Travis performance improvement #13304

Merged
merged 1 commit into from
Mar 20, 2019

Conversation

tengqm
Copy link
Contributor

@tengqm tengqm commented Mar 20, 2019

Three optimizations:

  • move example testing logic into a bash script to save travis specifics;
  • use kubernetes release package (about 20MB) instead of git repo (about 800 MB
    at the moment); this cuts the example testing time from ~7 minutes to ~3 minutes;
  • detect whether a PR contains changes to examples and skip examples testing if not.
    This further reduces the example testing job from ~3 minutes to ~1 minute for most PRs.

Closes: #13140

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 20, 2019
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 20, 2019
@netlify
Copy link

netlify bot commented Mar 20, 2019

Deploy preview for kubernetes-io-master-staging ready!

Built with commit 026a9d8

https://deploy-preview-13304--kubernetes-io-master-staging.netlify.com

@tengqm tengqm force-pushed the travis-experiment branch 2 times, most recently from 9b9a8f7 to 43f6e3f Compare March 20, 2019 09:13
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 20, 2019
@tengqm tengqm force-pushed the travis-experiment branch from 43f6e3f to c18ad77 Compare March 20, 2019 09:24
set -e

# List files changed in the commit to check
FILES=`git log -n 2 --name-only --format=""`
Copy link
Contributor

Choose a reason for hiding this comment

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

@tengqm do you need the last 2 commits or only latest one ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. It has to be 2 because according to the travis log, the following operations are automatically performed during environment preparation:

git clone --depth=50 https://github.com/kubernetes/website.git kubernetes/website
cd kubernetes/website
git fetch origin +refs/pull/<PR number>/merge:
git checkout -qf FETCH_HEAD

After the above operations, the latest two commits to website repo are the 'merge' operation and the actual changes made by your PR. The "-n 2" was carefully chosen to ensure we are examining exactly the set of files touched by the PR under testing.

Copy link
Contributor

Choose a reason for hiding this comment

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

ah right - missed that info, thank you for the details @tengqm .

@tengqm tengqm force-pushed the travis-experiment branch 2 times, most recently from a05cde0 to 984f50a Compare March 20, 2019 09:46
Three optimizations:

- move example testing logic into a bash script to save travis specific
  commands;
- use kubernetes release package (about 20MB) instead of git repo (about
  800 MB at the moment);
- detect whether a PR contains changes to examples and skip examples
  testing if not.

Closes: kubernetes#13140
@tengqm tengqm force-pushed the travis-experiment branch from 984f50a to 026a9d8 Compare March 20, 2019 10:00
@tengqm tengqm changed the title TEST - travis performance diagnosis Travis performance improvement Mar 20, 2019
@tengqm tengqm requested a review from zacharysarah March 20, 2019 10:04
@DanyC97
Copy link
Contributor

DanyC97 commented Mar 20, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 20, 2019
@zacharysarah
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zacharysarah

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 20, 2019
@k8s-ci-robot k8s-ci-robot merged commit 89b2eb7 into kubernetes:master Mar 20, 2019
@tengqm tengqm deleted the travis-experiment branch March 21, 2019 00:40
claudiajkang pushed a commit that referenced this pull request Apr 2, 2019
Three optimizations:

- move example testing logic into a bash script to save travis specific
  commands;
- use kubernetes release package (about 20MB) instead of git repo (about
  800 MB at the moment);
- detect whether a PR contains changes to examples and skip examples
  testing if not.

Closes: #13140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants