Files
seaweedfs/.github/workflows/block-known-bugs.yml
T
Chris LuandClaude Opus 5.5 3f21fa9549 block-ci: judge known bugs with the module helper; list only live reproductions
The inline loop called an empty -run match or a skip a fix, and the list
still named #188 (closed, test passes) and #189 (test absent), so every
nightly run failed. Use known-bugs.sh and its controls, as the module
workflow does, and keep only #186: #187's reproduction passes at this
revision because values.yaml sets blockmaster.stateHostPath.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 04:07:06 -08:00

128 lines
5.1 KiB
YAML

name: Block known bugs
# Nightly: every open-issue reproduction that is skipped by default (t.Skip unless
# SEAWEED_KNOWN_BUGS=1) runs and is EXPECTED TO FAIL. If one passes, its bug is
# fixed but its skip is still in place: this job fails and names it, so the skip
# is removed in the fix PR (or right after). A fix PR removes the test's line here
# together with its skip.
on:
schedule:
- cron: "17 6 * * *"
workflow_dispatch:
defaults:
run:
working-directory: seaweed-block
permissions:
contents: read
jobs:
known-bugs:
name: known-bug reproductions still fail
runs-on: ${{ (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository) && vars.BLOCK_RUNNER_LABEL || 'ubuntu-latest' }}
timeout-minutes: 15
env:
CGO_ENABLED: "0"
SEAWEED_KNOWN_BUGS: "1"
steps:
- name: Runner free space
working-directory: ${{ runner.temp }}
run: |
python3 -I - <<'PY'
import os
import shutil
import sys
required = 10_000_000_000
for path in dict.fromkeys((os.environ["GITHUB_WORKSPACE"], os.environ["RUNNER_TEMP"])):
try:
free = shutil.disk_usage(path).free
except OSError as err:
print(f"runner_disk_check_failed path={path!r} error={err}")
sys.exit(75)
if free < required:
print(f"runner_disk_low path={path!r} free_bytes={free} required_bytes={required}")
sys.exit(75)
print(f"runner_disk_ok path={path!r} free_bytes={free} required_bytes={required}")
PY
- name: Checkout
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false
- name: Runner disk is NVMe
# A self-hosted runner whose work, temp or Go cache directory sits on a
# SATA system disk times the process-level tests out under disk load;
# this names the runner and stops the job before it starts.
if: runner.environment == 'self-hosted'
run: |
bash .github/scripts/require-nvme-test.sh
bash .github/scripts/require-nvme.sh "$GITHUB_WORKSPACE" "$RUNNER_TEMP" "${TMPDIR:-/tmp}" "${GOCACHE:-$HOME/.cache/go-build}"
- name: Set up Go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: seaweed-block/go.mod
cache: false
- name: Known-bug verdict controls
run: bash .github/scripts/known-bugs-test.sh
- name: Each reproduction still fails
run: |
bash .github/scripts/known-bugs.sh <<'LIST'
#186 ./cmd/blockmaster/ TestChartOptInLoopbackFlagIsAcceptedByBlockmaster
LIST
- name: Clean job workspace
# Hosted runners are disposable; their setup-go cache upload runs in
# a post action and still needs the checkout. Persistent runners do not
# upload that cache, and must release their checkout/build files here.
if: always() && runner.environment == 'self-hosted'
working-directory: ${{ runner.temp }}
run: |
python3 -I - <<'PY'
import os
from pathlib import Path
import shutil
import sys
root = Path(os.environ["GITHUB_WORKSPACE"])
# Refuse aliases rather than resolving them. Open EVERY component without
# following symlinks, then keep cleanup anchored to the verified directory fd.
if not root.is_absolute() or ".." in root.parts or root == Path(root.anchor) or root.name != root.parent.name or root == Path(os.environ["RUNNER_TEMP"]):
print(f"runner_workspace_cleanup_refused path={str(root)!r}")
sys.exit(1)
flags = os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW
fd = os.open(root.anchor, flags)
previous = os.open(".", flags)
errors = []
try:
for part in root.parts[1:]:
child = os.open(part, flags, dir_fd=fd)
os.close(fd)
fd = child
if not shutil.rmtree.avoids_symlink_attacks:
raise OSError("descriptor-safe directory removal is unavailable")
os.fchdir(fd)
for entry in os.scandir("."):
try:
if entry.is_dir(follow_symlinks=False):
shutil.rmtree(entry.name)
else:
os.unlink(entry.name)
except OSError as err:
errors.append(f"{entry.name}: {err}")
except OSError as err:
print(f"runner_workspace_cleanup_refused path={str(root)!r} error={err}")
sys.exit(1)
finally:
os.fchdir(previous)
os.close(previous)
os.close(fd)
if errors:
print("runner_workspace_cleanup_failed " + "; ".join(errors))
sys.exit(1)
print(f"runner_workspace_clean path={str(root)!r}")
PY