Skip to content

Commit

Permalink
chore(ci): reduce runner sizing to 4 core and free tier (vectordotdev…
Browse files Browse the repository at this point in the history
…#17785)

- In order to reduce CI costs, experiments were run on each of the
altered workflows to understand the duration (and thus impact to DX) and
changes in cost.
- The two cases of concern are what checks are run on each PR commit and
in the merge queue:
- in the merge queue- there was a trivial change in runtime. This is
because the bottleneck workflow is the mac unit test, which takes about
1 hour to run. All runner-size-reduced workflows in this PR that are in
the merge queue, still run within that time frame.
- on each PR commit- this PR does not affect this case. However, a
sister PR (vectordotdev#17724) does, because that PR fundamentally changes the
integration test workflow to introduce the runner there, and so in that
PR, we reduced to 4 core. That change adds 3 minutes of duration to the
integration tests, which is trivial (and integration tests only run on
some PR pushes, if that PR touches integrations).
- Thus the empirically anticipated outcome is a ~20% reduction in cost
with a none-to-trivial increase in duration.

---------

Co-authored-by: Spencer Gilbert <[email protected]>
  • Loading branch information
neuronull and spencergilbert authored Jun 28, 2023
1 parent 248ccb8 commit 53a575f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
test-cli:
runs-on: [linux, ubuntu-20.04-8core]
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
cross-linux:
name: Cross - ${{ matrix.target }}
runs-on: [linux, ubuntu-20.04-8core]
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
strategy:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ env:

jobs:
test-integration:
runs-on: [linux, ubuntu-20.04-8core]
timeout-minutes: 30
runs-on: [linux, ubuntu-20.04-4core]
timeout-minutes: 40
if: inputs.if || github.event_name == 'workflow_dispatch'
steps:
- name: (PR comment) Get PR branch
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/k8s_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

build-x86_64-unknown-linux-gnu:
name: Build - x86_64-unknown-linux-gnu
runs-on: [linux, ubuntu-20.04-8core]
runs-on: [linux, ubuntu-20.04-4core]
needs: changes
if: github.event_name != 'pull_request' || needs.changes.outputs.k8s == 'true'
# cargo-deb requires a release build, but we don't need optimizations for tests
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
# See https://github.community/t/feature-request-and-use-case-example-to-allow-matrix-in-if-s/126067
compute-k8s-test-plan:
name: Compute K8s test plan
runs-on: [linux, ubuntu-20.04-8core]
runs-on: ubuntu-latest
needs: changes
if: github.event_name != 'pull_request' || needs.changes.outputs.k8s == 'true'
outputs:
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:

test-e2e-kubernetes:
name: K8s ${{ matrix.kubernetes_version.version }} / ${{ matrix.container_runtime }} (${{ matrix.kubernetes_version.role }})
runs-on: [linux, ubuntu-20.04-8core]
runs-on: [linux, ubuntu-20.04-4core]
needs:
- build-x86_64-unknown-linux-gnu
- compute-k8s-test-plan
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
test-misc:
runs-on: [linux, ubuntu-20.04-8core]
runs-on: [linux, ubuntu-20.04-4core]
env:
CARGO_INCREMENTAL: 0
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
check-msrv:
runs-on: [ubuntu-20.04]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ jobs:

build-baseline:
name: Build baseline Vector container
runs-on: [linux, ubuntu-20.04-8core]
runs-on: [linux, ubuntu-20.04-4core]
needs:
- compute-metadata
steps:
Expand Down Expand Up @@ -323,7 +323,7 @@ jobs:

build-comparison:
name: Build comparison Vector container
runs-on: [linux, soak-builder]
runs-on: [linux, ubuntu-20.04-4core]
needs:
- compute-metadata
steps:
Expand Down

0 comments on commit 53a575f

Please sign in to comment.