mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 19:17:28 +01:00
bbbc613c3ed0ee15a832b8a11ef8d3adbe2d0c20
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d4893ebffb |
seaweed-block: sw-block mini starts as any user with no sudo (#13421)
* seaweed-block: sw-block mini starts as any user with no sudo blockvolume gets --volume-lock-dir, a trial-run override of the host volume lock directory (refused under systemd and together with the test override). sw-block mini passes <dir>/locks to its holder, so it starts as any user on a host without /run/sw-block. mini also runs v1 with no scheduled snapshot (it prints the command that takes one), names sw-block and weed by their absolute paths in every command it prints, and after a failed start stops what it started and prints the --reuse command for the same --dir. The release archive carries sw-block.tmpfiles.conf for the units' lock directory. The README Quick Start drops its sudo lines, and the v1.1.1 known issue reads fixed in v1.1.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: mini under a systemd process tree, and no new lock-dir flag (on #13421) (#13425) * seaweed-block: mini starts its children without INVOCATION_ID Run from a systemd service's process tree (a CI runner unit, a terminal server), mini passed INVOCATION_ID to blockvolume, which then refused mini's lock directory and the run stopped at startup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: mini's interrupt test expects the resume command with mini's own path mini prints the resume command with os.Executable(), so the in-process test saw the test binary's path, not a bare sw-block, and failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seaweed-block: mini uses the existing hidden lock-dir override, no new flag --volume-lock-dir set the same field as the hidden --volume-lock-dir-test-only with the same systemd refusal, and mini was its only caller. Keep one hidden override so operators are not offered a documented knob that drops the one-holder-per-volume guarantee outside systemd (containers, hand-run hosts). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * docs: track mini resolve helper time bounds * Test active release assets and relative mini paths * Complete mini release assets and bounded process checks * Terminate owned mini groups before checking for residue * Accept inaccessible host locks as a non-root precondition * Harden mini test ownership and fail-stop cleanup * test: reproduce empty filtered mini child environment * fix(block): complete mini startup and cleanup proof * test(block): claim the mini test's ports host-wide The pid-derived --port-shift put mini's 13 ports inside the handoff and weed pair ranges the other process-level harnesses claim, unclaimed, so a parallel CI shard could bind one of them. Pick a shift whose every port is claimed and free, as handoffAddress does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(block): claim the failed-start mini launch's ports too The second launch ran at shift+1, whose ports were neither claimed nor checked, so a parallel shard could take one and fail the launch before it reached the deliberate blockvolume refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(block): exercise production mini hint with quoted paths * docs(block): explain mini local data lock scope * fix(block): preserve mini executable and cleanup proof * test(block): settle a leader that exits as member capture expires stopGroup checked done only at the top of each capture iteration. A leader that exited after that check, once the one-second window had passed, made the next failed read fail-stop even though the group had settled. Both capture deadlines now defer to assertStopped when done has closed, so live residue still fail-stops. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(block): refuse a PATH weed found through the current directory exec.LookPath reports exec.ErrDot for a weed found only through . in PATH. Making that name absolute let exec.Command start it, where it refused before; mini now refuses it and names --weed ./weed as the explicit choice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(block): accept a reused --weed that names the recorded executable A relative --weed made absolute from another working directory names the same file through a different path; mini compared the strings and refused the retry. Compare file identity when the paths differ, so a different executable is still refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(block): prove the selected weed ran in the mini startup tests A start failure and the fixture weed's exit both return 1, and the printed command and the record exist either way. The dying fixture weed now writes a marker file, and both startup tests require it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(block): name the mini trial lock in the M4 start arrows The table already says a mini trial's blockvolume locks the run's --dir/locks; the diagram's start arrows still named only the host lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(block): shell-quote mini's startup trace Making --weed absolute can put a space from the working directory into the printed command. Quote the executable and each argument with shQuote, as mini's other printed commands already are, so the trace runs as printed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(block): count the mini group again when it is gone after a census A member listed by the census can exit before the signal-0 query reports ESRCH. On the iteration that crosses the deadline that stale count fail-stopped a settled group. Count again when the group is absent, so only a member still listed holds the settlement; the residue control still fail-stops. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(block): name the empty-census case in the mini group fail-stop A group that still exists while the census lists no live member failed with "live residue []". Say what it can be: a member the census missed, or zombies their new parent does not reap. Both stay fail-stops. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(block): match the quoted failed-start trace in the non-root mini test The startup trace is shell-quoted now, and this test's weed path has a quote in it, so match each binary through miniHintWord. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(block): let --reuse take its recorded run past a weed found through . The exec.ErrDot refusal ran before the record was read, so a reuse of a recorded run failed whenever . in PATH found a ./weed, although the reuse would use the recorded weed (or none for a walstore run). A reuse now ignores that weed; a fresh start still refuses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(block): match the shell-quoted start trace in the mini unit tests mini shell-quotes each word of its "+" trace, so a TMPDIR holding a space prints the blockmaster, blockvolume and weed paths quoted, and three unit tests looked for them bare. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(block): pin that a normal start keeps the host volume lock A start under systemd (INVOCATION_ID set, as every shipped unit runs) gets no lock directory of its own, so the provider uses the host one, and the hidden test-only override is refused, naming the host lock directory. The test is listed under INV-WS-ONE-PROCESS-PER-HOST-001. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(block): mini quotes the --weed path in its dot-in-PATH hint Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com> |
||
|
|
94e6fcf61c |
ci: integrate the imported block module workflows (#13360)
* ci: port block workflows to the shared repository * ci: preserve policy self-exclusion at the root path * ci: check block documentation relative links * ci: keep the block post-merge-review check on hosted runners The job's own comment records that it ended in 'Set up job' with no log on every self-hosted runner, and the source repository ran it on ubuntu-latest. The port made it follow BLOCK_RUNNER_LABEL, so setting the variable would bring that failure back for every labelled same-repository PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: publish block releases from hosted runners The release job holds contents: write and packages: write and logs in to GHCR, and builds its images with the runner's Docker. Following BLOCK_RUNNER_LABEL put it on the persistent pool that same-repository PR test jobs also use, whose Docker and build cache those jobs can leave state in, and whose Docker setup is still listed as unvalidated. The source repository published from ubuntu-latest; keep that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: refuse a block release without notes before pushing images The notes file was first checked in the last step, after both images (and, for the highest stable tag, :alpha) were already pushed to GHCR, so a tag without docs/releases/vX.Y.Z.md left the images published and no GitHub release. Check it with the tag format, before anything is pushed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: run the block documentation link check from root scripts The Relative documentation links step called .github/scripts/doc-links-check.py and its test inside seaweed-block/, but neither the imported module nor upstream seaweed-block has them, so the unit suite would fail once the step runs. Add the checker and its test under .github/block/scripts/ with the other port scripts and point the step and its contract test there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: use the integrated root documentation link checker * ci(block): bound runner disk use and clean job workspaces * ci(block): pin merge evidence and refuse control changes * ci(block): refuse workspace aliases before cleanup * fix(block-ci): refresh test evidence before reporting readiness * 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> * block-ci: let a release rerun replace the assets of a published tag gh release create fails once the tag's release exists, after both image pushes have already run again. Keep the imported helper's existing-release path: edit the prerelease flag and upload with --clobber. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * block-ci: list both sides of a move when planning unit packages Without --no-renames a file moved out of core/storage/ shows only its new path, so the planner skipped the package it left. The sibling scope scripts already pass the flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * block-ci: give each master push its own Block Test concurrency group A group admits one running and one pending run; a newer push cancels the pending one even with cancel-in-progress off, so a burst of merges left some without a post-merge result. Key pushes on the commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * block-ci: refuse only control changes the PR itself makes The two-dot diff against current master listed every block workflow master changed after the PR branched, so an older docs-only PR hit workflow_review_required for good. Diff from the merge base; the gate already requires the tested base to be current master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * block-ci: check host paths in a labelled post-merge-review PR The changed-path list holds module paths and block controls only, so a labelled PR that also changed host files passed on its module part. Add every other changed path with its root name; the allow list refuses it. The spec-trace scope stays module-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * block-ci: keep the public-text adapter in step with the module checker The root adapter carried the v1.1.0 signatures: it passed /home/<user>/ paths and run metadata, and an empty docs/spec/**/recorded-* artifact, which the module checker refuses. Take the module's pattern and artifact path check, keep module-relative paths, skip the root adapter's own pattern when run from the root, and run the module self-test against the adapter so the two cannot drift. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * block-ci: match doc links per paragraph, with nested parentheses and long fences A link whose label wraps onto the next line was never checked, a target such as guide(v2).md was cut at its first ')', and a three-backtick line inside a four-backtick fence closed it. Close a fence only with the same character at least as long, keep one level of balanced parentheses in a destination, and match links over each paragraph. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * block-ci: test the root wiring the active workflows use The nested self-tests read the module's inactive test.yml, deploy/ Dockerfiles and chunkstore-scope.sh. Assert the docs-only gates in block-test.yml, that each root image refuses every binary it builds, and that the root classifier selects run for chunkstore, storage and durable edits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * block-ci: refuse host files in a labelled PR outside the allow list Host paths went through the module allow list, where "*_test.go", "*.md" and "docs/*" also match root files, so a labelled PR changing weed/example_test.go or README.md passed. List host changes separately and fail on any of them; the module list still runs. The port test now runs the step in a scratch repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * block-ci: keep root block CI files clean under the public-text scan The port test fixture spelled out a recorded-artifact path, and the unit group test a pid literal, so the checker flagged both as added lines of any PR that touches them. Build the fixture path from parts, name the pid through a variable, and scan the root block CI files with the checker's own pattern. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(block-ci): normalize artifact paths from both checker entry points * fix(block-ci): refuse ambiguous merge bases in readiness checks * fix(block-ci): mask code spans that wrap lines before matching links Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(block-ci): publish the draft a rerun of block-release finds An interrupted first run can leave the tag with an unpublished draft. The rerun took the existing-release branch, replaced the assets and exited 0 with the release still a draft. Publish after the uploads, keeping it off the repository's Latest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(block-ci): require complete matching code-span delimiters * fix(block-ci): preserve escapes and context when masking code * fix(block-ci): preserve original link destination bytes * fix(block-ci): validate original destination syntax * test(block-ci): cover masked whitespace in reference destinations --------- Co-authored-by: pingqiu <pingqiu@users.noreply.github.com> Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |