-
Notifications
You must be signed in to change notification settings - Fork 1
Cut the e2e pipeline cost: environments by trigger, weekly bootstrap sweep, less setup per leg #129
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
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
d63e16d
Take a restarting Kibana replica out of the proxy rotation
sscarduzio 5a9f0ee
Take the bootstrap sweep off pull requests
sscarduzio e3e779f
Also cancel a superseded pull-request run
sscarduzio 393b845
Skip the disk cleanup when the runner already has room
sscarduzio 61ac6be
Cache the yarn and Cypress downloads, and skip the suite for prose
sscarduzio 22a80a8
Pair each ELK version with one ECK operator instead of both
sscarduzio 089f645
Run the bootstrap sweep on a release, not every night
sscarduzio a753c6b
Delete the two specs that run in no environment
sscarduzio b888c9f
Drop an assertion that could only fail if ROR got it right
sscarduzio e44bbb5
Run Tenancy's two callback-free tests once, not three times
sscarduzio e355ed0
Remove the dead gap between the two halves of one key press
sscarduzio 07893b4
Name the retried tests on the run summary
sscarduzio ee7e8f2
Install the ecommerce sample data once, not three times
sscarduzio 86e9e4c
Put the retry report in the one after:spec handler that runs
sscarduzio 8aaed17
Merge remote-tracking branch 'origin/fix/kbn-proxy-failover' into per…
sscarduzio 30f14a0
Fail the cleanup when a deletion fails
sscarduzio 6fb50d2
Revert "Merge remote-tracking branch 'origin/fix/kbn-proxy-failover' …
sscarduzio 552ad79
Drop the dead versions output of prepare-dev-images
sscarduzio 45a92df
Make every comment describe the state, not the change
sscarduzio 189e1b4
Name the ESC press in KibanaNavigation closeOpenOverlays
sscarduzio 94f3b50
Move the yarn and Cypress caches into their own action
sscarduzio 5f71181
Move the bootstrap sweep to its own workflow
sscarduzio 285f7c8
Pick the e2e environments by trigger
sscarduzio 1779b0f
Name the bootstrap workflow and the daily dev run in the docs
sscarduzio 4cd5f62
merge: origin/master into perf/e2e-cost-reduction
sscarduzio c60f875
Give bootstrap-tests.yml a read-only token
sscarduzio 51c85cb
Put the whole run plan in one job, and the versions at the top of the…
sscarduzio 03157b4
Write the run plan as one if/elif table
sscarduzio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,52 @@ | ||
| name: 'Cleanup disk space' | ||
| description: 'Cleanup runner disk space' | ||
| description: 'Frees runner disk space, but only when the job needs more than the runner already has free.' | ||
|
|
||
| inputs: | ||
| required_gb: | ||
| description: > | ||
| Free space on / the job needs, in GB. The cleanup is skipped when the runner already has | ||
| this much: deleting the preinstalled toolchains costs about 80 seconds. | ||
| required: false | ||
| default: '25' | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: Cleanup disk space | ||
| shell: bash | ||
| env: | ||
| REQUIRED_GB: ${{ inputs.required_gb }} | ||
| run: | | ||
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc | ||
| sudo rm -rf /usr/local/share/boost /usr/local/share/boost-build | ||
| set -euo pipefail | ||
|
|
||
| FREE_GB=$(df -BG --output=avail / | tail -1 | tr -dc '0-9') | ||
| echo "Free space on /: ${FREE_GB}G. This job asks for ${REQUIRED_GB}G." | ||
|
|
||
| if [ "$FREE_GB" -ge "$REQUIRED_GB" ]; then | ||
| echo "Enough free space already — skipping the cleanup." | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Independent trees, deleted in parallel. Each pid is waited on by name: a bare `wait` | ||
| # returns 0 whatever the jobs did, and a failed deletion must fail this step. | ||
| pids=() | ||
| sudo rm -rf /usr/share/dotnet & pids+=("$!") | ||
| sudo rm -rf /usr/local/lib/android & pids+=("$!") | ||
| sudo rm -rf /opt/ghc & pids+=("$!") | ||
| sudo rm -rf /usr/local/share/boost /usr/local/share/boost-build & pids+=("$!") | ||
|
|
||
| failed=0 | ||
| for pid in "${pids[@]}"; do | ||
| wait "$pid" || failed=1 | ||
| done | ||
| if [ "$failed" -ne 0 ]; then | ||
| echo "At least one cleanup deletion failed. Disk space below:" | ||
| df -h / | ||
| exit 1 | ||
| fi | ||
|
|
||
| sudo apt-get clean | ||
| sudo rm -rf /var/lib/apt/lists/* | ||
|
|
||
| echo "Available disk space after cleanup:" | ||
| df -h | ||
| df -h / | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name: 'Cypress cache' | ||
| description: 'Restores and saves the yarn download cache, node_modules and the Cypress binary for the e2e suite.' | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| # Both caches are keyed on yarn.lock, the file that decides their content, so a stale entry | ||
| # cannot be served. The Cypress binary version is pinned by the `cypress` entry in it, so one | ||
| # key covers the binary too. | ||
| - name: Cache the yarn download cache and node_modules | ||
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 | ||
| with: | ||
| path: | | ||
| ~/.cache/yarn | ||
| e2e-tests/node_modules | ||
| key: e2e-yarn-${{ runner.os }}-${{ hashFiles('e2e-tests/yarn.lock') }} | ||
| - name: Cache the Cypress binary | ||
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 | ||
| with: | ||
| path: ~/.cache/Cypress | ||
| key: e2e-cypress-${{ runner.os }}-${{ hashFiles('e2e-tests/yarn.lock') }} |
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
|
sscarduzio marked this conversation as resolved.
|
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.