Repository navigation
Build each pull request on the configurations its changes need - #43
Draft
jwrosewell wants to merge 1 commit into
Draft
jwrosewell wants to merge 1 commit into
jwrosewell wants to merge 1 commit into
Conversation
A pull request into rc runs all 15 configurations whatever it changes, six of them on macOS, of which only five run at once across the organisation. The one build where every job passed first time waited 109 minutes and used 601 runner minutes. A change to comments, a message and a link took 143 minutes and 1,006 runner minutes over three attempts. - ci/select-options.ps1 chooses the configurations for common-ci. The standard set is JDK 17 and JDK 8 on Linux. A change to a native module or the cxx submodule adds Windows and Linux ARM, a pom.xml change adds JDK 11 and 21, and a change outside the package trees, such as ci, adds every configuration but macOS. macOS and performance run only when rc itself or a release is built. - The standard set leaves out the three IP Intelligence tests that load the Enterprise data file, listed in ci/standard-excludes.txt, and so does not install WMIC, which is only there for them. A change to IP Intelligence or the cxx submodule runs them. - The Selenium contract runs on one configuration of a pull request rather than fourteen. - The Pull Requests workflow lets one failure leave the other configurations running, and builds nothing when no pull request is eligible. The nightly publishes before it builds pull requests, as the publish builds main, so it has the runners first. - The release pull request from rc into main is built on every configuration. These need common-ci's fail-fast, full-matrix and build-without-pull-requests inputs and its release-pull-request.yml on common-ci main before this reaches main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A pull request into
rcruns all 15 configurations inci/options.json, whatever it changes. Six of them are macOS, and only five macOS jobs run at once across the whole organisation. Every configuration runs the three IP Intelligence tests that load the multi-gigabyte Enterprise data file, every Windows configuration installs WMIC, which is only there for one of those tests, and fourteen configurations run the Selenium contract, the flakiest check in the window.Cost, measured from run history
IPIntelligenceTests,MetadataOnPremTestandCompareOnPremTesttook 12.5 of the 16.7 unit test minutes. In Windows Java 17, 56 minutes, WMIC took 12.5 minutes to install and the same three tests 22.7.rcin full, using 1,234 runner minutes. Configurations cancelled when another failed threw away 1,148 runner minutes in the window.Change
ci/select-options.ps1chooses the configurations for common-ci's selection step, which a companion common-ci change adds.Ubuntu_Java_17andUbuntu_Java_8, the main JDK and the oldest, with the Selenium contract onUbuntu_Java_17alone.cxxsubmodule, in more than its comments, addsWindows_Java_17andUbuntu_ARM_Java_17, where the native library is built differently.pom.xmlchange addsUbuntu_Java_11andUbuntu_Java_21.ci, adds every configuration but macOS.rcitself or a release is built do the six macOS configurations and the performance tests run.ci/run-unit-tests.ps1leaves out the three tests in the newci/standard-excludes.txtthrough Surefire'ssurefire.excludesFile, andci/setup-environment.ps1does not install WMIC. A change to IP Intelligence or thecxxsubmodule runs them.ci/run-integration-tests.ps1runs the Selenium contract only where the selection leavesSeleniumContracttrue, which it is by default.fail-fast: falseandbuild-without-pull-requests: false, and gains afull-matrixbox for a full build of a pull request by hand.main, which the pull requests intorcdo not change.release-pull-request.ymlbuilds the release pull request fromrcintomainon every configuration, as a dry run that merges nothing.ci/README.mddescribes the selection.Expected saving
From the job times above, by the kind of change.
pom.xmlcxxsubmoduleThe reduced times take the measured minutes of the three tests, WMIC and performance off the median of each configuration. Applied to the changed files of the 26 pull requests opened since 1 November, many of them CI set-up, the median wait falls from 109 to about 40 minutes and the mean runner minutes from 601 to about 151. Over 2 and 3 November the change, the fail-fast setting and the by-hand builds of
rcit stops come to about 2,300 runner minutes a day. The release pull request adds one full build, about 601 runner minutes, for each release, and no pull request build takes a macOS runner.How it was checked
nightly-pipeline.ymlare identical to the old ones apart from their order,needs,ifand the new input.ci/standard-excludes.txtare the ones the Ubuntu Java 17 log reports, and the Device DetectionMetadataOnPremTestis not matched. Surefire 2.22.2, which the poms name, reads the file from thesurefire.excludesFileproperty and ignores its#lines (SurefirePlugin.java). A file of excludes replaces Surefire's own**/*$*default (AbstractSurefireMojo.java), so the file lists it too.ci/select-options.ps1, nothing in a build changes.main, and builds are held while today's package releases use the runners. One temporary build of this branch against the common-ci branch is the next step.What it gives up
On a pull request, macOS, JDK 11 and 21 unless a
pom.xmlchanges, the Windows and ARM native builds unless native code changes, the three IP Intelligence tests unless IP Intelligence changes, thirteen of the fourteen Selenium runs, and performance. A fault that shows only there is found by the nightly build ofrcor by the release pull request build, before anything reachesmain.Merge order
After the common-ci change (branch
pull-request-depth) is released to common-cimain. This can merge intorcbefore that, butrcmust not be released intomainuntil then, because the workflows pass inputs that common-cimaindoes not have yet.What remains
pull_requesttrigger onmainalone, so no pull request intorchas run them since changes moved torc. A second commit addsrc, and is pushed once today's package releases are out, because changing that workflow runs it on this pull request.DataUpdateServiceTests.DataUpdateService_Register_AutoUpdateConfiguredIntervaland of the Selenium WebDriver timeouts, neither established.