[SVLS-8800] fix: hold back cold-start invocation metric until durable tag is known #4199
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
| name: Bottlecap (Rust) | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| env: | |
| PB_VERSION: 25.3 | |
| PB_URL: https://github.com/protocolbuffers/protobuf/releases/download | |
| PB_TARGET: linux-x86_64 | |
| jobs: | |
| cancel-previous: | |
| name: Cancel Previous Jobs | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 3 | |
| steps: | |
| - uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # v0.13.1 | |
| with: | |
| access_token: ${{ secrets.GITHUB_TOKEN }} | |
| all_but_latest: true # can cancel workflows scheduled later | |
| check: | |
| name: Check | |
| runs-on: ubuntu-22.04 | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| SCCACHE_GHA_ENABLED: "true" | |
| RUSTC_WRAPPER: "sccache" | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| # Install protobuf compiler for linux. The versions bundled with Ubuntu | |
| # 20.04 and 22.04 are too old -- our messages require protobuf >= 3.15 -- | |
| # so we need to download a protoc binary instead. | |
| - run: sudo apt-get update | |
| - run: sudo apt-get install -y curl unzip cmake | |
| - name: Install protobuf ${{ env.PB_VERSION }} compiler from binary for ${{ env.PB_TARGET }} | |
| run: | | |
| curl -LO "${{ env.PB_URL }}/v${{ env.PB_VERSION }}/protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" | |
| unzip "protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" -d "$HOME/.local" | |
| export PATH="$PATH:$HOME/.local/bin" | |
| - uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| cache: false | |
| - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - working-directory: bottlecap | |
| run: cargo check --workspace | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-22.04 | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| SCCACHE_GHA_ENABLED: "true" | |
| RUSTC_WRAPPER: "sccache" | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| # Install protobuf compiler for linux. The versions bundled with Ubuntu | |
| # 20.04 and 22.04 are too old -- our messages require protobuf >= 3.15 -- | |
| # so we need to download a protoc binary instead. | |
| - run: sudo apt-get update | |
| - run: sudo apt-get install -y curl unzip cmake | |
| - name: Install protobuf ${{ env.PB_VERSION }} compiler from binary for ${{ env.PB_TARGET }} | |
| run: | | |
| curl -LO "${{ env.PB_URL }}/v${{ env.PB_VERSION }}/protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" | |
| unzip "protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" -d "$HOME/.local" | |
| export PATH="$PATH:$HOME/.local/bin" | |
| - uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| components: clippy | |
| cache: false | |
| - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| # We need to do these separately because the fips feature is incompatible with the default feature. | |
| - working-directory: bottlecap | |
| run: cargo clippy --workspace --all-targets --features default | |
| - working-directory: bottlecap | |
| run: cargo clippy --workspace --all-targets --no-default-features --features fips | |
| build-all: | |
| name: Build All | |
| runs-on: ubuntu-22.04 | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| SCCACHE_GHA_ENABLED: "true" | |
| RUSTC_WRAPPER: "sccache" | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| # Install protobuf compiler for linux. The versions bundled with Ubuntu | |
| # 20.04 and 22.04 are too old -- our messages require protobuf >= 3.15 -- | |
| # so we need to download a protoc binary instead. | |
| - run: sudo apt-get update | |
| - run: sudo apt-get install -y curl unzip cmake | |
| - name: Install protobuf ${{ env.PB_VERSION }} compiler from binary for ${{ env.PB_TARGET }} | |
| run: | | |
| curl -LO "${{ env.PB_URL }}/v${{ env.PB_VERSION }}/protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" | |
| unzip "protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" -d "$HOME/.local" | |
| export PATH="$PATH:$HOME/.local/bin" | |
| - uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| cache: false | |
| - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - working-directory: bottlecap | |
| run: cargo build --all | |
| test: | |
| name: Test Suite | |
| runs-on: ubuntu-22.04 | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| SCCACHE_GHA_ENABLED: "true" | |
| RUSTC_WRAPPER: "sccache" | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| # Install protobuf compiler for linux. The versions bundled with Ubuntu | |
| # 20.04 and 22.04 are too old -- our messages require protobuf >= 3.15 -- | |
| # so we need to download a protoc binary instead. | |
| - run: sudo apt-get update | |
| - run: sudo apt-get install -y curl unzip cmake | |
| - name: Install protobuf ${{ env.PB_VERSION }} compiler from binary for ${{ env.PB_TARGET }} | |
| run: | | |
| curl -LO "${{ env.PB_URL }}/v${{ env.PB_VERSION }}/protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" | |
| unzip "protoc-${{ env.PB_VERSION }}-${{ env.PB_TARGET }}.zip" -d "$HOME/.local" | |
| export PATH="$PATH:$HOME/.local/bin" | |
| - uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| cache: false | |
| - uses: taiki-e/install-action@328a871ad8f62ecac78390391f463ccabc974b72 # v2.69.9 | |
| with: | |
| tool: nextest@0.9 | |
| - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 | |
| - working-directory: bottlecap | |
| run: cargo nextest run --workspace | |
| format: | |
| name: Format | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, macos-latest] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| components: rustfmt | |
| cache: false | |
| - working-directory: bottlecap | |
| run: cargo fmt --all -- --check | |
| # If this fails, run `dd-rust-license-tool write` in bottlecap/ | |
| license-3rdparty: | |
| runs-on: ubuntu-22.04 | |
| name: "Valid LICENSE-3rdparty.csv" | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - run: cargo install dd-rust-license-tool --locked | |
| - run: dd-rust-license-tool check | |
| working-directory: bottlecap | |
| cargo-audit: | |
| name: Audit | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Scan Rust dependencies with cargo-audit | |
| uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| working-directory: bottlecap | |
| # Guards cold-start H1 (PR #1276): the default build must keep reqwest on | |
| # compiled-in webpki roots (no per-build native-cert filesystem scan), and the | |
| # FIPS build must keep native roots. Reads the resolved feature graph only | |
| # (no compilation), so it's fast and needs no protoc. | |
| tls-root-features: | |
| name: TLS Root Features | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| cache: false | |
| - run: ./scripts/verify_tls_root_features.sh |