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

Add dedicated cron bootstrap stage to CI to avoid building unnecessary Python 3 #7353

Merged
merged 7 commits into from Mar 12, 2019

Conversation

Projects
None yet
2 participants
@Eric-Arellano
Copy link
Contributor

commented Mar 10, 2019

Problem

Nightly CI (i.e. the Cron job we run every night around midnight) runs exclusively with Python 2.7, yet we still bootstrap Python 3.6 every time. This adds an unnecessary 40 minutes of CI every night (total CI time, not wall time).

Further, once we add Py37 to the cron job in #7261, we will need to avoid bootstrapping Py37 during daily CI (i.e. what we run every time we open a PR or merge to master), else we add 40 minutes of total CI time (not wall time) to every single daily CI run.

This PR both helps now and is pre-work for #7261.

Solution

  • Introduce new stage bootstrap_cron that only runs during cron job.
  • Set up bootstrap_cron to only run the Py27 build engine shards.
  • Rename cron stage to test_cron for better parity with daily CI.

Result

@cosmicexplorer
Copy link
Contributor

left a comment

The if: type != cron part is .travis.yml dark magic which I don't fully understand, but this seems like a good change for the reasons described. Could you clarify what "daily CI" is referring to? I was under the impression we only had a single recurring CI job.

@Eric-Arellano

This comment has been minimized.

Copy link
Contributor Author

commented Mar 11, 2019

Updated the PR description to explicitly define nightly vs. daily! Daily CI is every time we open a PR or merge to master; it's our normal CI. Nightly CI is the cron job that Travis kicks off every night around 1 AM PST. They run different things: cron vs daily after this PR gets merged.

if: type != cron is black magic Travis does for us fortunately.

@cosmicexplorer
Copy link
Contributor

left a comment

Would be great to make it super explicit when discussing time saved about whether changes reduce time taken across all shards ($$$) or whether it reduces time taken for CI to return green or red results (which is always a huge win if we can get it).

EDIT: And especially in stage 1 of CI, even burning down amortized time is fine because the runtime of each pex shard can be nondeterministic, so there's not always a single bottlenecking / critical path shard.

@Eric-Arellano

This comment has been minimized.

Copy link
Contributor Author

commented Mar 11, 2019

@cosmicexplorer great point. Updated descriptions for both this and #7352 to be more explicit in total CI time vs wall time. Thanks for the review!

@Eric-Arellano Eric-Arellano merged commit 9a46332 into pantsbuild:master Mar 12, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Eric-Arellano Eric-Arellano deleted the Eric-Arellano:cron-bootstrap branch Mar 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.