mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-01 11:02:14 +00:00
3f4f31129e
Two independent changes to the Test and Lint area. The io_uring lane compiled 7 integration binaries to run none of their tests. Job log 91309868055 shows the lib target reporting "18 passed; 3453 filtered out" while every binary under crates/ecstore/tests/ reported "running 0 tests". Adding --lib drops them from the build without changing the selected set. The `uring_` filter itself must not be touched. libtest matches on substring, so it also selects names containing `during_` — 6 of the 18 selected tests are such incidental matches, and narrowing the filter to `io_uring` would silently drop them. scripts/check_uring_lane_lib_only.sh asserts the precondition --lib depends on: no test function whose name contains `uring_` may live under crates/ecstore/tests/. A count floor would not do, because the dangerous case — someone adding a matching test there — leaves the lib count unchanged and CI green. The resource sampler was measuring the wrong machine. The runners are ARC pods, so /proc/loadavg, /proc/pressure/*, `free` and `df` are node-level and include every other runner pod on the same Kubernetes node: one sample reported loadavg 6.67 with 832 threads node-wide while `ps` inside the pod showed about 10 processes. Judging a CARGO_BUILD_JOBS change on those numbers cannot work. The sampler moves to scripts/ci/resource_sampler.sh and now records /sys/fs/cgroup cpu.max, memory.max, memory.peak and the cpu/io/memory pressure files, which are this pod's own. The node-level readings stay — co-tenancy is a real cause of stalls, and a 9m57s plain `git checkout` was traced to it — but are labelled NODE-LEVEL so nobody reads them as this job's load. Phase markers are written on start, and clippy is now sampled too: it is the natural control arm for a CARGO_BUILD_JOBS experiment, since --all-targets is check-only for workspace members and never links the ~100 test binaries the limit throttles. No numbers are changed in this commit. CARGO_BUILD_JOBS stays at 2 until there is attributable data to change it on. Refs: rustfs/backlog#1598, rustfs/backlog#1601
138 lines
5.3 KiB
YAML
138 lines
5.3 KiB
YAML
# Copyright 2026 RustFS Team
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
# Companion to ci.yml for required status checks.
|
|
#
|
|
# ci.yml skips docs-only pull requests via paths-ignore, but the branch ruleset
|
|
# requires a check named "Test and Lint" — without this workflow a docs-only PR
|
|
# would wait on it forever. This workflow triggers on exactly the paths ci.yml
|
|
# ignores and reports success under the same job name. Mixed PRs trigger both
|
|
# workflows and the real check still gates: a required check with any failing
|
|
# run blocks the merge.
|
|
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
|
|
#
|
|
# "Quick Checks" is mirrored here ahead of the ruleset change that will make it
|
|
# required too (rustfs/backlog#1599). Until that change lands this job is
|
|
# inert; mirroring it first is what lets the ruleset change happen without
|
|
# stranding docs-only PRs on a check nobody reports.
|
|
#
|
|
# Keep the paths list below in sync with the pull_request paths-ignore list
|
|
# in ci.yml, and keep the quick-checks steps below byte-identical to the
|
|
# quick-checks job in ci.yml.
|
|
|
|
name: Continuous Integration (docs only)
|
|
|
|
on:
|
|
pull_request:
|
|
types: [ opened, synchronize, reopened ]
|
|
branches: [ main ]
|
|
paths:
|
|
- "**.md"
|
|
- "docs/**"
|
|
- "deploy/**"
|
|
- "scripts/dev_*.sh"
|
|
- "scripts/probe.sh"
|
|
- "LICENSE*"
|
|
- ".gitignore"
|
|
- ".dockerignore"
|
|
- "README*"
|
|
- "**/*.png"
|
|
- "**/*.jpg"
|
|
- "**/*.svg"
|
|
- ".github/workflows/build.yml"
|
|
- ".github/workflows/docker.yml"
|
|
- ".github/workflows/audit.yml"
|
|
- "flake.lock"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
# Deliberately NOT a bare `echo`. Once "Quick Checks" becomes a required
|
|
# check, ci.yml gates every expensive job behind it, so a mixed PR reports
|
|
# two check runs with this name: the real one (45-51s) and this companion.
|
|
# GitHub has no written contract for how it picks between same-named
|
|
# required check runs ("latest wins" vs "any failure blocks"), so instead of
|
|
# relying on ordering we make both runs execute the same commands against
|
|
# the same merge ref — their conclusions are then necessarily identical and
|
|
# the choice does not matter. Keep these steps byte-identical to the
|
|
# quick-checks job in ci.yml (a guard script that asserts this, and the paths
|
|
# sync below, is tracked in rustfs/backlog#1603).
|
|
#
|
|
# For a genuinely docs-only PR this adds no strictness (no code changed, so
|
|
# fmt and the guards always pass) and costs ~50s of ubuntu-latest.
|
|
quick-checks:
|
|
name: Quick Checks
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
|
|
|
- name: Install ripgrep
|
|
run: sudo apt-get update && sudo apt-get install -y ripgrep
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
with:
|
|
components: rustfmt
|
|
|
|
- name: Check code formatting
|
|
run: cargo fmt --all --check
|
|
|
|
- name: Check unsafe code allowances
|
|
run: ./scripts/check_unsafe_code_allowances.sh
|
|
|
|
- name: Check layered dependencies
|
|
run: ./scripts/check_layer_dependencies.sh
|
|
|
|
- name: Check architecture migration rules
|
|
run: ./scripts/check_architecture_migration_rules.sh
|
|
|
|
- name: Check tokio io-uring feature guard
|
|
run: ./scripts/check_no_tokio_io_uring.sh
|
|
|
|
- name: Check extension schema boundaries
|
|
run: ./scripts/check_extension_schema_boundaries.sh
|
|
|
|
- name: Check body-cache whitelist guard
|
|
run: ./scripts/check_body_cache_whitelist.sh
|
|
|
|
- name: Check no planning docs committed
|
|
run: ./scripts/check_no_planning_docs.sh
|
|
|
|
- name: Check CI paths stay in sync
|
|
run: ./scripts/check_ci_paths_sync.sh
|
|
|
|
- name: Check io_uring lane --lib precondition
|
|
run: ./scripts/check_uring_lane_lib_only.sh
|
|
|
|
test-and-lint:
|
|
name: Test and Lint
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
|
|
|
|
# Docs-only PRs skip the full code CI, but they are exactly where a
|
|
# planning-type document could be slipped in (git add -f bypasses
|
|
# .gitignore). Run the guard here so the required "Test and Lint" check
|
|
# stays meaningful for docs-only changes.
|
|
- name: Check no planning docs committed
|
|
run: ./scripts/check_no_planning_docs.sh
|
|
|
|
- name: Satisfy required check for docs-only changes
|
|
run: echo "Docs-only change — code CI is skipped by paths-ignore; planning-docs guard passed, reporting success for the required 'Test and Lint' check."
|