Compare commits

..
Author SHA1 Message Date
Chris LuandClaude Opus 5.5 3921d14402 s3_objectlock: scan keys below a .uploads prefix
The scan skipped every directory named .uploads, so an object stored
below a key prefix such as a/.uploads/ was never checked. It now skips
only the directories of pending multipart uploads, whose lock settings
belong to an object that does not exist yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:39:32 -08:00
Chris LuandClaude Opus 5.5 f889ccc40a s3_objectlock: scan names that contain a backslash
With backslashes allowed in object keys, a key such as a\b is stored
under that name. The scan skipped it, and every key below such a
prefix, as if the name were a path separator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:39:08 -08:00
Chris LuandClaude Opus 5.5 62b393e13c s3_objectlock: read each listing page before scanning its subdirectories
The scan listed a subdirectory while the parent listing was still open.
On a store with one connection, such as SQLite, a parent page that
filled its stream window kept the connection the child listing needed.
Pages now skip chunk lists, since only the lock metadata is read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:38:48 -08:00
Chris LuandClaude Opus 5.5 8007d792aa s3_objectlock: scan a literal .versions directory recursively
A directory named exactly .versions was listed as flat version files, so a
locked object nested below it was missed by the subtree and bucket scans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:08:21 -08:00
Chris LuandClaude Opus 5.5 83be02c814 sftp: refuse to rename a directory that holds protected entries
A directory rename moves every descendant, so checking the directory
alone let it carry locked versions away from their keys, or WORM files
out from under their rule. Refuse when a WORM rule covers the subtree,
as the filer does for scoped tokens, or when an object in it is under
Object Lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 11:54:14 -08:00
Chris LuandClaude Opus 5.5 fd3f7d6db3 sftp: recheck an upload's target when it commits, and refuse directories
The upload buffers until Close, so a hold set while it was open still
let it overwrite the entry. A PUT to a directory path also lands on a
child of that directory, whose protection was never checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 11:49:31 -08:00
Chris LuandClaude Opus 5.5 ce233d6e62 sftp: pin setstat to the Object Lock state it checked
The update writes back the entry it read, so a hold set in between
would be dropped. The filer now refuses the update instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 11:48:48 -08:00
Chris LuandClaude Opus 5.5 c1375116d3 sftp: read WORM rules from a filer.conf stored in chunks
ReadFilerConf without a master client reads only inline content, so a
chunked filer.conf looked empty and WORM went unenforced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 11:48:28 -08:00
Chris LuandClaude Opus 5.5 9cc3cc8779 sftp: let a rename onto itself succeed for a protected entry
The filer treats it as a no-op, so there is nothing to protect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 11:47:06 -08:00
Chris LuandClaude Opus 5.5 2b2ba15f21 sftp: refuse to overwrite or setstat entries under Object Lock or WORM
An upload over an existing protected entry replaced its content, and a
setstat could truncate it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 11:28:53 -08:00
Chris LuandClaude Opus 5.5 34a8574f7e sftp: refuse to rename entries under Object Lock or WORM
A rename moved a protected version out of its .versions folder, or
replaced a protected target, which the delete check alone does not stop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 11:27:51 -08:00
Chris LuandClaude Opus 5.5 49d85cf315 sftp: refuse to delete entries under Object Lock or WORM
rm and rmdir sent DeleteEntry with no protection check, so an SFTP user
could delete versions under legal hold or retention, and filer.conf WORM
files, that the S3 API and the filer HTTP API refuse to delete. Check the
entry first and pin the delete to the Object Lock state that was checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 11:27:02 -08:00
5244 changed files with 15952 additions and 790958 deletions

No files matched your search

+2 -7
View File
@@ -1,6 +1,6 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = .git,.git-meta,.gitignore,.gitattributes,*.svg,go.sum,vendor,*.lock,*.css,*.min.*,.codespellrc,*_templ.go,*.tla
skip = .git,.git-meta,.gitignore,.gitattributes,*.svg,go.sum,vendor,*.lock,*.css,*.min.*,.codespellrc,*_templ.go
check-hidden = true
# Ignore camelCase and PascalCase identifiers (very common in Go/Rust/JS
# source, e.g. allLocations, publishErr, ReadInside, FlushInterval).
@@ -21,9 +21,4 @@ ignore-regex = \b[a-z]+[A-Z]\w*\b|\b[A-Z][a-z]+[A-Z]\w*\b
# atleast: CLI mode literal string in test/benchmark/fuse_db/bin/sqlite_verify.py
# sme: local variable for a *streamMutateError in mount tests
# nin: AWS S3 Vectors "$nin" filter operator literal (API-defined, cannot rename)
# aer: NVMe Asynchronous Event Request (spec term, seaweed-block NVMe/TCP target)
# aas: iSCSI ALUA Access State; dout: iSCSI Data-Out PDU (seaweed-block iSCSI target)
# nd, readds, wonce, abd, delet, re-declare: identifiers and test fixture literals in seaweed-block
ignore-words-list = visibles,fo,te,ser,bject,unparseable,keep-alives,tread,anc,ue,auther,thirdparty,unknwon,atleast,sme,nin,aer,aas,dout,nd,readds,wonce,abd,delet,re-declare
# poligon: Yandex Disk API sandbox URL path (https://yandex.ru/dev/disk/poligon/)
uri-ignore-words-list = poligon
ignore-words-list = visibles,fo,te,ser,bject,unparseable,keep-alives,tread,anc,ue,auther,thirdparty,unknwon,atleast,sme,nin
@@ -16,7 +16,6 @@ runs:
if: inputs.target == 'x86_64-unknown-linux-musl'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
# C deps (aws-lc-sys) must compile against musl headers, not the host
# gcc's glibc headers — glibc's C23 redirects (__isoc23_sscanf,
@@ -27,7 +26,6 @@ runs:
if: inputs.target == 'aarch64-unknown-linux-musl'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
# Disable glibc fortify source — its __memcpy_chk etc. symbols don't exist in musl
+1 -1
View File
@@ -15,7 +15,7 @@ runs:
using: composite
steps:
- name: Install cosign
uses: sigstore/cosign-installer@v4.1.4
uses: sigstore/cosign-installer@v4.1.3
- name: Sign
shell: bash
+23 -113
View File
@@ -8,44 +8,38 @@ on:
- 'go.mod'
- 'go.sum'
- '.github/workflows/binaries_dev.yml'
workflow_dispatch:
# Let an in-progress dev build finish. A new push replaces only the pending
# run; cancelling mid-build left the dev release without assets.
concurrency:
group: binaries-dev-${{ github.ref }}
cancel-in-progress: false
cancel-in-progress: true
permissions:
contents: read
jobs:
prepare:
cleanup:
permissions:
contents: write # for mknejp/delete-release-assets to delete release assets
runs-on: ubuntu-latest
outputs:
build_time: ${{ steps.build_time.outputs.value }}
steps:
- name: Ref guard
if: github.ref != 'refs/heads/master'
env:
GH_REF: ${{ github.ref }}
run: |
echo "dev builds only publish from master (got $GH_REF)" >&2
exit 1
- name: Set BUILD_TIME
id: build_time
run: |
echo "value=$(date -u +%Y%m%d-%H%M)" >> "$GITHUB_OUTPUT"
steps:
- name: Delete old release assets
uses: mknejp/delete-release-assets@v1
continue-on-error: true
with:
token: ${{ github.token }}
tag: dev
fail-if-no-assets: false
assets: |
weed-*
build_dev_linux_windows:
permissions:
contents: write # for wangyoucao577/go-release-action to upload release assets
needs: prepare
needs: cleanup
runs-on: ubuntu-latest
env:
BUILD_TIME: ${{ needs.prepare.outputs.build_time }}
strategy:
matrix:
goos: [linux, windows]
@@ -53,17 +47,15 @@ jobs:
steps:
- name: Validate BUILD_TIME
run: |
: "${BUILD_TIME:?prepare output missing}"
- name: Check out code into the Go module directory
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v2
- name: Set BUILD_TIME env
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
- name: Go Release Binaries Large Disk
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -80,7 +72,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -96,10 +87,8 @@ jobs:
build_dev_darwin:
permissions:
contents: write # for wangyoucao577/go-release-action to upload release assets
needs: [prepare, build_dev_linux_windows]
needs: build_dev_linux_windows
runs-on: ubuntu-latest
env:
BUILD_TIME: ${{ needs.prepare.outputs.build_time }}
strategy:
matrix:
goos: [darwin]
@@ -107,17 +96,15 @@ jobs:
steps:
- name: Validate BUILD_TIME
run: |
: "${BUILD_TIME:?prepare output missing}"
- name: Check out code into the Go module directory
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v2
- name: Set BUILD_TIME env
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
- name: Go Release Binaries Large Disk
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -134,7 +121,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -146,79 +132,3 @@ jobs:
project_path: weed
binary_name: weed-normal-disk
asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
prune:
needs: [prepare, build_dev_linux_windows, build_dev_darwin]
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
env:
BUILD_TIME: ${{ needs.prepare.outputs.build_time }}
RELEASE_TAG: dev
steps:
- name: Delete dev binaries from older builds
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
: "${BUILD_TIME:?BUILD_TIME is empty}"
case "$BUILD_TIME" in
[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]) ;;
*) echo "Invalid BUILD_TIME: $BUILD_TIME" >&2; exit 1 ;;
esac
release_tag="${RELEASE_TAG:-dev}"
if ! release_json=$(gh api "repos/$GITHUB_REPOSITORY/releases/tags/$release_tag" 2>&1); then
case "$release_json" in
*"Not Found"*) echo "No $release_tag release; nothing to prune"; exit 0 ;;
esac
echo "Release lookup failed: $release_json" >&2
exit 1
fi
release_id=$(jq -r '.id // empty' <<<"$release_json")
if [ -z "$release_id" ]; then
echo "Release lookup returned no id" >&2
exit 1
fi
assets_file=$(mktemp)
trap 'rm -f "$assets_file"' EXIT
if ! gh api "repos/$GITHUB_REPOSITORY/releases/$release_id/assets" --paginate \
--jq '.[] | select((.name | startswith("weed-large-disk-")) or (.name | test("^weed-[0-9]"))) | [.id, .name] | @tsv' \
> "$assets_file"; then
echo "Failed to list release assets" >&2
exit 1
fi
total=$(awk 'END{print NR+0}' "$assets_file")
matching=$(awk -v s="-$BUILD_TIME-" 'index($0,s){n++} END{print n+0}' "$assets_file")
if [ "$matching" -eq 0 ]; then
echo "No assets carry stamp $BUILD_TIME; refusing to prune" >&2
exit 1
fi
build_key=${BUILD_TIME/-/}
kept=0; newer=0; deleted=0; gone=0; failed=0
while IFS=$'\t' read -r id name || [ -n "${name:-}" ]; do
[ -n "${id:-}" ] || continue
case "$name" in
*"-$BUILD_TIME-"*) kept=$((kept+1)); continue ;;
esac
if [[ "$name" =~ -([0-9]{8})-([0-9]{4})- ]] && [ "${BASH_REMATCH[1]}${BASH_REMATCH[2]}" -gt "$build_key" ]; then
newer=$((newer+1)); continue
fi
if out=$(gh api -X DELETE "repos/$GITHUB_REPOSITORY/releases/assets/$id" </dev/null 2>&1); then
deleted=$((deleted+1))
else
case "$out" in
*"Not Found"*) gone=$((gone+1)) ;;
*) failed=$((failed+1)); echo "Failed to delete asset $name ($id): $out" >&2 ;;
esac
fi
done < "$assets_file"
[ "$((kept+newer+deleted+gone+failed))" -eq "$total" ] || { echo "Processed $((kept+newer+deleted+gone+failed)) of $total assets" >&2; exit 1; }
echo "Kept $kept assets from this build and $newer from newer builds; deleted $deleted older assets; $gone already gone; $failed failures"
[ "$failed" -eq 0 ] || { echo "::warning::prune: $failed deletions failed"; exit 1; }
-2
View File
@@ -32,7 +32,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -47,7 +46,6 @@ jobs:
- name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
-2
View File
@@ -32,7 +32,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -47,7 +46,6 @@ jobs:
- name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
-2
View File
@@ -32,7 +32,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -47,7 +46,6 @@ jobs:
- name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
-2
View File
@@ -32,7 +32,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -47,7 +46,6 @@ jobs:
- name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
-2
View File
@@ -32,7 +32,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -48,7 +47,6 @@ jobs:
- name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
-2
View File
@@ -32,7 +32,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -47,7 +46,6 @@ jobs:
- name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
+3 -3
View File
@@ -33,7 +33,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4.39.5
uses: github/codeql-action/init@v4.39.3
# Override language selection by uncommenting this and choosing your languages
with:
languages: go
@@ -41,7 +41,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@v4.39.5
uses: github/codeql-action/autobuild@v4.39.3
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -55,4 +55,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4.39.5
uses: github/codeql-action/analyze@v4.39.3
+1 -1
View File
@@ -434,7 +434,7 @@ jobs:
output: trivy-results.sarif
exit-code: '0'
- name: Upload Trivy scan results to GitHub Security
uses: github/codeql-action/upload-sarif@v4.39.5
uses: github/codeql-action/upload-sarif@v4.39.3
if: always()
with:
sarif_file: trivy-results.sarif
@@ -515,7 +515,7 @@ jobs:
- name: Upload Trivy scan results to GitHub Security
if: always()
uses: github/codeql-action/upload-sarif@v4.39.5
uses: github/codeql-action/upload-sarif@v4.39.3
with:
sarif_file: trivy-results.sarif
category: trivy-${{ matrix.variant }}
+1 -1
View File
@@ -15,4 +15,4 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: 'Dependency Review'
uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294
+4 -4
View File
@@ -31,16 +31,16 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Build weed binary
run: |
cd weed && go build -o weed .
-24
View File
@@ -125,28 +125,6 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres:
image: postgres:17
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
mysql:
image: mysql:8.4
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping -uroot -proot"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v7
@@ -158,8 +136,6 @@ jobs:
- name: Test
env:
RUN_REDIS_TESTS: "1"
RUN_POSTGRES_TESTS: "1"
RUN_MYSQL_TESTS: "1"
run: cd weed; go test -tags "elastic gocdk sqlite ydb tarantool tikv rclone" -v ./...
test-32bit:
-127
View File
@@ -1,127 +0,0 @@
name: Graph
# Builds a code knowledge graph with the open-source Graphify CLI and uploads
# it as an artifact; a published release, or a dispatch naming a tag, also
# gets it as a release asset. Code-only mode parses the repository with
# tree-sitter and needs no API key or secret. Only the release job holds a
# write token, and it runs no third-party code.
#
# A release created with the default GITHUB_TOKEN does not trigger this
# workflow; dispatch it with the tag in that case.
#
# The graph is not committed: graph.json is ~150 MiB, above GitHub's 100 MiB
# file limit.
on:
schedule:
- cron: "23 4 * * *"
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Release tag to build and attach the bundle to (empty: artifact only)"
required: false
type: string
concurrency:
group: graph-${{ github.ref }}-${{ inputs.tag }}
cancel-in-progress: true
permissions:
contents: read
env:
GRAPHIFY_VERSION: "0.9.112"
# Stable community ids across runs.
PYTHONHASHSEED: "0"
# Never call an LLM, even if a runner image ships an API key or the claude
# CLI: cluster-only auto-detects a labeling backend otherwise.
GRAPHIFY_BACKEND: "none"
TAG: ${{ github.event.release.tag_name || inputs.tag }}
jobs:
graph:
name: Build code graph
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v7
with:
ref: ${{ env.TAG && format('refs/tags/{0}', env.TAG) || '' }}
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Install graphify
run: python -m pip install "graphifyy==${GRAPHIFY_VERSION}"
# Always a full extraction: graphify update re-extracts only changed
# files, so callers in unchanged files keep edges to a function's old
# id after it moves to another file.
- name: Build the graph
run: |
# Cluster once: extract alone does not write the report or HTML.
# cluster-only names communities after their hub nodes
# (GRAPHIFY_BACKEND=none keeps it from calling an LLM).
graphify extract . --code-only --no-cluster
graphify cluster-only .
- name: Graph health
run: |
graphify diagnose multigraph --json > graph-health.json
python3 - <<'PY' >> "$GITHUB_STEP_SUMMARY"
import json
summary = json.load(open("graph-health.json")).get("summary", {})
print("### Graph health")
print(f"- nodes: {summary.get('node_count', 'n/a')}")
print(f"- edges: {summary.get('raw_edge_count', 'n/a')}")
print(f"- dangling endpoints: {summary.get('dangling_endpoint_edges', 'n/a')}")
print(f"- duplicate edges: {summary.get('exact_duplicate_edges', 'n/a')}")
PY
- name: Bundle outputs
run: |
gzip -9 -c graphify-out/graph.json > graph.json.gz
files=(graph.json.gz graphify-out/GRAPH_REPORT.md graph-health.json)
# graphify skips graph.html when it cannot aggregate a large graph.
if [ -f graphify-out/graph.html ]; then
files+=(graphify-out/graph.html)
else
echo "::warning::graphify-out/graph.html was not generated"
fi
tar -czf graph-bundle.tar.gz "${files[@]}"
- name: Upload graph artifact
uses: actions/upload-artifact@v7
with:
name: graph-${{ github.sha }}
path: graph-bundle.tar.gz
retention-days: 14
release:
name: Attach graph bundle
needs: graph
if: github.event_name == 'release' || inputs.tag != ''
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- name: Download graph artifact
uses: actions/download-artifact@v8
with:
name: graph-${{ github.sha }}
- name: Upload release asset
env:
GH_TOKEN: ${{ github.token }}
run: |
asset="graph-${TAG//\//-}.tar.gz"
mv graph-bundle.tar.gz "${asset}"
gh release upload "${TAG}" "${asset}" --clobber --repo "${GITHUB_REPOSITORY}"
-77
View File
@@ -149,83 +149,6 @@ jobs:
grep -q "terminationGracePeriodSeconds: 85$" /tmp/aio-s3-prestop-own.yaml
echo "S3 preStopSeconds renders correctly"
echo "=== Testing shareProcessNamespace ==="
for workload in filer:templates/filer/filer-statefulset.yaml s3:templates/s3/s3-deployment.yaml; do
component=${workload%%:*}
template=${workload#*:}
helm template test $CHART_DIR --show-only "$template" \
--set "$component.enabled=true" > /tmp/spn-default.yaml
test "$(grep -c 'shareProcessNamespace' /tmp/spn-default.yaml)" -eq 0
helm template test $CHART_DIR --show-only "$template" \
--set "$component.enabled=true" --set "$component.shareProcessNamespace=true" > /tmp/spn.yaml
grep -q '^ shareProcessNamespace: true$' /tmp/spn.yaml
done
echo "shareProcessNamespace renders correctly"
echo "=== Testing volumeAttributesClassName ==="
pvc_args=(--set allInOne.enabled=true --set allInOne.data.type=persistentVolumeClaim
--set admin.enabled=true --set admin.allowInsecureBind=true --set volume.dataDirs[0].name=data1)
for claim in master.data master.logs filer.data filer.logs admin.data admin.logs \
volume.idx volume.logs volume.dataDirs[0]; do
pvc_args+=(--set "$claim.type=persistentVolumeClaim" --set "$claim.size=1Gi")
done
helm template test $CHART_DIR "${pvc_args[@]}" > /tmp/vac-default.yaml
test "$(grep -c 'volumeAttributesClassName' /tmp/vac-default.yaml)" -eq 0
for claim in master.data master.logs filer.data filer.logs admin.data admin.logs \
volume.idx volume.logs volume.dataDirs[0] allInOne.data; do
pvc_args+=(--set "$claim.volumeAttributesClassName=fast")
done
helm template test $CHART_DIR "${pvc_args[@]}" > /tmp/vac.yaml
test "$(grep -c '^ *volumeAttributesClassName: "fast"$' /tmp/vac.yaml)" -eq 10
helm template test $CHART_DIR --set master.data.type=persistentVolumeClaim \
--set-string master.data.volumeAttributesClassName=null > /tmp/vac-null.yaml
grep -q '^ *volumeAttributesClassName: "null"$' /tmp/vac-null.yaml
echo "volumeAttributesClassName renders correctly"
echo "=== Testing the S3 config reloader ==="
for workload in filer.s3:templates/filer/filer-statefulset.yaml s3:templates/s3/s3-deployment.yaml; do
prefix=${workload%%:*}
template=${workload#*:}
component=${prefix%%.*}
reloader_args=(--set "$prefix.enabled=true" --set "$prefix.enableAuth=true"
--set "$prefix.existingConfigSecret=s3-identities"
--set "$component.containerSecurityContext.enabled=true"
--set "$component.containerSecurityContext.runAsUser=1000")
helm template test $CHART_DIR --show-only "$template" "${reloader_args[@]}" > /tmp/reloader-off.yaml
test "$(grep -c 's3-config-reloader\|shareProcessNamespace' /tmp/reloader-off.yaml)" -eq 0
helm template test $CHART_DIR --show-only "$template" "${reloader_args[@]}" \
--set "$prefix.configReloader.enabled=true" \
--set "$prefix.configReloader.resources.limits.memory=32Mi" > /tmp/reloader-on.yaml
python3 - /tmp/reloader-off.yaml /tmp/reloader-on.yaml <<'PYEOF'
import sys, yaml
off, on = (yaml.safe_load(open(path)) for path in sys.argv[1:])
pod = on["spec"]["template"]["spec"]
main = pod["containers"][0]
reloader = next(c for c in pod["containers"] if c["name"] == "s3-config-reloader")
assert pod["shareProcessNamespace"] is True
assert reloader["image"] == main["image"]
# It must run as the same user as SeaweedFS to signal it.
assert reloader["securityContext"] == main["securityContext"], reloader.get("securityContext")
assert {"name": "config-users", "mountPath": "/etc/sw", "readOnly": True} in reloader["volumeMounts"]
assert reloader["resources"] == {"limits": {"memory": "32Mi"}}
# Without the reloader, the checksum hashes the existing Secret, so a change to it restarts the pod.
# With it, nothing may: not the Secret, and not the values of the Secret the chart generates.
annotations = lambda d: d["spec"]["template"]["metadata"].get("annotations") or {}
assert "checksum/s3config" in annotations(off)
assert "checksum/s3config" not in annotations(on), annotations(on)
PYEOF
# A release from a chart without configReloader, upgraded with --reuse-values, has no such map.
helm template test $CHART_DIR --show-only "$template" "${reloader_args[@]}" \
--set "$prefix.configReloader=null" > /tmp/reloader-old-values.yaml
test "$(grep -c 's3-config-reloader' /tmp/reloader-old-values.yaml)" -eq 0
if helm template test $CHART_DIR --show-only "$template" \
--set "$prefix.enabled=true" --set "$prefix.configReloader.enabled=true" > /tmp/reloader-noauth.yaml 2>&1; then
echo "FAIL: $prefix.configReloader rendered without $prefix.enableAuth"; exit 1
fi
grep -q "configReloader.enabled needs" /tmp/reloader-noauth.yaml
done
echo "S3 config reloader renders correctly"
echo "=== Testing the S3 config checksum is stable across renders ==="
# s3-secret.yaml keeps its generated keys with lookup. Hashing the rendered
# Secret drew new keys for the checksum whenever lookup found nothing (on
+1 -1
View File
@@ -44,7 +44,7 @@ jobs:
- name: Run Client Unit Tests
working-directory: other/java/client
run: |
mvn test -Dtest=SeaweedReadTest,SeaweedCipherTest,FilerJwtTest
mvn test -Dtest=SeaweedReadTest,SeaweedCipherTest
- name: Run HDFS3 Configuration Tests
working-directory: other/java/hdfs3
+1 -1
View File
@@ -42,7 +42,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
cache-dependency-path: |
**/go.sum
+23 -23
View File
@@ -43,23 +43,23 @@ jobs:
matrix:
container-id: [unit-tests-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 1.0 --memory 1g --hostname kafka-unit-${{ matrix.container-id }}
env:
GOMAXPROCS: 1
CGO_ENABLED: 0
CONTAINER_ID: ${{ matrix.container-id }}
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code
uses: actions/checkout@v7
- name: Setup Container Environment
run: |
apk add --no-cache git
@@ -88,7 +88,7 @@ jobs:
matrix:
container-id: [integration-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 2.0 --memory 2g --ulimit nofile=1024:1024 --hostname kafka-integration-${{ matrix.container-id }}
env:
GOMAXPROCS: 2
@@ -96,16 +96,16 @@ jobs:
KAFKA_TEST_ISOLATION: "true"
CONTAINER_ID: ${{ matrix.container-id }}
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code
uses: actions/checkout@v7
- name: Setup Integration Container Environment
run: |
apk add --no-cache git procps
@@ -136,7 +136,7 @@ jobs:
matrix:
container-id: [e2e-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 2.0 --memory 2g --hostname kafka-e2e-${{ matrix.container-id }}
env:
GOMAXPROCS: 2
@@ -150,7 +150,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
cache-dependency-path: |
**/go.sum
@@ -315,7 +315,7 @@ jobs:
matrix:
container-id: [consumer-group-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 1.0 --memory 2g --ulimit nofile=512:512 --hostname kafka-consumer-${{ matrix.container-id }}
env:
GOMAXPROCS: 1
@@ -329,7 +329,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
cache-dependency-path: |
**/go.sum
@@ -477,7 +477,7 @@ jobs:
matrix:
container-id: [client-compat-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 1.0 --memory 1.5g --shm-size 256m --hostname kafka-client-${{ matrix.container-id }}
env:
GOMAXPROCS: 1
@@ -491,7 +491,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
cache-dependency-path: |
**/go.sum
@@ -635,7 +635,7 @@ jobs:
matrix:
container-id: [smq-integration-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 1.0 --memory 2g --hostname kafka-smq-${{ matrix.container-id }}
env:
GOMAXPROCS: 1
@@ -649,7 +649,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
cache-dependency-path: |
**/go.sum
@@ -796,7 +796,7 @@ jobs:
matrix:
container-id: [protocol-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 1.0 --memory 1g --tmpfs /tmp:exec --hostname kafka-protocol-${{ matrix.container-id }}
env:
GOMAXPROCS: 1
@@ -804,16 +804,16 @@ jobs:
KAFKA_PROTOCOL_ISOLATION: "true"
CONTAINER_ID: ${{ matrix.container-id }}
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code
uses: actions/checkout@v7
- name: Setup Protocol Container Environment
run: |
apk add --no-cache git procps
+4 -4
View File
@@ -42,15 +42,15 @@ jobs:
path: test/plugin_workers/volume_balance
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Run plugin worker tests
run: go test -v ./${{ matrix.path }}
+8 -8
View File
@@ -39,6 +39,7 @@ permissions:
issues: write
env:
GO_VERSION: '1.26'
TIMEOUT: '45m'
jobs:
@@ -60,11 +61,10 @@ jobs:
- name: Clean up stale FUSE mounts
uses: ./.github/actions/cleanup-stale-fuse-mounts
- name: Set up Go
id: setup-go
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ${{ env.GO_VERSION }}
cache: ${{ runner.environment == 'github-hosted' }}
cache-dependency-path: |
go.sum
@@ -532,7 +532,7 @@ jobs:
const report = fs.readFileSync(reportPath, 'utf8');
const comment = `## POSIX Compliance Test Results
**Go Version:** ${{ steps.setup-go.outputs.go-version }}
**Go Version:** ${{ env.GO_VERSION }}
**FUSE Version:** ${{ matrix.fuse-version }}
**Test Type:** ${{ github.event.inputs.test_type || 'full' }}
@@ -570,7 +570,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ${{ env.GO_VERSION }}
cache: ${{ runner.environment == 'github-hosted' }}
- name: Install macFUSE
@@ -623,7 +623,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ${{ env.GO_VERSION }}
cache: ${{ runner.environment == 'github-hosted' }}
- name: Install security analysis tools
@@ -680,7 +680,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ${{ env.GO_VERSION }}
cache: ${{ runner.environment == 'github-hosted' }}
- name: Install dependencies
@@ -733,7 +733,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ${{ env.GO_VERSION }}
cache: ${{ runner.environment == 'github-hosted' }}
- name: Install dependencies
-138
View File
@@ -1,138 +0,0 @@
name: "postgres_flat Filer Store Tests"
on:
push:
branches: [ master ]
paths:
- 'weed/**'
- 'test/postgres_flat/**'
- 'test/s3/versioning/**'
- 'test/testutil/**'
- 'test/volume_server/framework/**'
- 'go.mod'
- 'go.sum'
- '.github/workflows/postgres-flat-tests.yml'
- '.github/actions/fix-fusermount-setuid/**'
pull_request:
paths:
- 'weed/**'
- 'test/postgres_flat/**'
- 'test/s3/versioning/**'
- 'test/testutil/**'
- 'test/volume_server/framework/**'
- 'go.mod'
- 'go.sum'
- '.github/workflows/postgres-flat-tests.yml'
- '.github/actions/fix-fusermount-setuid/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.event_name == 'push' && github.ref) || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) }}
permissions:
contents: read
jobs:
postgres-flat:
name: S3 and POSIX over postgres_flat
runs-on: ubuntu-24.04
timeout-minutes: 30
services:
postgres:
image: postgres:17
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 20
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
cache: ${{ runner.environment == 'github-hosted' }}
- name: Repair the fusermount3 setuid bit
uses: ./.github/actions/fix-fusermount-setuid
- name: Build SeaweedFS
run: go build -o weed/weed -buildvcs=false ./weed
- name: Run tests
env:
RUN_POSTGRES_TESTS: "1"
WEED_BINARY: ${{ github.workspace }}/weed/weed
run: go test -v -count=1 -timeout=20m ./test/postgres_flat/
versioning-suite:
name: S3 versioning suite over postgres_flat
runs-on: ubuntu-24.04
timeout-minutes: 30
services:
postgres:
image: postgres:17
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 20
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
cache: ${{ runner.environment == 'github-hosted' }}
- name: Build SeaweedFS
run: go build -o weed/weed -buildvcs=false ./weed
- name: Start weed mini on postgres_flat
run: |
mkdir -p "$RUNNER_TEMP/config" "$RUNNER_TEMP/data"
: > "$RUNNER_TEMP/config/security.toml"
cat > "$RUNNER_TEMP/config/filer.toml" <<'EOF'
[postgres_flat]
enabled = true
hostname = "127.0.0.1"
port = 5432
username = "postgres"
password = "postgres"
database = "postgres"
sslmode = "disable"
EOF
weed/weed -config_dir="$RUNNER_TEMP/config" mini -ip=127.0.0.1 -ip.bind=127.0.0.1 \
-dir="$RUNNER_TEMP/data" -s3.config="$GITHUB_WORKSPACE/docker/compose/s3.json" \
-webdav=false -admin.ui=false > "$RUNNER_TEMP/weed.log" 2>&1 &
ready() {
curl -s -o /dev/null http://127.0.0.1:8333 &&
test "$(docker exec ${{ job.services.postgres.id }} psql -U postgres -Atc "SELECT count(*) FROM information_schema.columns WHERE table_name = 'filemeta' AND column_name = 'path'")" = 1
}
for i in $(seq 90); do ready && break; sleep 1; done
ready || { cat "$RUNNER_TEMP/weed.log"; exit 1; }
- name: Run the S3 versioning suite
env:
ENABLE_STRESS_TESTS: "true"
run: go test -v -count=1 -timeout=25m ./test/s3/versioning/
- name: Show the server log
if: failure()
run: tail -200 "$RUNNER_TEMP/weed.log"
+4 -4
View File
@@ -38,16 +38,16 @@ jobs:
run:
working-directory: test/postgres
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code
uses: actions/checkout@v7
- name: Configure Docker Hub mirror
run: |
echo '{"registry-mirrors": ["https://mirror.gcr.io"]}' | sudo tee /etc/docker/daemon.json
+20 -113
View File
@@ -7,43 +7,32 @@ on:
- 'seaweed-volume/**'
- 'seaweed-common/**'
- '.github/workflows/rust_binaries_dev.yml'
workflow_dispatch:
# Serialize dev builds of the shared "dev" release without cancelling a run.
concurrency:
group: rust-binaries-dev-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
jobs:
prepare:
cleanup:
permissions:
contents: write
runs-on: ubuntu-latest
outputs:
build_time: ${{ steps.build_time.outputs.value }}
steps:
- name: Ref guard
if: github.ref != 'refs/heads/master'
env:
GH_REF: ${{ github.ref }}
run: |
echo "dev builds only publish from master (got $GH_REF)" >&2
exit 1
- name: Set BUILD_TIME
id: build_time
run: |
echo "value=$(date -u +%Y%m%d-%H%M)" >> "$GITHUB_OUTPUT"
- name: Delete old Rust volume dev assets
uses: mknejp/delete-release-assets@v1
continue-on-error: true
with:
token: ${{ github.token }}
tag: dev
fail-if-no-assets: false
assets: |
weed-volume-*
build-rust-volume-dev-linux:
permissions:
contents: write
needs: prepare
needs: cleanup
runs-on: ubuntu-24.04
env:
BUILD_TIME: ${{ needs.prepare.outputs.build_time }}
strategy:
matrix:
include:
@@ -51,11 +40,6 @@ jobs:
asset_suffix: linux-amd64
steps:
- name: Validate BUILD_TIME
run: |
: "${BUILD_TIME:?prepare output missing}"
- uses: actions/checkout@v7
- name: Install Rust toolchain
@@ -73,6 +57,9 @@ jobs:
restore-keys: |
rust-dev-${{ matrix.target }}-
- name: Set BUILD_TIME
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> "$GITHUB_ENV"
- name: Build Rust volume server (large disk)
env:
SEAWEEDFS_COMMIT: ${{ github.sha }}
@@ -109,10 +96,8 @@ jobs:
build-rust-volume-dev-darwin:
permissions:
contents: write
needs: [prepare, build-rust-volume-dev-linux]
needs: build-rust-volume-dev-linux
runs-on: macos-latest
env:
BUILD_TIME: ${{ needs.prepare.outputs.build_time }}
strategy:
matrix:
include:
@@ -122,11 +107,6 @@ jobs:
asset_suffix: darwin-amd64
steps:
- name: Validate BUILD_TIME
run: |
: "${BUILD_TIME:?prepare output missing}"
- uses: actions/checkout@v7
- name: Install Rust toolchain
@@ -146,6 +126,9 @@ jobs:
restore-keys: |
rust-dev-${{ matrix.target }}-
- name: Set BUILD_TIME
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> "$GITHUB_ENV"
- name: Build Rust volume server (large disk)
env:
SEAWEEDFS_COMMIT: ${{ github.sha }}
@@ -178,79 +161,3 @@ jobs:
weed-volume-${{ env.BUILD_TIME }}-${{ matrix.asset_suffix }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
prune:
needs: [prepare, build-rust-volume-dev-linux, build-rust-volume-dev-darwin]
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
env:
BUILD_TIME: ${{ needs.prepare.outputs.build_time }}
RELEASE_TAG: dev
steps:
- name: Delete Rust dev binaries from older builds
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
: "${BUILD_TIME:?BUILD_TIME is empty}"
case "$BUILD_TIME" in
[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]) ;;
*) echo "Invalid BUILD_TIME: $BUILD_TIME" >&2; exit 1 ;;
esac
release_tag="${RELEASE_TAG:-dev}"
if ! release_json=$(gh api "repos/$GITHUB_REPOSITORY/releases/tags/$release_tag" 2>&1); then
case "$release_json" in
*"Not Found"*) echo "No $release_tag release; nothing to prune"; exit 0 ;;
esac
echo "Release lookup failed: $release_json" >&2
exit 1
fi
release_id=$(jq -r '.id // empty' <<<"$release_json")
if [ -z "$release_id" ]; then
echo "Release lookup returned no id" >&2
exit 1
fi
assets_file=$(mktemp)
trap 'rm -f "$assets_file"' EXIT
if ! gh api "repos/$GITHUB_REPOSITORY/releases/$release_id/assets" --paginate \
--jq '.[] | select(.name | startswith("weed-volume-")) | [.id, .name] | @tsv' \
> "$assets_file"; then
echo "Failed to list release assets" >&2
exit 1
fi
total=$(awk 'END{print NR+0}' "$assets_file")
matching=$(awk -v s="-$BUILD_TIME-" 'index($0,s){n++} END{print n+0}' "$assets_file")
if [ "$matching" -eq 0 ]; then
echo "No assets carry stamp $BUILD_TIME; refusing to prune" >&2
exit 1
fi
build_key=${BUILD_TIME/-/}
kept=0; newer=0; deleted=0; gone=0; failed=0
while IFS=$'\t' read -r id name || [ -n "${name:-}" ]; do
[ -n "${id:-}" ] || continue
case "$name" in
*"-$BUILD_TIME-"*) kept=$((kept+1)); continue ;;
esac
if [[ "$name" =~ -([0-9]{8})-([0-9]{4})- ]] && [ "${BASH_REMATCH[1]}${BASH_REMATCH[2]}" -gt "$build_key" ]; then
newer=$((newer+1)); continue
fi
if out=$(gh api -X DELETE "repos/$GITHUB_REPOSITORY/releases/assets/$id" </dev/null 2>&1); then
deleted=$((deleted+1))
else
case "$out" in
*"Not Found"*) gone=$((gone+1)) ;;
*) failed=$((failed+1)); echo "Failed to delete asset $name ($id): $out" >&2 ;;
esac
fi
done < "$assets_file"
[ "$((kept+newer+deleted+gone+failed))" -eq "$total" ] || { echo "Processed $((kept+newer+deleted+gone+failed)) of $total assets" >&2; exit 1; }
echo "Kept $kept assets from this build and $newer from newer builds; deleted $deleted older assets; $gone already gone; $failed failures"
[ "$failed" -eq 0 ] || { echo "::warning::prune: $failed deletions failed"; exit 1; }
-255
View File
@@ -1,255 +0,0 @@
name: "S3 digest and FIPS matrix"
# Runs the S3 suites in every digest mode with both volume servers and JWT
# signing on, so the sha256 digest and GODEBUG=fips140=only stay working:
# md5 GODEBUG=fips140=off, the default digest
# sha256 GODEBUG=fips140=on with the filer's -digest=sha256
# fips140only GODEBUG=fips140=only and WEED_FIPS_MODE=strict, built with
# GOFIPS140=v1.0.0
# test/s3/digest_matrix/start_cluster.sh starts each cell's cluster. The
# negative-config job checks what strict mode refuses at startup
# (test/s3/digest_matrix/negative_config.sh).
on:
push:
branches: [ master ]
paths:
- 'weed/s3api/**'
- 'weed/filer/**'
- 'weed/server/**'
- 'weed/operation/**'
- 'weed/storage/**'
- 'weed/security/**'
- 'weed/util/**'
- 'weed/command/**'
- 'weed/pb/**'
- 'seaweed-volume/**'
- 'seaweed-common/**'
- 'test/s3/digest_matrix/**'
- 'test/s3/compatibility/**'
- 'test/s3/etag/**'
- 'test/s3/checksum/**'
- 'docker/compose/s3.json'
- 'docker/compose/s3tests.conf'
- 'go.mod'
- 'go.sum'
- '.github/workflows/s3-digest-matrix.yml'
pull_request:
branches: [ master ]
paths:
- 'weed/s3api/**'
- 'weed/filer/**'
- 'weed/server/**'
- 'weed/operation/**'
- 'weed/storage/**'
- 'weed/security/**'
- 'weed/util/**'
- 'weed/command/**'
- 'weed/pb/**'
- 'seaweed-volume/**'
- 'seaweed-common/**'
- 'test/s3/digest_matrix/**'
- 'test/s3/compatibility/**'
- 'test/s3/etag/**'
- 'test/s3/checksum/**'
- 'docker/compose/s3.json'
- 'docker/compose/s3tests.conf'
- 'go.mod'
- 'go.sum'
- '.github/workflows/s3-digest-matrix.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.event_name == 'push' && github.ref) || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) }}
permissions:
contents: read
jobs:
build:
name: Build weed (GOFIPS140) and weed-volume
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
cache: ${{ runner.environment == 'github-hosted' }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Fingerprint build toolchain
id: toolchain
run: echo "fingerprint=$(getconf GNU_LIBC_VERSION | tr ' ' '-')-rustc-$(rustc -V | awk '{print $2}')" >> "$GITHUB_OUTPUT"
- name: Cache cargo registry and target
if: runner.environment == 'github-hosted'
uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
seaweed-volume/target
key: rust-${{ steps.toolchain.outputs.fingerprint }}-${{ hashFiles('seaweed-volume/Cargo.lock', 'seaweed-common/Cargo.lock') }}
restore-keys: |
rust-${{ steps.toolchain.outputs.fingerprint }}-
# GOFIPS140=v1.0.0 links the frozen Go Cryptographic Module, which the
# fips140only cells need; the other cells set GODEBUG to off or on.
- name: Build weed
run: |
cd weed
CGO_ENABLED=0 GOFIPS140=v1.0.0 go build -tags s3tests -buildvcs=false -o weed .
go version -m weed | grep GOFIPS140
- name: Build weed-volume
run: cd seaweed-volume && cargo build --release
- name: Package binaries
run: tar cf digest-matrix-binaries.tar weed/weed seaweed-volume/target/release/weed-volume
- uses: actions/upload-artifact@v7
with:
name: digest-matrix-binaries
if-no-files-found: error
retention-days: 1
path: digest-matrix-binaries.tar
negative-config:
name: Strict FIPS mode refusals
needs: build
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v8
with:
name: digest-matrix-binaries
- name: Restore binaries
run: |
tar xf digest-matrix-binaries.tar
chmod +x weed/weed seaweed-volume/target/release/weed-volume
- name: Short keys refused
env:
WEED: ${{ github.workspace }}/weed/weed
WEED_VOLUME: ${{ github.workspace }}/seaweed-volume/target/release/weed-volume
WORK_DIR: /tmp/negative-config
run: bash test/s3/digest_matrix/negative_config.sh
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: negative-config-logs
path: /tmp/negative-config/**/*.log
retention-days: 3
suites:
name: S3 suites (${{ matrix.digest }}, ${{ matrix.volume }} volume server)
needs: build
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
digest: [ md5, sha256, fips140only ]
volume: [ go, rust ]
# s3_digest names the ETag digest for the Go suites. ceph_deselect
# drops ceph tests whose answer the mode changes on purpose:
# test_object_write_check_etag expects MD5("bar") as the ETag, and
# under fips140=only SSE-C is refused with 501 before its headers are
# compared, so the SSE-C conflict tests get 501 where they expect 400.
include:
- digest: md5
s3_digest: md5
- digest: sha256
s3_digest: sha256
ceph_deselect: --deselect s3tests/functional/test_s3.py::test_object_write_check_etag
- digest: fips140only
s3_digest: sha256
ceph_deselect: >-
--deselect s3tests/functional/test_s3.py::test_object_write_check_etag
--deselect s3tests/functional/test_s3.py::test_put_obj_enc_conflict_c_s3
--deselect s3tests/functional/test_s3.py::test_put_obj_enc_conflict_c_kms
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
cache: ${{ runner.environment == 'github-hosted' }}
- uses: actions/setup-python@v7
with:
python-version: '3.10'
# The same s3-tests checkout and fixes as the "Ceph S3 tests" workflow.
- name: Clone s3-tests
run: |
git clone https://github.com/ceph/s3-tests.git
cd s3-tests
sudo apt-get update -qq
sudo apt-get install -y -qq libxml2-dev libxslt1-dev zlib1g-dev
python3 -m pip install -r requirements.txt
python3 -m pip install tox
python3 -m pip install -e .
cd ..
S3_TESTS_PATH=s3-tests python3 test/s3/compatibility/fix_s3_tests_bucket_conflicts.py
sed -i "s/assert prefixes == \['foo%2B1\/', 'foo\/', 'quux%20ab\/'\]/assert prefixes == \['foo\/', 'foo%2B1\/', 'quux%20ab\/'\]/" s3-tests/s3tests/functional/test_s3.py
sed -i "/# request PartNumber out of range/,+4{s/assert status == 400/assert status == 416/; s/assert error_code == 'InvalidPart'/assert error_code == 'InvalidPartNumber'/}" s3-tests/s3tests/functional/test_s3.py
- uses: actions/download-artifact@v8
with:
name: digest-matrix-binaries
- name: Restore binaries
run: |
tar xf digest-matrix-binaries.tar
chmod +x weed/weed seaweed-volume/target/release/weed-volume
- name: Start the cluster
env:
DIGEST_MODE: ${{ matrix.digest }}
VOLUME_SERVER: ${{ matrix.volume }}
WEED: ${{ github.workspace }}/weed/weed
WEED_VOLUME: ${{ github.workspace }}/seaweed-volume/target/release/weed-volume
WORK_DIR: /tmp/digest-matrix
S3_CONFIG: ${{ github.workspace }}/docker/compose/s3.json
run: bash test/s3/digest_matrix/start_cluster.sh
- name: Run the basic ceph s3-tests
working-directory: s3-tests
env:
S3TEST_CONF: ${{ github.workspace }}/docker/compose/s3tests.conf
run: |
mapfile -t tests < <(grep -v '^[[:space:]]*#' "$GITHUB_WORKSPACE/test/s3/compatibility/s3tests_basic.txt")
# shellcheck disable=SC2086 # the deselect list is separate arguments
tox -- "${tests[@]}" ${{ matrix.ceph_deselect }}
- name: Run the etag and checksum Go suites
env:
S3_ENDPOINT: http://127.0.0.1:8000
S3_DIGEST: ${{ matrix.s3_digest }}
S3_FIPS140_ONLY: ${{ matrix.digest == 'fips140only' && '1' || '0' }}
S3_ACCESS_KEY: some_access_key1
S3_SECRET_KEY: some_secret_key1
run: go test -count=1 -timeout 10m ./test/s3/etag/ ./test/s3/checksum/
- name: Stop the cluster
if: always()
run: xargs kill < /tmp/digest-matrix/pids 2>/dev/null || true
- name: Upload server logs on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: digest-matrix-logs-${{ matrix.digest }}-${{ matrix.volume }}
path: /tmp/digest-matrix/*.log
retention-days: 3
@@ -73,20 +73,6 @@ jobs:
echo "=== Running S3 Prefix Object Tests ==="
go test -v -timeout=180s -run TestS3PrefixObjectKeys ./...
- name: Run S3 GetPart Tests
timeout-minutes: 15
working-directory: test/s3/normal
run: |
set -x
go test -v -timeout=180s -run TestS3GetPart ./...
- name: Run S3 Bucket Default Storage Class Tests
timeout-minutes: 15
working-directory: test/s3/normal
run: |
set -x
go test -v -timeout=180s -run TestS3BucketDefaultStorageClass ./...
- name: Run IAM Integration Tests
timeout-minutes: 15
working-directory: test/s3/normal
+2 -2
View File
@@ -45,7 +45,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
- name: Set up Python ${{ matrix.python-version }}
@@ -153,7 +153,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
- name: Run Go unit tests
-69
View File
@@ -1,69 +0,0 @@
name: "S3 rclone fstests"
on:
push:
branches: [ master ]
paths:
- 'weed/s3api/**'
- 'weed/filer/**'
- 'weed/server/**'
- 'weed/command/mini.go'
- 'go.mod'
- 'go.sum'
- 'test/s3/rclone_fstests/**'
- '.github/workflows/s3-rclone-tests.yml'
pull_request:
branches: [ master ]
paths:
- 'weed/s3api/**'
- 'weed/filer/**'
- 'weed/server/**'
- 'weed/command/mini.go'
- 'go.mod'
- 'go.sum'
- 'test/s3/rclone_fstests/**'
- '.github/workflows/s3-rclone-tests.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.event_name == 'push' && github.ref) || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) }}
permissions:
contents: read
jobs:
s3-rclone-fstests:
name: rclone fstests (S3 backend)
runs-on: ubuntu-24.04
timeout-minutes: 40
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
cache: ${{ runner.environment == 'github-hosted' }}
- name: Test the result checker
working-directory: test/s3/rclone_fstests
run: python3 -m unittest -v test_check_results
- name: Run rclone fstests
working-directory: test/s3/rclone_fstests
run: make test
- name: Show server log on failure
if: failure()
working-directory: test/s3/rclone_fstests
run: tail -200 weed-test.log || true
- name: Upload results
if: always()
uses: actions/upload-artifact@v7
with:
name: s3-rclone-fstests-results
path: test/s3/rclone_fstests/results.jsonl
if-no-files-found: ignore
retention-days: 7
+184 -3
View File
@@ -197,9 +197,190 @@ jobs:
}
trap cleanup EXIT
# test/s3/compatibility/s3tests_basic.txt is shared with s3-digest-matrix.yml.
mapfile -t basic_tests < <(grep -v '^[[:space:]]*#' "$GITHUB_WORKSPACE/test/s3/compatibility/s3tests_basic.txt")
tox -- "${basic_tests[@]}"
tox -- \
s3tests/functional/test_s3.py::test_bucket_list_empty \
s3tests/functional/test_s3.py::test_bucket_list_distinct \
s3tests/functional/test_s3.py::test_bucket_list_many \
s3tests/functional/test_s3.py::test_bucket_listv2_many \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_basic \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_basic \
s3tests/functional/test_s3.py::test_bucket_listv2_encoding_basic \
s3tests/functional/test_s3.py::test_bucket_list_encoding_basic \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_prefix \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_prefix \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_prefix_ends_with_delimiter \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_prefix_ends_with_delimiter \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_alt \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_alt \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_prefix_underscore \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_prefix_underscore \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_percentage \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_percentage \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_whitespace \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_whitespace \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_dot \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_dot \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_unreadable \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_unreadable \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_empty \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_empty \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_none \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_none \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_not_exist \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_not_exist \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_not_skip_special \
s3tests/functional/test_s3.py::test_bucket_list_prefix_delimiter_basic \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_basic \
s3tests/functional/test_s3.py::test_bucket_list_prefix_delimiter_alt \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_alt \
s3tests/functional/test_s3.py::test_bucket_list_prefix_delimiter_prefix_not_exist \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_prefix_not_exist \
s3tests/functional/test_s3.py::test_bucket_list_prefix_delimiter_delimiter_not_exist \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_delimiter_not_exist \
s3tests/functional/test_s3.py::test_bucket_list_prefix_delimiter_prefix_delimiter_not_exist \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_prefix_delimiter_not_exist \
s3tests/functional/test_s3.py::test_bucket_listv2_fetchowner_notempty \
s3tests/functional/test_s3.py::test_bucket_listv2_fetchowner_defaultempty \
s3tests/functional/test_s3.py::test_bucket_listv2_fetchowner_empty \
s3tests/functional/test_s3.py::test_bucket_list_prefix_basic \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_basic \
s3tests/functional/test_s3.py::test_bucket_list_prefix_alt \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_alt \
s3tests/functional/test_s3.py::test_bucket_list_prefix_empty \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_empty \
s3tests/functional/test_s3.py::test_bucket_list_prefix_none \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_none \
s3tests/functional/test_s3.py::test_bucket_list_prefix_not_exist \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_not_exist \
s3tests/functional/test_s3.py::test_bucket_list_prefix_unreadable \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_unreadable \
s3tests/functional/test_s3.py::test_bucket_list_maxkeys_one \
s3tests/functional/test_s3.py::test_bucket_listv2_maxkeys_one \
s3tests/functional/test_s3.py::test_bucket_list_maxkeys_zero \
s3tests/functional/test_s3.py::test_bucket_listv2_maxkeys_zero \
s3tests/functional/test_s3.py::test_bucket_list_maxkeys_none \
s3tests/functional/test_s3.py::test_bucket_listv2_maxkeys_none \
s3tests/functional/test_s3.py::test_bucket_list_unordered \
s3tests/functional/test_s3.py::test_bucket_listv2_unordered \
s3tests/functional/test_s3.py::test_bucket_list_maxkeys_invalid \
s3tests/functional/test_s3.py::test_bucket_list_marker_none \
s3tests/functional/test_s3.py::test_bucket_list_marker_empty \
s3tests/functional/test_s3.py::test_bucket_listv2_continuationtoken_empty \
s3tests/functional/test_s3.py::test_bucket_listv2_continuationtoken \
s3tests/functional/test_s3.py::test_bucket_listv2_both_continuationtoken_startafter \
s3tests/functional/test_s3.py::test_bucket_list_marker_unreadable \
s3tests/functional/test_s3.py::test_bucket_listv2_startafter_unreadable \
s3tests/functional/test_s3.py::test_bucket_list_marker_not_in_list \
s3tests/functional/test_s3.py::test_bucket_listv2_startafter_not_in_list \
s3tests/functional/test_s3.py::test_bucket_list_marker_after_list \
s3tests/functional/test_s3.py::test_bucket_listv2_startafter_after_list \
s3tests/functional/test_s3.py::test_bucket_list_return_data \
s3tests/functional/test_s3.py::test_bucket_list_objects_anonymous \
s3tests/functional/test_s3.py::test_bucket_listv2_objects_anonymous \
s3tests/functional/test_s3.py::test_bucket_list_objects_anonymous_fail \
s3tests/functional/test_s3.py::test_bucket_listv2_objects_anonymous_fail \
s3tests/functional/test_s3.py::test_bucket_list_long_name \
s3tests/functional/test_s3.py::test_bucket_list_special_prefix \
s3tests/functional/test_s3.py::test_bucket_delete_notexist \
s3tests/functional/test_s3.py::test_bucket_create_delete \
s3tests/functional/test_s3.py::test_object_read_not_exist \
s3tests/functional/test_s3.py::test_multi_object_delete \
s3tests/functional/test_s3.py::test_multi_objectv2_delete \
s3tests/functional/test_s3.py::test_object_head_zero_bytes \
s3tests/functional/test_s3.py::test_object_write_check_etag \
s3tests/functional/test_s3.py::test_object_write_cache_control \
s3tests/functional/test_s3.py::test_object_write_expires \
s3tests/functional/test_s3.py::test_put_obj_enc_conflict_c_s3 \
s3tests/functional/test_s3.py::test_put_obj_enc_conflict_c_kms \
s3tests/functional/test_s3.py::test_put_obj_enc_conflict_s3_kms \
s3tests/functional/test_s3.py::test_put_obj_enc_conflict_bad_enc_kms \
s3tests/functional/test_s3.py::test_object_content_encoding_aws_chunked \
s3tests/functional/test_s3.py::test_object_write_read_update_read_delete \
s3tests/functional/test_s3.py::test_object_metadata_replaced_on_put \
s3tests/functional/test_s3.py::test_object_write_file \
s3tests/functional/test_s3.py::test_post_object_invalid_date_format \
s3tests/functional/test_s3.py::test_post_object_no_key_specified \
s3tests/functional/test_s3.py::test_post_object_missing_signature \
s3tests/functional/test_s3.py::test_post_object_condition_is_case_sensitive \
s3tests/functional/test_s3.py::test_post_object_expires_is_case_sensitive \
s3tests/functional/test_s3.py::test_post_object_missing_expires_condition \
s3tests/functional/test_s3.py::test_post_object_missing_conditions_list \
s3tests/functional/test_s3.py::test_post_object_upload_size_limit_exceeded \
s3tests/functional/test_s3.py::test_post_object_missing_content_length_argument \
s3tests/functional/test_s3.py::test_post_object_invalid_content_length_argument \
s3tests/functional/test_s3.py::test_post_object_upload_size_below_minimum \
s3tests/functional/test_s3.py::test_post_object_empty_conditions \
s3tests/functional/test_s3.py::test_get_object_ifmatch_good \
s3tests/functional/test_s3.py::test_get_object_ifnonematch_good \
s3tests/functional/test_s3.py::test_get_object_ifmatch_failed \
s3tests/functional/test_s3.py::test_get_object_ifnonematch_failed \
s3tests/functional/test_s3.py::test_get_object_ifmodifiedsince_good \
s3tests/functional/test_s3.py::test_get_object_ifmodifiedsince_failed \
s3tests/functional/test_s3.py::test_get_object_ifunmodifiedsince_failed \
s3tests/functional/test_s3.py::test_get_checksum_object_attributes \
s3tests/functional/test_s3.py::test_bucket_head \
s3tests/functional/test_s3.py::test_bucket_head_notexist \
s3tests/functional/test_s3.py::test_object_raw_authenticated \
s3tests/functional/test_s3.py::test_object_raw_authenticated_bucket_acl \
s3tests/functional/test_s3.py::test_object_raw_authenticated_object_acl \
s3tests/functional/test_s3.py::test_object_raw_authenticated_object_gone \
s3tests/functional/test_s3.py::test_object_raw_get_x_amz_expires_out_range_zero \
s3tests/functional/test_s3.py::test_object_anon_put \
s3tests/functional/test_s3.py::test_object_put_authenticated \
s3tests/functional/test_s3.py::test_bucket_recreate_overwrite_acl \
s3tests/functional/test_s3.py::test_bucket_recreate_new_acl \
s3tests/functional/test_s3.py::test_buckets_create_then_list \
s3tests/functional/test_s3.py::test_buckets_list_ctime \
s3tests/functional/test_s3.py::test_list_buckets_invalid_auth \
s3tests/functional/test_s3.py::test_list_buckets_bad_auth \
s3tests/functional/test_s3.py::test_bucket_create_naming_good_contains_period \
s3tests/functional/test_s3.py::test_bucket_create_naming_good_contains_hyphen \
s3tests/functional/test_s3.py::test_bucket_list_special_prefix \
s3tests/functional/test_s3.py::test_object_copy_zero_size \
s3tests/functional/test_s3.py::test_object_copy_same_bucket \
s3tests/functional/test_s3.py::test_object_copy_to_itself \
s3tests/functional/test_s3.py::test_object_copy_diff_bucket \
s3tests/functional/test_s3.py::test_object_copy_canned_acl \
s3tests/functional/test_s3.py::test_object_copy_bucket_not_found \
s3tests/functional/test_s3.py::test_object_copy_key_not_found \
s3tests/functional/test_s3.py::test_multipart_copy_small \
s3tests/functional/test_s3.py::test_multipart_copy_without_range \
s3tests/functional/test_s3.py::test_multipart_copy_special_names \
s3tests/functional/test_s3.py::test_multipart_copy_multiple_sizes \
s3tests/functional/test_s3.py::test_multipart_get_part \
s3tests/functional/test_s3.py::test_multipart_upload \
s3tests/functional/test_s3.py::test_multipart_upload_empty \
s3tests/functional/test_s3.py::test_multipart_upload_multiple_sizes \
s3tests/functional/test_s3.py::test_multipart_upload_contents \
s3tests/functional/test_s3.py::test_multipart_upload_overwrite_existing_object \
s3tests/functional/test_s3.py::test_multipart_upload_size_too_small \
s3tests/functional/test_s3.py::test_multipart_resend_first_finishes_last \
s3tests/functional/test_s3.py::test_multipart_upload_resend_part \
s3tests/functional/test_s3.py::test_multipart_upload_missing_part \
s3tests/functional/test_s3.py::test_multipart_upload_incorrect_etag \
s3tests/functional/test_s3.py::test_abort_multipart_upload \
s3tests/functional/test_s3.py::test_list_multipart_upload \
s3tests/functional/test_s3.py::test_atomic_read_1mb \
s3tests/functional/test_s3.py::test_atomic_read_4mb \
s3tests/functional/test_s3.py::test_atomic_read_8mb \
s3tests/functional/test_s3.py::test_atomic_write_1mb \
s3tests/functional/test_s3.py::test_atomic_write_4mb \
s3tests/functional/test_s3.py::test_atomic_write_8mb \
s3tests/functional/test_s3.py::test_atomic_dual_write_1mb \
s3tests/functional/test_s3.py::test_atomic_dual_write_4mb \
s3tests/functional/test_s3.py::test_atomic_dual_write_8mb \
s3tests/functional/test_s3.py::test_atomic_multipart_upload_write \
s3tests/functional/test_s3.py::test_ranged_request_response_code \
s3tests/functional/test_s3.py::test_ranged_big_request_response_code \
s3tests/functional/test_s3.py::test_ranged_request_skip_leading_bytes_response_code \
s3tests/functional/test_s3.py::test_ranged_request_return_trailing_bytes_response_code \
s3tests/functional/test_s3.py::test_copy_object_ifmatch_good \
s3tests/functional/test_s3.py::test_copy_object_ifnonematch_failed \
s3tests/functional/test_s3.py::test_copy_object_ifmatch_failed \
s3tests/functional/test_s3.py::test_copy_object_ifnonematch_good \
s3tests/functional/test_s3.py::test_lifecycle_set \
s3tests/functional/test_s3.py::test_lifecycle_get \
s3tests/functional/test_s3.py::test_lifecycle_set_filter
# The expiration tests race the lifecycle worker's meta-log replay;
# under the suite's write flood a shard can trail an object's PUT
@@ -40,7 +40,7 @@ jobs:
- uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
- name: Build SeaweedFS
+4 -4
View File
@@ -31,16 +31,16 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Build weed binary
run: |
cd weed && go build -o weed .
@@ -31,16 +31,16 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Build weed binary
run: |
cd weed && go build -o weed .
-3
View File
@@ -151,6 +151,3 @@ __pycache__/
/test/s3vectors/weed-worker
/test/s3vectors/weed-volume
.pytest_cache/
# Graphify code graph (generated by .github/workflows/graph.yml)
graphify-out/
+1 -11
View File
@@ -36,7 +36,6 @@ Table of Contents
* [Docker Compose](#docker-compose)
* [Kubernetes with Helm](#kubernetes-with-helm)
* [Build from source](#build-from-source)
* [Development builds](#development-builds)
* [Scale out](#scale-out)
* [Why SeaweedFS](#why-seaweedfs)
* [Fast](#fast)
@@ -88,7 +87,7 @@ AWS_ACCESS_KEY_ID=admin AWS_SECRET_ACCESS_KEY=secret \
The same process also runs the master, a volume server, the filer, WebDAV, the Iceberg REST catalog, and the Admin UI. Add `S3_TABLE_BUCKET=warehouse` to also create an Iceberg table bucket, or `warehouse:LANCE` for a Lance one. Drop the AWS keys to run without authentication for development.
`weed mini` binds the Admin UI/API and WebDAV to `-ip.bind` like its other components, even without authentication, so use it on a trusted network or set `WEED_ADMIN_PASSWORD` or `https.admin` mTLS. Pass `-admin.allowInsecureBind=false` or `-webdav.allowInsecureBind=false` to keep an unauthenticated Admin or WebDAV on loopback. The Admin worker gRPC control plane stays on loopback; remote workers must opt in with `-admin.worker.ip=<address>` and should configure `grpc.admin` mTLS.
Without Admin authentication or mTLS, `weed mini` binds the Admin UI/API and its worker gRPC control plane to loopback rather than `-ip.bind`. Set `WEED_ADMIN_PASSWORD` or configure `https.admin` mTLS to keep the network bind. Remote workers must opt in with `-admin.worker.ip=<address>` and should configure `grpc.admin` mTLS. `-admin.allowInsecureBind` restores the legacy unauthenticated network bind and should only be used on an isolated network.
> macOS: if the binary is quarantined, run `xattr -d com.apple.quarantine ./weed` first.
@@ -176,15 +175,6 @@ cd seaweedfs/weed && make install
`weed` lands in `$GOPATH/bin`. [Getting Started][GettingStarted] covers running master, volume, filer, and S3 as separate processes.
## Development builds ##
Each dev build workflow publishes its latest successful build of `master`:
- **Binaries**: the [`dev` release](https://github.com/seaweedfs/seaweedfs/releases/tag/dev) has Linux amd64, Windows amd64, and macOS amd64/arm64 archives named `weed-<yyyymmdd-HHMM>-<linux|windows|darwin>-<arch>.tar.gz` (`.zip` on Windows) and `weed-large-disk-<yyyymmdd-HHMM>-<linux|windows|darwin>-<arch>`, each with an `.md5` checksum. The Rust volume server is published there too as `weed-volume-*` for Linux amd64 (glibc) and macOS amd64/arm64. The Go archives contain `weed-normal-disk` or `weed-large-disk` (`.exe` on Windows) rather than `weed`, and the Rust archives contain `weed-volume-normal` or `weed-volume-large-disk` rather than `weed-volume`, so rename or symlink the one you want. The `.md5` files are published for the Go archives only.
- **Containers**: `docker pull chrislusf/seaweedfs:dev` or `ghcr.io/chrislusf/seaweedfs:dev`, built for `linux/amd64` and `linux/arm64`. The [dev compose file](docker/seaweedfs-dev-compose.yml) runs the Docker Hub image as master, volume, filer, S3, WebDAV, and admin.
The timestamp in a binary name is the UTC start time of the run that built it. The Go binaries, the Rust volume server, and the `:dev` image come from three separate path-filtered workflows, so they can carry different timestamps and lag `master` by hours, or much longer when their paths were not touched. The release can list more than one timestamp for a while, for example after a failed or retried run; use the newest one for your platform. The `dev` release is marked pre-release, so it does not appear under [releases/latest](https://github.com/seaweedfs/seaweedfs/releases/latest); these builds come from `master`, can break at any commit, and are not recommended for production.
## Scale out ##
Capacity is a volume server. Start one on any machine with disk and point it at the master:
+2 -15
View File
@@ -278,24 +278,11 @@ automatic vacuum or another request is running does nothing and gets
### Delete a collection
```bash
curl -X DELETE "http://localhost:9333/col/delete?collection=benchmark"
curl "http://localhost:9333/col/delete?collection=benchmark"
```
Deletes all volumes of the collection, including erasure-coded shards.
`204 No Content` on success. Only the `DELETE` method is accepted; any other
method gets `405 Method Not Allowed`.
The `collection` parameter is required: a request without it, or with an
empty value, gets `400 Bad Request`. To delete the default (empty-named)
collection, name it explicitly with `collection=_default` or
`collection=_default_`, the keywords `weed shell collection.delete` accepts.
If a collection is literally named a keyword, that name deletes it, and when
it exists next to the default collection the request gets
`400 Bad Request`; use the other keyword for the default collection. If both
keyword names are literal collections next to the default collection, both
keywords get `400 Bad Request`; delete the default collection with
`weed shell` `collection.delete -collection _default -apply`, where the
keywords always mean the default collection.
`204 No Content` on success.
### Health
+1 -4
View File
@@ -169,10 +169,7 @@ func Run(args []string) int {
}
func runWithOptions(opts *Options) bool {
if err := util.LoadSecurityConfigurationOrError(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
return false
}
util.LoadConfiguration("security", false)
// Validate options.
if opts.MasterAddr == "" {
-6
View File
@@ -13,7 +13,6 @@ import (
"github.com/peterh/liner"
"github.com/seaweedfs/seaweedfs/weed/query/engine"
"github.com/seaweedfs/seaweedfs/weed/util"
flag "github.com/seaweedfs/seaweedfs/weed/util/fla9"
"github.com/seaweedfs/seaweedfs/weed/util/grace"
"github.com/seaweedfs/seaweedfs/weed/util/sqlutil"
@@ -107,11 +106,6 @@ func Run(args []string) int {
}
func runWithOptions(opts *Options) bool {
if err := util.LoadSecurityConfigurationOrError(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
return false
}
// Initialize SQL engine with master address for service discovery.
sqlEngine := engine.NewSQLEngine(opts.Master)
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.27 AS builder
FROM golang:1.26 AS builder
RUN apt-get update && \
apt-get install -y build-essential wget ca-certificates && \
+3 -3
View File
@@ -1,6 +1,6 @@
# Pin the builder to the host arch and cross-compile the (CGO-free) Go binary,
# so arm64/arm/386 targets skip QEMU emulation of the whole compile.
FROM --platform=$BUILDPLATFORM golang:1.27-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS builder
RUN apk add git g++ fuse
RUN mkdir -p /go/src/github.com/seaweedfs/
ARG BRANCH=${BRANCH:-master}
@@ -93,8 +93,8 @@ RUN mkdir -p /etc/seaweedfs
COPY --from=builder /go/src/github.com/seaweedfs/seaweedfs/docker/filer.toml /etc/seaweedfs/filer.toml
COPY --from=builder /go/src/github.com/seaweedfs/seaweedfs/docker/entrypoint.sh /entrypoint.sh
# FIPS 140-3 mode is on by default for every process (entrypoint.sh)
# To disable: docker run -e WEED_FIPS_MODE=off ...
# FIPS 140-3 mode is ON by default (Go 1.24+)
# To disable: docker run -e GODEBUG=fips140=off ...
# Install dependencies and create non-root user
RUN apk upgrade --no-cache && \
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.27 AS builder
FROM golang:1.26 AS builder
RUN apt-get update
RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.27 AS builder
FROM golang:1.26 AS builder
RUN apt-get update
RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev
+1 -3
View File
@@ -21,9 +21,7 @@ docker compose -f seaweedfs-compose.yml -p seaweedfs up
```
## Try the latest development image
The compose file below uses `chrislusf/seaweedfs:dev`, built from `master`. It is a development image, not a stable release, and can lag `master` by hours or more; the `org.opencontainers.image.revision` label records the commit it was built from, and pinning by digest keeps that exact build. See [Development builds](../README.md#development-builds) for the `dev` binaries and image details.
## Try latest tip
```bash
+4 -44
View File
@@ -1,5 +1,9 @@
#!/bin/sh
# Enable FIPS 140-3 mode by default (Go 1.24+)
# To disable: docker run -e GODEBUG=fips140=off ...
export GODEBUG="${GODEBUG:+$GODEBUG,}fips140=on"
# Fix permissions for mounted volumes
# If /data is mounted from host, it might have different ownership
# Fix this by ensuring seaweed user owns the directory
@@ -28,54 +32,10 @@ if [ "$(id -u)" = "0" ]; then
fi
fi
# A restrictive Docker daemon umask can leave these 0600, and the resolver
# then falls back to a nameserver on localhost once privileges are dropped.
for f in /etc/resolv.conf /etc/hosts; do
if [ -f "$f" ] && ! su-exec seaweed test -r "$f"; then
chmod a+r "$f" 2>/dev/null
fi
done
# Use su-exec to drop privileges and run as seaweed user
exec su-exec seaweed "$0" "$@"
fi
# FIPS 140-3 mode is on by default, for the Go processes and the Rust
# binaries alike. To pick another mode: docker run -e WEED_FIPS_MODE=off (or
# strict). A fips.mode in security.toml alone cannot change it, since Go
# processes would still get this mode's fips140 and refuse to start.
# WEED_FIPS_MODE_DEFAULT is the mode when nothing else sets one; set it empty
# to leave every process in its own default (fips140=off for Go, off for Rust).
# A fips140 the caller puts in GODEBUG still picks the mode, for the Rust
# binaries as well, unless WEED_FIPS_MODE is set, but is deprecated and warns;
# a Go process refuses to start when its fips140 differs from WEED_FIPS_MODE or
# fips.mode.
# Transparent huge pages are a host-wide setting this image cannot change; to
# turn them off for this process only, append GODEBUG=disablethp=1.
export WEED_FIPS_MODE_DEFAULT="${WEED_FIPS_MODE_DEFAULT-on}"
godebug_fips140="$(printf '%s\n' "$GODEBUG" | tr ',' '\n' | sed -n 's/^fips140=/=/p' | tail -n 1)"
case "$godebug_fips140" in
=off | =) WEED_FIPS_MODE_DEFAULT=off ;;
=on | =debug) WEED_FIPS_MODE_DEFAULT=on ;;
=only) WEED_FIPS_MODE_DEFAULT=strict ;;
esac
if [ -n "$godebug_fips140" ] && [ -z "$WEED_FIPS_MODE" ]; then
echo "Warning: choosing the FIPS mode with GODEBUG=fips140 is deprecated; set WEED_FIPS_MODE=off, on or strict, which also covers the Rust binaries when they start without this entrypoint." >&2
fi
case "${WEED_FIPS_MODE:-$WEED_FIPS_MODE_DEFAULT}" in
off) fips140=off ;;
on) fips140=on ;;
strict) fips140=only ;;
*) fips140= ;;
esac
export GODEBUG="${fips140:+fips140=$fips140}${fips140:+${GODEBUG:+,}}${GODEBUG}"
for f in /etc/resolv.conf /etc/hosts; do
if [ -f "$f" ] && [ ! -r "$f" ]; then
echo "Warning: $f is not readable by uid $(id -u), so host name lookups may fail. Make it world-readable (0644)." >&2
fi
done
isArgPassed() {
# Match both `-flag` and `--flag` (and their `=value` forms): the Go fla9
# library accepts both, and users may pick either form on the CLI.
+7 -9
View File
@@ -30,12 +30,10 @@ Override `SEAWEEDFS_IMAGE` to test a newer image. With metrics-enabled engines,
append `--metrics-port=9329 --metrics-ip=0.0.0.0` to the vector command and scrape
`vector:9329/metrics` inside the Compose network.
A native development setup can use `weed mini -vectorBucket=embeddings`. Mini
starts `weed-vector` and the `weed-worker` maintenance worker when it finds them
beside `weed` or on PATH, and logs and continues without one it cannot find.
`-vector.binary` selects an explicit engine binary, and `weed-worker` is also
looked up beside it. `-vector=false` leaves both out, and
`-vector.metricsPort=9329` enables HTTP readiness and metrics on a compatible
engine. The children inherit the cluster's configuration directory and stop with
mini. `weed shell` provides `s3vectors -operation <Operation> -file
request.json` for the same API operations using trusted cluster credentials.
A native development setup can use `weed mini -vector -vectorBucket=embeddings`
with `weed-vector` beside `weed` or on PATH. `-vector.binary` selects an explicit
binary, and `-vector.metricsPort=9329` enables HTTP readiness and metrics on a
compatible engine. The child inherits the cluster's configuration directory and
stops with mini. Run `weed-worker` separately for ANN maintenance. `weed shell`
provides `s3vectors -operation <Operation> -file request.json` for the same API
operations using trusted cluster credentials.
+1 -1
View File
@@ -1,7 +1,7 @@
services:
seaweedfs:
image: ${SEAWEEDFS_IMAGE:-chrislusf/seaweedfs:4.53}
command: mini -dir=/data -ip=seaweedfs -ip.bind=0.0.0.0 -admin.password=vector-demo -admin.worker.ip=0.0.0.0 -tableBucket=embeddings:LANCE -vector=false
command: mini -dir=/data -ip=seaweedfs -ip.bind=0.0.0.0 -admin.password=vector-demo -admin.worker.ip=0.0.0.0 -tableBucket=embeddings:LANCE
environment: &environment
WEED_JWT_FILER_SIGNING_KEY: vector-demo-cluster-key
AWS_ACCESS_KEY_ID: vector-demo
-157
View File
@@ -1,157 +0,0 @@
# Yandex Disk as a remote storage
SeaweedFS can mount a Yandex Disk and mirror buckets to it, the same way it uses
S3, Google Cloud Storage, or Azure Blob Storage. The storage type is `yandex`.
Yandex Disk has no buckets: a **top-level folder under `yandex.root` plays the
bucket**, and the folder holds the objects. A file's modification time and
content encoding, which the Disk API cannot store natively, travel as custom
resource properties (`seaweedfs_modified`, `seaweedfs_content_encoding`). The
client also reads `rclone_modified`, so objects uploaded by rclone keep their
mtime.
## Limitations to know first
- The public Disk API has **no multipart upload**: an object is one PUT. Very
large objects are limited by the plan's maximum file size (see `GET /` quota)
and need a long HTTP timeout.
- Writes are expensive: one upload is an upload-link request, the PUT, a
metadata PATCH, and a stat.
- Yandex applies rate limits; the client retries 423, 429, 5xx and 509 with a
backoff, the sync retries a failed upload from a fresh reader.
- The Disk API lists one folder per request, so `remote.cache` and
`remote.copy.local`, which walk a whole tree, cost one request per folder.
- S3 keys that contain characters Yandex rejects in a path fail; there is no
key-encoding layer. S3 keys are not folders: a prefix that only appears as
part of object names is created on demand.
- This is a consumer product: it fits backups and small mirrors, not millions
of objects or a high request rate.
## 1. Register an OAuth app
1. Open <https://oauth.yandex.ru/client/new> and create an app.
2. Pick the **Web services** platform.
3. Set the redirect URI to `https://oauth.yandex.ru/verification_code`. That
page shows the authorization code (or the token) for the operator to copy,
so no browser is needed on the server.
4. Grant the app the permissions you need:
- `cloud_api:disk.write` — write anywhere on the disk (needed for buckets
and for `-yandex.root` outside the app folder),
- `cloud_api:disk.read` — read the disk,
- `cloud_api:disk.info` — read the quota,
- `cloud_api:disk.app_folder` — app folder only; then the configuration
needs `-yandex.app_folder=true`.
5. Copy the **ClientID** (and the **Client secret** if you want a refreshable
token).
A Yandex Mail account is required for a working Disk subscription; a token
issued for an account without one fails with
`403 DiskUnsupportedUserAccountTypeError`.
## 2. Get a token
### Refreshable token (recommended)
```bash
# 1. print the authorization url and keep the app credentials
weed shell -master=... <<< "remote.configure -name=disk -type=yandex \
-yandex.client_id=<client id> -yandex.client_secret=<client secret> -yandex.oauth_url"
# 2. open the printed url, allow the app, copy the code from the page
# 3. store the token
weed shell -master=... <<< "remote.configure -name=disk -yandex.code=<code>"
```
The stored value is a token JSON document
(`{"access_token","refresh_token","token_type","expiry"}`, the same shape
rclone stores), so a token can also be copied from an existing rclone
configuration.
### Debug token (one year, no refresh)
Open
`https://oauth.yandex.ru/authorize?response_type=token&client_id=<client id>`
in a browser, allow the app, and copy the token. Then:
```bash
weed shell -master=... <<< "remote.configure -name=disk -type=yandex -yandex.token=<token>"
```
To try the backend without registering an app, the Disk API polygon
(<https://yandex.ru/dev/disk/poligon/>) issues a one-year token for its own
OAuth app: sign in, click "Получить OAuth-токен", allow the access, and copy
`access_token` from the address the page lands on. That token cannot be
refreshed; use the code flow above for anything long-lived.
## 3. Configure
```bash
remote.configure -name=disk -type=yandex -yandex.token=<token> [-yandex.root=/seaweedfs]
```
| flag | meaning |
| --- | --- |
| `-yandex.token` | token JSON or a bare access token |
| `-yandex.client_id`, `-yandex.client_secret` | OAuth app credentials, needed to refresh the token and for `-yandex.code` |
| `-yandex.root` | folder that holds the buckets, default `/` |
| `-yandex.app_folder` | the token only reaches the app folder: paths are addressed under `app:` |
| `-yandex.trash` | move deleted files to the trash instead of deleting them permanently (the trash keeps occupying quota) |
| `-yandex.endpoint` | override the API endpoint, e.g. for a proxy (default `https://cloud-api.yandex.net/v1/disk`); it must be `https`, plain `http` is accepted on a loopback host only, since every request carries the OAuth token |
A dedicated root (`-yandex.root=/seaweedfs`) is recommended: with the default
`/`, `remote.mount.buckets` treats every top-level folder of the disk,
personal folders included, as a bucket.
## 4. Mount or mirror
```bash
# mount one folder as a local directory
remote.mount -dir=/buckets/photos -remote=disk/photos
# mount every folder under the root as a bucket and pull its metadata
remote.mount.buckets -remote=disk -apply
# pull remote changes into the local metadata later
remote.meta.sync -dir=/buckets/photos
# mirror local buckets to the disk
weed filer.remote.gateway -filer=<filer host>:<filer port> -createBucketAt=disk
```
`weed filer.remote.sync -filer=... -dir=/buckets` uploads changes made under
the mounted directories.
Deleting a local bucket deletes its remote folder only when that folder is
empty, the same rule S3 and GCS apply to a bucket: a Disk API delete is
recursive, and the folder may hold files SeaweedFS never saw.
## Token lifetime and refresh
An access token and its refresh token both live about a year. The client
refreshes the access token when it expires or when the API answers 401, and
uses the new refresh token Yandex returns. The refreshed token is kept in
memory only: a client cannot write the configuration back to the filer, so
every restart, and every other process using the same configuration, starts
again from the stored refresh token. Yandex does not document whether that
token stays valid once a newer one has been issued, so after a refresh a
restart can fail with `invalid_grant`. Then, or when the stored token nears
the end of its year, issue a new one with `-yandex.oauth_url` and
`-yandex.code` above. Yandex recommends refreshing a long-lived token every
three months.
## Not covered
- `weed filer.backup` and the legacy `weed/replication/sink` sinks have no
Yandex backend; use `filer.remote.sync` / `filer.remote.gateway`.
- The Rust volume server (`seaweed-volume`) supports only S3-compatible remote
storage; a Yandex remote cannot back a tiered volume there.
## Troubleshooting
- `403 DiskUnsupportedUserAccountTypeError` — the account has no Yandex Mail /
Disk subscription.
- `401` on every request — the token is wrong or revoked; reissue it.
- `invalid_grant` while refreshing — the refresh token expired or was rotated
elsewhere; reissue it.
- `500` right after an upload — Yandex finalizes an upload asynchronously; the
client retries the stat, and a retry of the whole upload succeeds.
+258 -254
View File
@@ -1,120 +1,93 @@
module github.com/seaweedfs/seaweedfs
go 1.27.4
go 1.26.6
require (
cloud.google.com/go/kms v1.36.1
cloud.google.com/go v0.123.0 // indirect
cloud.google.com/go/pubsub v1.51.1
cloud.google.com/go/storage v1.69.0
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.24.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.14.1
github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.8.3
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/Jille/raft-grpc-transport v1.6.1
github.com/KimMachineGun/automemlimit v1.0.2
github.com/Shopify/sarama v1.38.1
github.com/ThreeDotsLabs/watermill v1.5.3
github.com/a-h/templ v0.3.1100
github.com/apache/arrow-go/v18 v18.9.0
github.com/apache/cassandra-gocql-driver/v2 v2.1.2
github.com/apache/iceberg-go v0.7.0
github.com/apple/foundationdb/bindings/go v0.0.0-20250911184653-27f7192f47c3
github.com/arangodb/go-driver v1.6.9
github.com/aws/aws-sdk-go v1.55.8
github.com/aws/aws-sdk-go-v2 v1.49.0
github.com/aws/aws-sdk-go-v2/config v1.33.9
github.com/aws/aws-sdk-go-v2/credentials v1.20.9
github.com/aws/aws-sdk-go-v2/service/s3 v1.117.1
github.com/aws/aws-sdk-go-v2/service/sts v1.51.6
github.com/aws/smithy-go v1.28.11
github.com/beorn7/perks v1.0.1 // indirect
github.com/bwmarrin/snowflake v0.3.0
github.com/cenkalti/backoff/v4 v4.3.0
github.com/cespare/xxhash/v2 v2.3.0
github.com/cognusion/imaging v1.0.4
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.7.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dustin/go-humanize v1.1.0
github.com/eapache/go-resiliency v1.6.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c // indirect
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4
github.com/fluent/fluent-logger-golang v1.10.1
github.com/getsentry/sentry-go v0.50.0
github.com/go-ldap/ldap/v3 v3.4.14
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect
github.com/fsnotify/fsnotify v1.10.1 // indirect
github.com/go-redsync/redsync/v4 v4.18.0
github.com/go-sql-driver/mysql v1.10.1
github.com/golang-jwt/jwt/v5 v5.3.1
github.com/go-zookeeper/zk v1.0.4 // indirect
github.com/golang/protobuf v1.5.4
github.com/golang/snappy v1.0.0
github.com/google/btree v1.1.3
github.com/google/flatbuffers/go v0.0.0-20230108230133-3b8644d32c50
github.com/google/uuid v1.6.0
github.com/google/wire v0.7.0 // indirect
github.com/googleapis/gax-go/v2 v2.27.0 // indirect
github.com/gorilla/mux v1.8.1
github.com/gorilla/sessions v1.4.0
github.com/hashicorp/go-metrics v0.7.0
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/hashicorp/raft v1.8.0
github.com/hashicorp/raft-boltdb/v2 v2.4.2
github.com/hashicorp/vault/api v1.23.0
github.com/jackc/pgx/v5 v5.13.0
github.com/jhump/protoreflect v1.19.0
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/jackc/pgx/v5 v5.10.0
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
github.com/jinzhu/copier v0.4.0
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12
github.com/k0kubun/pp v3.0.1+incompatible
github.com/karlseguin/ccache/v2 v2.0.8
github.com/klauspost/compress v1.20.5
github.com/klauspost/compress v1.20.3
github.com/klauspost/reedsolomon v1.14.2
github.com/kurin/blazer v0.5.3
github.com/linkedin/goavro/v2 v2.15.0
github.com/linxGnu/grocksdb v1.11.1
github.com/minio/crc64nvme v1.1.1
github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4
github.com/mailru/easyjson v0.9.2 // indirect
github.com/mattn/go-isatty v0.0.24 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/olivere/elastic/v7 v7.0.32
github.com/orcaman/concurrent-map/v2 v2.0.1
github.com/parquet-go/parquet-go v0.33.0
github.com/peterh/liner v1.2.3
github.com/pierrec/lz4/v4 v4.1.33
github.com/pkg/sftp v1.13.12
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/posener/complete v1.2.3
github.com/pquerna/cachecontrol v0.2.0
github.com/prometheus/client_golang v1.24.1
github.com/prometheus/client_model v0.6.3
github.com/prometheus/common v0.71.0 // indirect
github.com/prometheus/procfs v0.23.0
github.com/rabbitmq/amqp091-go v1.17.0
github.com/rclone/rclone v1.75.1
github.com/rdleal/intervalst v1.5.0
github.com/redis/go-redis/v9 v9.23.0
github.com/schollz/progressbar/v3 v3.19.1
github.com/seaweedfs/cockroachdb-parser v0.0.0-20260225204133-2f342c5ea564
github.com/seaweedfs/go-fuse/v2 v2.9.5
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/seaweedfs/goexif v1.0.3
github.com/seaweedfs/raft v1.2.4
github.com/shirou/gopsutil/v4 v4.26.10
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/viper v1.21.0
github.com/stretchr/testify v1.12.1
github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965
github.com/tarantool/go-option v1.1.0
github.com/tarantool/go-tarantool/v3 v3.0.2
github.com/testcontainers/testcontainers-go v0.45.0
github.com/tidwall/gjson v1.20.0
github.com/tidwall/match v1.2.0
github.com/tikv/client-go/v2 v2.0.7
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tsuna/gohbase v0.0.0-20201125011725-348991136365
github.com/twmb/avro v1.9.0
github.com/twpayne/go-geom v1.6.1
github.com/tylertreat/BoomFilters v0.0.0-20210315201527-1a82519a3e43
github.com/valyala/bytebufferpool v1.0.0
github.com/viant/ptrie v1.0.1
github.com/winfsp/cgofuse v1.6.1-0.20260126094232-f2c4fccdb286
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.2.0
github.com/xeipuuv/gojsonschema v1.2.0
github.com/ydb-platform/ydb-go-sdk-auth-environ v0.5.3
github.com/ydb-platform/ydb-go-sdk/v3 v3.157.1
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
go.etcd.io/etcd/api/v3 v3.7.3
go.etcd.io/etcd/client/pkg/v3 v3.7.4
go.etcd.io/etcd/client/v3 v3.7.3
go.mongodb.org/mongo-driver v1.17.10
go.uber.org/atomic v1.12.0
go.yaml.in/yaml/v3 v3.0.6
go.mongodb.org/mongo-driver v1.17.9
go.opencensus.io v0.24.0 // indirect
gocloud.dev v0.49.0
gocloud.dev/pubsub/natspubsub v0.49.0
gocloud.dev/pubsub/rabbitpubsub v0.47.0
@@ -122,40 +95,214 @@ require (
golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e
golang.org/x/image v0.46.0
golang.org/x/net v0.62.0
golang.org/x/oauth2 v0.38.0
golang.org/x/sync v0.25.0
golang.org/x/sys v0.50.0
golang.org/x/term v0.48.0
golang.org/x/time v0.16.0
golang.org/x/tools/godoc v0.1.0-deprecated
golang.org/x/oauth2 v0.37.0
golang.org/x/sys v0.49.0
golang.org/x/text v0.43.0 // indirect
golang.org/x/tools v0.52.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
google.golang.org/api v0.310.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b
google.golang.org/genproto v0.0.0-20261019180522-ce908d29299b // indirect
google.golang.org/grpc v1.86.0-dev.0.20261027044109-d619b5d02089
google.golang.org/grpc/security/advancedtls v1.0.0
google.golang.org/protobuf v1.36.12
modernc.org/sqlite v1.61.1
gopkg.in/inf.v0 v0.9.1 // indirect
modernc.org/b v1.0.0 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.12.1 // indirect
modernc.org/sqlite v1.60.1
)
require (
cloud.google.com/go/kms v1.36.1
github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/Jille/raft-grpc-transport v1.6.1
github.com/ThreeDotsLabs/watermill v1.5.3
github.com/a-h/templ v0.3.1100
github.com/apache/arrow-go/v18 v18.8.0
github.com/apache/cassandra-gocql-driver/v2 v2.1.2
github.com/apache/iceberg-go v0.7.0
github.com/apple/foundationdb/bindings/go v0.0.0-20250911184653-27f7192f47c3
github.com/arangodb/go-driver v1.6.9
github.com/aws/aws-sdk-go-v2 v1.48.0
github.com/aws/aws-sdk-go-v2/config v1.33.9
github.com/aws/aws-sdk-go-v2/credentials v1.20.9
github.com/aws/aws-sdk-go-v2/service/s3 v1.114.10
github.com/cespare/xxhash/v2 v2.3.0
github.com/cognusion/imaging v1.0.4
github.com/fluent/fluent-logger-golang v1.10.1
github.com/getsentry/sentry-go v0.50.0
github.com/go-ldap/ldap/v3 v3.4.14
github.com/golang-jwt/jwt/v5 v5.3.1
github.com/google/flatbuffers/go v0.0.0-20230108230133-3b8644d32c50
github.com/hashicorp/go-metrics v0.7.0
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/hashicorp/raft v1.8.0
github.com/hashicorp/raft-boltdb/v2 v2.4.2
github.com/hashicorp/vault/api v1.23.0
github.com/jhump/protoreflect v1.18.1
github.com/linkedin/goavro/v2 v2.15.0
github.com/minio/crc64nvme v1.1.1
github.com/orcaman/concurrent-map/v2 v2.0.1
github.com/parquet-go/parquet-go v0.32.0
github.com/pkg/sftp v1.13.12
github.com/rabbitmq/amqp091-go v1.16.0
github.com/rclone/rclone v1.75.1
github.com/rdleal/intervalst v1.5.0
github.com/redis/go-redis/v9 v9.23.0
github.com/schollz/progressbar/v3 v3.19.1
github.com/seaweedfs/go-fuse/v2 v2.9.4
github.com/shirou/gopsutil/v4 v4.26.10
github.com/tarantool/go-option v1.1.0
github.com/tarantool/go-tarantool/v3 v3.0.2
github.com/testcontainers/testcontainers-go v0.45.0
github.com/tikv/client-go/v2 v2.0.7
github.com/twmb/avro v1.9.0
github.com/xeipuuv/gojsonschema v1.2.0
github.com/ydb-platform/ydb-go-sdk-auth-environ v0.5.3
github.com/ydb-platform/ydb-go-sdk/v3 v3.155.1
go.etcd.io/etcd/client/pkg/v3 v3.7.3
go.uber.org/atomic v1.12.0
go.yaml.in/yaml/v3 v3.0.6
golang.org/x/sync v0.24.0
golang.org/x/tools/godoc v0.1.0-deprecated
google.golang.org/grpc/security/advancedtls v1.0.0
)
require github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
require (
cloud.google.com/go/longrunning v1.3.0 // indirect
cloud.google.com/go/pubsub/v2 v2.7.0 // indirect
dario.cat/mergo v1.0.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/internal v0.1.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20261006220739-8c912ac31dd4 // indirect
github.com/FilenCloudDienste/filen-sdk-go v0.0.39 // indirect
github.com/ProtonMail/gopenpgp/v3 v3.4.1 // indirect
github.com/RoaringBitmap/roaring/v2 v2.26.0 // indirect
github.com/a1ex3/zstd-seekable-format-go/pkg v0.10.0 // indirect
github.com/adrg/xdg v0.5.3 // indirect
github.com/anchore/go-lzo v0.1.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/apache/thrift v0.24.0 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.10.4 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/bazelbuild/rules_go v0.46.0 // indirect
github.com/biogo/store v0.0.0-20201120204734-aad293a2328f // indirect
github.com/bits-and-blooms/bitset v1.24.4 // indirect
github.com/blevesearch/snowballstem v0.9.0 // indirect
github.com/boombuler/barcode v1.1.0 // indirect
github.com/buger/jsonparser v1.2.0 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
github.com/cockroachdb/errors v1.14.0 // indirect
github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/version v0.0.0-20250314144055-3860cd14adf2 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v1.0.0-rc.4 // indirect
github.com/cpuguy83/dockercfg v0.3.2 // indirect
github.com/dave/dst v0.27.2 // indirect
github.com/diskfs/go-diskfs v1.9.4 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-connections v0.8.2 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dromara/dongle v1.0.1 // indirect
github.com/geoarrow/geoarrow-go v0.0.0-20260403143023-f54751c3e3a1 // indirect
github.com/gin-gonic/gin v1.11.0 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.8 // indirect
github.com/go-git/go-billy/v5 v5.9.0 // indirect
github.com/goccy/go-yaml v1.18.0 // indirect
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.7 // indirect
github.com/hashicorp/hcl v1.0.1-vault-7 // indirect
github.com/internxt/rclone-adapter v0.0.0-20260708165336-dd6561bacfa2 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/jaegertracing/jaeger v1.47.0 // indirect
github.com/jhump/protoreflect/v2 v2.0.0-beta.1 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.12.3 // indirect
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
github.com/lpar/calendar v0.2.0 // indirect
github.com/magiconair/properties v1.18.12 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/go-archive v0.3.3 // indirect
github.com/moby/moby/api v1.56.1 // indirect
github.com/moby/moby/client v0.6.2 // indirect
github.com/moby/patternmatcher v0.6.1 // indirect
github.com/moby/sys/sequential v0.7.0 // indirect
github.com/moby/sys/user v0.4.1 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/moby/term v0.5.2 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/oklog/ulid/v2 v2.1.2 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/openzipkin/zipkin-go v0.4.3 // indirect
github.com/parquet-go/bitpack v1.0.0 // indirect
github.com/parquet-go/jsonlite v1.0.0 // indirect
github.com/petermattis/goid v0.0.0-20260113132338-7c7de50cc741 // indirect
github.com/pierrre/geohash v1.0.0 // indirect
github.com/pquerna/otp v1.5.0 // indirect
github.com/quic-go/qpack v0.6.0 // indirect
github.com/rclone/Proton-API-Bridge v1.0.5 // indirect
github.com/rclone/go-proton-api v1.0.4 // indirect
github.com/rogpeppe/go-internal v1.15.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/smarty/assertions v1.15.0 // indirect
github.com/sony/gobreaker/v2 v2.4.0 // indirect
github.com/stretchr/objx v0.5.3 // indirect
github.com/substrait-io/substrait v0.87.0 // indirect
github.com/substrait-io/substrait-go/v8 v8.1.1 // indirect
github.com/substrait-io/substrait-protobuf/go v0.85.0 // indirect
github.com/twpayne/go-geom v1.6.1 // indirect
github.com/twpayne/go-kml/v3 v3.2.1 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/ulikunitz/xz v0.5.15 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/zeebo/xxh3 v1.1.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/zipkin v1.45.0 // indirect
go.opentelemetry.io/otel/log v1.47.0 // indirect
go.opentelemetry.io/proto/otlp v1.11.1 // indirect
go.uber.org/mock v0.5.2 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
golang.org/x/mod v0.42.0 // indirect
gonum.org/v1/gonum v0.17.0 // indirect
)
require (
cel.dev/expr v0.25.3 // indirect
cloud.google.com/go v0.123.0 // indirect
cloud.google.com/go/auth v0.24.1 // indirect
cloud.google.com/go/auth/oauth2adapt v0.3.0 // indirect
cloud.google.com/go/compute/metadata v0.10.0 // indirect
cloud.google.com/go/iam v1.14.0 // indirect
cloud.google.com/go/longrunning v1.3.0 // indirect
cloud.google.com/go/monitoring v1.31.0 // indirect
cloud.google.com/go/pubsub/v2 v2.7.0 // indirect
dario.cat/mergo v1.0.2 // indirect
filippo.io/edwards25519 v1.2.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.24.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.14.1
github.com/Azure/azure-sdk-for-go/sdk/internal v1.13.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.8.3
github.com/Azure/azure-sdk-for-go/sdk/storage/azfile v1.7.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/internal v0.1.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20261006220739-8c912ac31dd4 // indirect
github.com/Azure/go-ntlmssp v0.1.1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.10.1 // indirect
github.com/FilenCloudDienste/filen-sdk-go v0.0.39 // indirect
github.com/Files-com/files-sdk-go/v3 v3.3.194 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.62.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.62.0 // indirect
@@ -166,104 +313,58 @@ require (
github.com/ProtonMail/gluon v0.17.1-0.20230724134000-308be39be96e // indirect
github.com/ProtonMail/go-crypto v1.4.1 // indirect
github.com/ProtonMail/go-srp v0.0.7 // indirect
github.com/ProtonMail/gopenpgp/v3 v3.4.1 // indirect
github.com/PuerkitoBio/goquery v1.12.0 // indirect
github.com/RoaringBitmap/roaring/v2 v2.26.0 // indirect
github.com/a1ex3/zstd-seekable-format-go/pkg v0.10.0 // indirect
github.com/abbot/go-http-auth v0.4.0 // indirect
github.com/adrg/xdg v0.5.3 // indirect
github.com/anchore/go-lzo v0.1.1 // indirect
github.com/andybalholm/brotli v1.3.0 // indirect
github.com/andybalholm/brotli v1.2.7 // indirect
github.com/andybalholm/cascadia v1.3.4 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/apache/thrift v0.25.0 // indirect
github.com/appscode/go-querystring v0.0.0-20170504095604-0126cfb3f1dc // indirect
github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.29 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.27 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.20.3 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.22.34 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.15 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.15 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.15 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.27 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.11.16 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.15 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.20.15 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.10.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.12 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.25 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.11.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.12 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.20.12 // indirect
github.com/aws/aws-sdk-go-v2/service/sns v1.47.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sqs v1.52.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.38.4 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.43.4 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/bazelbuild/rules_go v0.46.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/biogo/store v0.0.0-20201120204734-aad293a2328f // indirect
github.com/bits-and-blooms/bitset v1.24.4 // indirect
github.com/blevesearch/snowballstem v0.9.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.51.6
github.com/aws/smithy-go v1.28.9
github.com/boltdb/bolt v1.3.1 // indirect
github.com/boombuler/barcode v1.1.0 // indirect
github.com/bradenaw/juniper v0.15.3 // indirect
github.com/buengese/sgzip v0.1.1 // indirect
github.com/buger/jsonparser v1.2.0 // indirect
github.com/calebcase/tmpfile v1.0.3 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/chilts/sid v0.0.0-20190607042430-660e94789ec9 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/cloudflare/circl v1.6.4 // indirect
github.com/cloudinary/cloudinary-go/v2 v2.16.0 // indirect
github.com/cloudsoda/go-smb2 v0.0.0-20260701064823-d8c5600d73b8 // indirect
github.com/cloudsoda/sddl v0.0.0-20250224235906-926454e91efc // indirect
github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 // indirect
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
github.com/cockroachdb/errors v1.14.0 // indirect
github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/version v0.0.0-20250314144055-3860cd14adf2 // indirect
github.com/colinmarc/hdfs/v2 v2.4.0 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v1.0.0-rc.4 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.7.0 // indirect
github.com/cpuguy83/dockercfg v0.3.2 // indirect
github.com/creasty/defaults v1.8.0 // indirect
github.com/cronokirby/saferith v0.33.1-0.20250226174546-1f11f94ce488 // indirect
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
github.com/d4l3k/messagediff v1.2.1 // indirect
github.com/dave/dst v0.27.2 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/diskfs/go-diskfs v1.9.4 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-connections v0.8.2 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dromara/dongle v1.0.1 // indirect
github.com/dropbox/dropbox-sdk-go-unofficial/v6 v6.4.0 // indirect
github.com/eapache/go-resiliency v1.6.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/ebitengine/purego v0.11.2 // indirect
github.com/elastic/gosigar v0.14.3 // indirect
github.com/emersion/go-message v0.18.2 // indirect
github.com/emersion/go-vcard v0.0.0-20260618161152-d854b7e0e2d3 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.40.1-0.20261014170222-9c4befd3c419 // indirect
github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c // indirect
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect
github.com/fatih/color v1.19.0 // indirect
github.com/felixge/httpsnoop v1.1.0 // indirect
github.com/flynn/noise v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.10.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.13 // indirect
github.com/geoarrow/geoarrow-go v0.0.0-20260403143023-f54751c3e3a1 // indirect
github.com/geoffgarside/ber v1.2.0 // indirect
github.com/gin-gonic/gin v1.11.0 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.8 // indirect
github.com/go-chi/chi/v5 v5.4.0 // indirect
github.com/go-darwin/apfs v0.0.0-20211011131704-f84b94dbf348 // indirect
github.com/go-git/go-billy/v5 v5.9.0 // indirect
github.com/go-jose/go-jose/v4 v4.1.6 // indirect
github.com/go-logr/logr v1.4.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
@@ -275,226 +376,129 @@ require (
github.com/go-playground/validator/v10 v10.30.3 // indirect
github.com/go-resty/resty/v2 v2.17.2 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/go-zookeeper/zk v1.0.4 // indirect
github.com/goccy/go-json v0.12.0 // indirect
github.com/goccy/go-yaml v1.18.0 // indirect
github.com/goccy/go-json v0.11.2 // indirect
github.com/gofrs/flock v0.13.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/s2a-go v0.1.11 // indirect
github.com/google/wire v0.7.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.24 // indirect
github.com/googleapis/gax-go/v2 v2.27.0 // indirect
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/gorilla/schema v1.4.1 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/gorilla/sessions v1.4.0
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.31.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-msgpack/v2 v2.1.5 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.7 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.1-vault-7 // indirect
github.com/internxt/rclone-adapter v0.0.0-20260708165336-dd6561bacfa2 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/puddle/v2 v2.2.3 // indirect
github.com/jaegertracing/jaeger v1.47.0 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/goidentity/v6 v6.0.1 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/jhump/protoreflect/v2 v2.0.0-beta.1 // indirect
github.com/jlaffaye/ftp v0.2.1-0.20251026020404-6602e981a1bb // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jonboulle/clockwork v0.5.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/jtolio/noiseconn v0.0.0-20231127013910-f6d9ecbf1de7 // indirect
github.com/jzelinskie/whirlpool v0.0.0-20201016144138-0675e54bb004 // indirect
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
github.com/klauspost/cpuid/v2 v2.4.2 // indirect
github.com/k0kubun/pp v3.0.1+incompatible
github.com/klauspost/cpuid/v2 v2.4.0 // indirect
github.com/koofr/go-httpclient v0.0.0-20240520111329-e20f8f203988 // indirect
github.com/koofr/go-koofrclient v0.0.0-20221207135200-cbd7fc9ad6a6 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lanrat/extsort v1.4.2 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/lib/pq v1.12.3 // indirect
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
github.com/lpar/calendar v0.2.0 // indirect
github.com/lufia/plan9stats v0.0.0-20260627054121-477a66015f15 // indirect
github.com/magiconair/properties v1.18.12 // indirect
github.com/mailru/easyjson v0.9.2 // indirect
github.com/mattn/go-colorable v0.1.15 // indirect
github.com/mattn/go-isatty v0.0.24 // indirect
github.com/mattn/go-runewidth v0.0.31 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/go-archive v0.3.3 // indirect
github.com/moby/moby/api v1.56.1 // indirect
github.com/moby/moby/client v0.6.2 // indirect
github.com/moby/patternmatcher v0.6.1 // indirect
github.com/moby/sys/sequential v0.7.0 // indirect
github.com/moby/sys/user v0.4.1 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/moby/term v0.5.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4
github.com/montanaflynn/stats v0.7.1 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nats-io/nats.go v1.54.0 // indirect
github.com/nats-io/nkeys v0.4.16 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/ncruces/go-strftime v1.1.0 // indirect
github.com/ncruces/go-strftime v1.0.0 // indirect
github.com/ncw/swift/v2 v2.0.5 // indirect
github.com/nxadm/tail v1.4.11 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/oklog/ulid/v2 v2.1.2 // indirect
github.com/onsi/ginkgo/v2 v2.23.3 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/openzipkin/zipkin-go v0.4.3 // indirect
github.com/oracle/oci-go-sdk/v65 v65.121.0 // indirect
github.com/panjf2000/ants/v2 v2.12.1 // indirect
github.com/parquet-go/bitpack v1.1.1 // indirect
github.com/parquet-go/jsonlite v1.5.7 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pelletier/go-toml/v2 v2.4.3 // indirect
github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14 // indirect
github.com/petermattis/goid v0.0.0-20260113132338-7c7de50cc741 // indirect
github.com/philhofer/fwd v1.2.0 // indirect
github.com/pierrre/geohash v1.0.0 // indirect
github.com/pierrec/lz4/v4 v4.1.33
github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c // indirect
github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c // indirect
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 // indirect
github.com/pingcap/kvproto v0.0.0-20230403051650-e166ae588106 // indirect
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/xattr v0.4.12 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10
github.com/power-devops/perfstat v0.0.0-20260805114148-88456608a4f6 // indirect
github.com/pquerna/otp v1.5.0 // indirect
github.com/prometheus/common v0.71.0 // indirect
github.com/putdotio/go-putio/putio v0.0.0-20200123120452-16d982cac2b8 // indirect
github.com/quic-go/qpack v0.6.0 // indirect
github.com/rclone/Proton-API-Bridge v1.0.5 // indirect
github.com/rclone/go-proton-api v1.0.4 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/relvacode/iso8601 v1.7.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rfjakob/eme v1.2.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.15.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
github.com/sagikazarmark/locafero v0.11.0 // indirect
github.com/samber/lo v1.53.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/seaweedfs/cockroachdb-parser v0.0.0-20260225204133-2f342c5ea564
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
github.com/smarty/assertions v1.15.0 // indirect
github.com/sony/gobreaker v1.0.0 // indirect
github.com/sony/gobreaker/v2 v2.4.0 // indirect
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
github.com/spacemonkeygo/monkit/v3 v3.0.25-0.20251022131615-eb24eb109368 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/spiffe/go-spiffe/v2 v2.9.0 // indirect
github.com/stretchr/objx v0.5.3 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/substrait-io/substrait v0.87.0 // indirect
github.com/substrait-io/substrait-go/v8 v8.1.1 // indirect
github.com/substrait-io/substrait-protobuf/go v0.85.0 // indirect
github.com/t3rm1n4l/go-mega v0.0.0-20260717075258-c6acd6a5bd04 // indirect
github.com/tarantool/go-iproto v1.1.0 // indirect
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tikv/pd/client v0.0.0-20230329114254-1948c247c2b1 // indirect
github.com/tinylib/msgp v1.6.4 // indirect
github.com/tklauser/go-sysconf v0.4.0 // indirect
github.com/tklauser/numcpus v0.12.0 // indirect
github.com/twmb/murmur3 v1.1.8 // indirect
github.com/twpayne/go-kml/v3 v3.2.1 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/ulikunitz/xz v0.5.15 // indirect
github.com/unknwon/goconfig v1.0.0 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/winfsp/cgofuse v1.6.1-0.20260126094232-f2c4fccdb286
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/yandex-cloud/go-genproto v0.0.0-20240819112322-98a264d392f6 // indirect
github.com/ydb-platform/ydb-go-genproto v0.0.0-20260810122915-65bfd5c4b705 // indirect
github.com/ydb-platform/ydb-go-yc v0.12.5 // indirect
github.com/ydb-platform/ydb-go-yc-metadata v0.6.2 // indirect
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
github.com/yunify/qingstor-sdk-go/v3 v3.2.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
github.com/zeebo/blake3 v0.2.4 // indirect
github.com/zeebo/errs v1.4.0 // indirect
github.com/zeebo/xxh3 v1.1.0 // indirect
go.etcd.io/bbolt v1.5.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.47.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.72.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.72.0 // indirect
go.opentelemetry.io/otel v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/zipkin v1.45.0 // indirect
go.opentelemetry.io/otel/log v1.47.0 // indirect
go.opentelemetry.io/otel/metric v1.47.0 // indirect
go.opentelemetry.io/otel/sdk v1.47.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.47.0 // indirect
go.opentelemetry.io/otel/trace v1.47.0 // indirect
go.opentelemetry.io/proto/otlp v1.11.1 // indirect
go.uber.org/mock v0.5.2 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.28.0 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
golang.org/x/mod v0.42.0 // indirect
golang.org/x/text v0.43.0 // indirect
golang.org/x/tools v0.52.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
gonum.org/v1/gonum v0.17.0 // indirect
google.golang.org/genproto v0.0.0-20261019180522-ce908d29299b // indirect
golang.org/x/term v0.47.0
golang.org/x/time v0.16.0
google.golang.org/genproto/googleapis/api v0.0.0-20261019180522-ce908d29299b // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/validator.v2 v2.0.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/b v1.0.0 // indirect
modernc.org/libc v1.79.0 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.12.1 // indirect
modernc.org/libc v1.77.1 // indirect
moul.io/http2curl/v2 v2.3.0 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
storj.io/common v0.0.0-20260629224719-ba1bff0a7846 // indirect
+78 -82
View File
@@ -85,8 +85,6 @@ github.com/IBM/go-sdk-core/v5 v5.23.1 h1:fxLusCG+GlGY1SM7BYAAiiSFhzKUs5zqs0P8knD
github.com/IBM/go-sdk-core/v5 v5.23.1/go.mod h1:yO+OQpByKDLTvpEcsFFexgzpeR8eRfCFWAYzxkAu4bk=
github.com/Jille/raft-grpc-transport v1.6.1 h1:gN3sjapb+fVbiebS7AfQQgbV2ecTOI7ur7NPPC7Mhoc=
github.com/Jille/raft-grpc-transport v1.6.1/go.mod h1:HbOjEdu/yzCJ/mjTF6wEOJNbAUpHfU2UOA2hVD4CNFg=
github.com/KimMachineGun/automemlimit v1.0.2 h1:DkORkhuzrwT2/b35xz8zLd7cJ6Hu2ESRGBY8HKUFIYk=
github.com/KimMachineGun/automemlimit v1.0.2/go.mod h1:n+BSXxQWDFS1DKh67Rqo0lgTsowsg6x65ak5uyngML0=
github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g=
github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
github.com/Max-Sum/base32768 v0.0.0-20230304063302-18e6ce5945fd h1:nzE1YQBdx1bq9IlZinHa+HVffy+NmVRoKr+wHN8fpLE=
@@ -144,8 +142,8 @@ github.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e h1:4dAU9FXIyQktp
github.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4=
github.com/anchore/go-lzo v0.1.1 h1:IwL/fvkdtlIrYIXck6WxZ3nb8WjjHziYYmGxlooyOnM=
github.com/anchore/go-lzo v0.1.1/go.mod h1:3kLx0bve2oN1iDwgM1U5zGku1Tfbdb0No5qp1eL1fIk=
github.com/andybalholm/brotli v1.3.0 h1:IdkhjSe/+34U+fP7FSR2Q6Poj1hnHUa2GoWmzXJd6qY=
github.com/andybalholm/brotli v1.3.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
github.com/andybalholm/brotli v1.2.7 h1:UgafRPGMam5ySHfRkhthMqOFA6IFoeF3D7mWIDLjG5A=
github.com/andybalholm/brotli v1.2.7/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
github.com/andybalholm/cascadia v1.3.4 h1:vM2lgh0Vru9Vwyfm4cQqWP2HHMW0u0+2PAW7Q38Qufg=
github.com/andybalholm/cascadia v1.3.4/go.mod h1:BLRmbRjpEtNKieZOCCvYj4RqN+KRA41GBe/5O+G93kM=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
@@ -153,14 +151,14 @@ github.com/antithesishq/antithesis-sdk-go v0.6.0-default-no-op h1:kpBdlEPbRvff0m
github.com/antithesishq/antithesis-sdk-go v0.6.0-default-no-op/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E=
github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ=
github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw=
github.com/apache/arrow-go/v18 v18.9.0 h1:o+CdPvv7G7tXRc3UCq7sAkMOEEzvPFhunnWPMtIDZeQ=
github.com/apache/arrow-go/v18 v18.9.0/go.mod h1:QbEIuSG88lfEwkBfq1OKoZ5/aFXLObsS2awz9F5OKak=
github.com/apache/arrow-go/v18 v18.8.0 h1:BLOzbPv7bxMPgXPacAg6HQjnxupYsZzC4tf+FkqPU/M=
github.com/apache/arrow-go/v18 v18.8.0/go.mod h1:uJCFfCwq0KsxCmsCfQg4ft+LsW+iHYzAXiSDh5ug/8U=
github.com/apache/cassandra-gocql-driver/v2 v2.1.2 h1:lu/p0Db2av18enHJvWJQoChLssI0P+AR06STq4VdvCc=
github.com/apache/cassandra-gocql-driver/v2 v2.1.2/go.mod h1:QH/asJjB3mHvY6Dot6ZKMMpTcOrWJ8i9GhsvG1g0PK4=
github.com/apache/iceberg-go v0.7.0 h1:bTD6Pb4uM4sWcMfIx0/cV1haHMc84r+CvPieUqYzD4I=
github.com/apache/iceberg-go v0.7.0/go.mod h1:oGz5MX3/m3GDc6acsrwbdHChj28jZH8MVDWqUrW6WQQ=
github.com/apache/thrift v0.25.0 h1:6LLlvoPjy8Cc/0b5TYRcTR3RZa2W0at3WQRcOkDwVGs=
github.com/apache/thrift v0.25.0/go.mod h1:4lwyToijD9T70w7GlevFk7FnpY60Wv8I8krMkF6FkAo=
github.com/apache/thrift v0.24.0 h1:zy31L1a49QTNB2bG1BBfMXol3yJrTH975G3pPubQVLQ=
github.com/apache/thrift v0.24.0/go.mod h1:zPt6WxgvTOM6hF92y8C+MkEM5LMxZuk4JcQOiU4Esvs=
github.com/apple/foundationdb/bindings/go v0.0.0-20250911184653-27f7192f47c3 h1:WZaTKNHCfcw7fWSR6/RKnCldVzvYZC+Y20Su4lffEIg=
github.com/apple/foundationdb/bindings/go v0.0.0-20250911184653-27f7192f47c3/go.mod h1:OMVSB21p9+xQUIqlGizHPZfjK+SHws1ht+ZytVDoz9U=
github.com/appscode/go-querystring v0.0.0-20170504095604-0126cfb3f1dc h1:LoL75er+LKDHDUfU5tRvFwxH0LjPpZN8OoG8Ll+liGU=
@@ -173,10 +171,10 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ
github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4=
github.com/aws/aws-sdk-go v1.55.8 h1:JRmEUbU52aJQZ2AjX4q4Wu7t4uZjOu71uyNmaWlUkJQ=
github.com/aws/aws-sdk-go v1.55.8/go.mod h1:ZkViS9AqA6otK+JBBNH2++sx1sgxrPKcSzPPvQkUtXk=
github.com/aws/aws-sdk-go-v2 v1.49.0 h1:nfIScsXPSCz+vXIKz49IjNPHmC4oT72SLPVc8P0OBbU=
github.com/aws/aws-sdk-go-v2 v1.49.0/go.mod h1:XwfdWCjuiyYPbYF4ObLoa5I25KjV0ry6d105smVjNKY=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.29 h1:LfdRwpJ0Dfh+vpqHevmmnFnMoc3/lfB4pdHOfWpLfH4=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.29/go.mod h1:r6fijnrGRQ4OnSGyHYuFcC7G6wdwB4Ld8WhiIaGZHx0=
github.com/aws/aws-sdk-go-v2 v1.48.0 h1:tFU7EJVm7MfyaXLsXdYTZ0Vd6vwt9OljCyqq0gqk0Mc=
github.com/aws/aws-sdk-go-v2 v1.48.0/go.mod h1:oeKU5p+TQBnpeLmU42WZLWvzv+ORLn+74n4QVLnm/Z0=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.27 h1:3dMP9eEmHVosFN1QiD24IJBKVY8m6iUfVYXqRCT118Q=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.27/go.mod h1:KH4PKcqtjy1m0656eqQV2v53xE04ddJzuNloEKqlHkI=
github.com/aws/aws-sdk-go-v2/config v1.33.9 h1:Hv6bcQUJVnmuWaKjqD6Ot8sE75NrWsWV20oGT5aWle0=
github.com/aws/aws-sdk-go-v2/config v1.33.9/go.mod h1:ivowmrZNfBQLcg4QkaItgi5wae4Bzot9RzIdbY1hfTg=
github.com/aws/aws-sdk-go-v2/credentials v1.20.9 h1:SNO55PnWhaDafsOcv16lCA0kdoFMl/YlegWoVsU02s0=
@@ -187,22 +185,22 @@ github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.22.34 h1:Pn7OsMwBLbkZ6OnCxWHA
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.22.34/go.mod h1:eToXR/Gk1uqpn04eSmdgVXwfS0WvH8aG4eBFr8ygbpU=
github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.4.16 h1:q9YuNkYR/7lxflWCcEv3C0cecUt3Zvrh2hn9ZNxieNA=
github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.4.16/go.mod h1:3BSeJQF55QQI+dDFHx4WTIjTvX/Lvtk8Jaaf/SGAnBM=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.15 h1:Y0fe1Hcly/OSHtSWzuQrXGt3RtRjso063UbwZgyCHyQ=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.15/go.mod h1:52lvlO6umU2TRGxZJfCtjOR6xnbJotZD11mmzhJLQzI=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.15 h1:g2qcH0dUfjjigOI+HQB3DLXDq/8c84uH1ii/SDkwatg=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.15/go.mod h1:yGE7vsxRwTs6YBSYcE1j/KNA7EmAGEgBX+TAH0AAvk0=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.15 h1:XKIkHY7yRHnTJrixMmcA1qIm3qenDe/vmOtf/xiuWYE=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.15/go.mod h1:HqYW3gHCQl0tF6dO7kXgc0wFe1Yng0hgCEI7Xa3rK54=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.27 h1:2jIfOe8ZuoStxOkRtVU45zxgvt/qeIRChhm2USOS6g8=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.27/go.mod h1:LpMjYa8iT3kMkAxsVCGfyXkBDOOKsziY6S2wSpEvY70=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.11.16 h1:D2smhPZgqVLuc8rmuvb6wrG4sgut9iv1BN8W2twFtfo=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.11.16/go.mod h1:HheOgBYcgoZgeKSLVEmk9whxHERlVXAKTVWK3xizKeo=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.15 h1:ds6Pm/S5xYXPmiqyebd0AeK0zHAAO7qHP1+JZauFnpA=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.15/go.mod h1:WqaHpxUhwzsE+NYp2TQitKclpwhi1XYp6wMsdg+yd/k=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.20.15 h1:5w2E7ndu7XOt62yvu2vGm/Rv7WDn1oQjrJ7Dt1NTVTM=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.20.15/go.mod h1:1WgfBCsJYL6E7T2QkkE8kQvo7uG+5+z2LpaQ9L6pjZs=
github.com/aws/aws-sdk-go-v2/service/s3 v1.117.1 h1:fOeEIKMlgwKbMFSNMM+pLo2NPRJ1dSKbaAuZYGXUVR0=
github.com/aws/aws-sdk-go-v2/service/s3 v1.117.1/go.mod h1:xHaAZkbYuIc9UtLZxdoeyhzmx06g1paDjPkHgljJU/I=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.12 h1:W0yUUzKBA8SofGQ0yZafEUuZq9UxfvijRgdc6vcRQPA=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.12/go.mod h1:xwKv6vwBNdpPFOxEm/ld4IODZK2s/1ksHvdBqLfH6Gs=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.12 h1:lqSi8qvAnKC1vfosImdmOsuiJLr/jdybZX5299beB6Q=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.12/go.mod h1:rqPQE2vqkW9YHx5+Gp55sx1wsTM4xtGQLl+TKMjxxrs=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.12 h1:uvX2yaL+aMjkmnrLPPlR/zwjoKFRMoNhhJfeGjfk6qc=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.12/go.mod h1:dicT+2eNhHHqGkxHO7LoXw3QghIUGuzgdmFqaSTopgI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.25 h1:rKwkY3Z+fvt2W0msjdNs6uNewPmXzPayQ961oyuWhes=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.25/go.mod h1:dBuAadQKd1F4Q4ZOg8gnFmuSHMRE40Pe3IfFwbtC4lE=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.11.13 h1:U5HZ8FpTr6tyvulf1nT11Nw4KG1CAsXkuQGdUrIjZ/E=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.11.13/go.mod h1:dUfvCU1NaE+b3vqNENDiJncUQW7Djl5pmgUlcjesVqk=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.12 h1:wzAqMZ2O4+ij9HQqIrk+P9PBGacE0wOTuWB7Mo97//I=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.12/go.mod h1:/0TfyruByHsOlphzP26xDTRe2DKD0J1I1Uyy2TyP8EI=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.20.12 h1:H0IaQayT3TLiGIHiNnleQZTbndDlx7LGZ0NWZ5mDwjA=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.20.12/go.mod h1:YuJJNxaOjnknLIrscBmkLhIpnmg9LzHd25sQRKUboGU=
github.com/aws/aws-sdk-go-v2/service/s3 v1.114.10 h1:WBJb2VxRzzKnuN94YWqZPiu5a5zc3IleFqgZnmVCyvU=
github.com/aws/aws-sdk-go-v2/service/s3 v1.114.10/go.mod h1:8NhAIBVYkVHq0hIbbzujdoou0VkKwMdG+De9e5oX6qI=
github.com/aws/aws-sdk-go-v2/service/signin v1.10.4 h1:tvpDjuUvgKURf3Yk4hOaGbZ4QdY+070OWcA5d6LUv2A=
github.com/aws/aws-sdk-go-v2/service/signin v1.10.4/go.mod h1:3ibVKg5Ng82Zby8++jELTD2nHxiPk2DJRLEeW/LKp8M=
github.com/aws/aws-sdk-go-v2/service/sns v1.47.5 h1:4EezYQsIY0xPbD6u7TbQLfnpicSMQgA8n9paomVV4Zo=
@@ -215,8 +213,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.43.4 h1:j6c+HA4AoS0EBEjArPjavFEB
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.43.4/go.mod h1:RhghaXUk9q66VtOQUX1FdPddQuHnqQZzbB0fEYXmPRA=
github.com/aws/aws-sdk-go-v2/service/sts v1.51.6 h1:BVjKrtRUtSYKztBCCfE1oAB+d3ViKcW2cKZfserOqMQ=
github.com/aws/aws-sdk-go-v2/service/sts v1.51.6/go.mod h1:eSukFLeLkPMm+1OxDR+F0joauZdyBkF47Ow7MqjZiJw=
github.com/aws/smithy-go v1.28.11 h1:2aArhkXe0dFld6IFMlaVy47SbSdU/ZGbDaE7X2DjZkI=
github.com/aws/smithy-go v1.28.11/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
github.com/aws/smithy-go v1.28.9 h1:zkZ058OpNX0iGTK24b+ZUEQSMc11CBA6oO7xtKZfzkY=
github.com/aws/smithy-go v1.28.9/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=
github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=
github.com/bazelbuild/rules_go v0.46.0 h1:CTefzjN/D3Cdn3rkrM6qMWuQj59OBcuOjyIp3m4hZ7s=
@@ -546,8 +544,8 @@ github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlnd
github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw=
github.com/go-zookeeper/zk v1.0.4 h1:DPzxraQx7OrPyXq2phlGlNSIyWEsAox0RJmjTseMV6I=
github.com/go-zookeeper/zk v1.0.4/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw=
github.com/goccy/go-json v0.12.0 h1:pD+oWouAiz4yruwXIt/iT+lOMeyhr1aTtxzaMP/RgVI=
github.com/goccy/go-json v0.12.0/go.mod h1:3NdmfEkZlB7YI5UFw/qdFKq8XN1aiWR0YyRPWZNQltY=
github.com/goccy/go-json v0.11.2 h1:jdZv93Tt4ioR8yW1CoNsvSxrcZlCXAUU1aZXN7gpXUA=
github.com/goccy/go-json v0.11.2/go.mod h1:3NdmfEkZlB7YI5UFw/qdFKq8XN1aiWR0YyRPWZNQltY=
github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw=
@@ -617,8 +615,8 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc=
github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0=
github.com/google/pprof v0.0.0-20261016150608-1facf8f91b50 h1:PlNWJRxu5APSV0pWqfIsZ0qt9OOGHSWfZQ4zvx+WgWs=
github.com/google/pprof v0.0.0-20261016150608-1facf8f91b50/go.mod h1:yUo1AMMpsPIDFGuwDK8nLcf8+vvAd5l2O6JDZ6hpwrM=
github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3 h1:LMLX+LgTNWpfvCBdFebv6EsYotImrt/Ppc5cXIriCSo=
github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3/go.mod h1:jl5iWTm0/hd5PjEYEOuwAJ57L/CibdZfrqZ5XA5GrCk=
github.com/google/s2a-go v0.1.11 h1:7v1V1TraNGP63WptsAkNqr2w8jgm4vM6A6qx6Lsw9iM=
github.com/google/s2a-go v0.1.11/go.mod h1:pz4tyvwXvJLLbyrkh6FW1eS2zPUXMaTmyNhYtyP2tNw=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
@@ -724,10 +722,10 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
github.com/jackc/pgx/v5 v5.13.0 h1:Hl08k64maU0nrRyVUEbwCnK6/gT0EhMrtAqBHz9/gA4=
github.com/jackc/pgx/v5 v5.13.0/go.mod h1:u2Fi6no03HCSBYE+ZVdLxbwdu3xyi2vU+K/YNJioSds=
github.com/jackc/puddle/v2 v2.2.3 h1:f8HoREISb3l5eO9coPgK7U3hKLhWGokOFVcThl5jrao=
github.com/jackc/puddle/v2 v2.2.3/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
github.com/jackc/pgx/v5 v5.10.0 h1:VhSvgU2jSli8o3AqIEOTJr7rZwAEUVo4E4XhR94Zfr0=
github.com/jackc/pgx/v5 v5.10.0/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4=
github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo=
github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
github.com/jaegertracing/jaeger v1.47.0 h1:XXxTMO+GxX930gxKWsg90rFr6RswkCRIW0AgWFnTYsg=
github.com/jaegertracing/jaeger v1.47.0/go.mod h1:mHU/OHFML51CijQql4+rLfgPOcIb9MhxOMn+RKQwrJc=
github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8=
@@ -742,8 +740,8 @@ github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh6
github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs=
github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY=
github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc=
github.com/jhump/protoreflect v1.19.0 h1:YhKbE78JrjfngcCZfZTIV7rQQGndyqll6fXfaqiOEg4=
github.com/jhump/protoreflect v1.19.0/go.mod h1:I2yar2oJEMf0k4EMryPzfV0tvGwN/SejJziYBOpETQo=
github.com/jhump/protoreflect v1.18.1 h1:h4odAaLg9wyn7yHxMF7sSkJ7JfLwK1oy37/1Pi212GE=
github.com/jhump/protoreflect v1.18.1/go.mod h1:I2yar2oJEMf0k4EMryPzfV0tvGwN/SejJziYBOpETQo=
github.com/jhump/protoreflect/v2 v2.0.0-beta.1 h1:Dw1rslK/VotaUGYsv53XVWITr+5RCPXfvvlGrM/+B6w=
github.com/jhump/protoreflect/v2 v2.0.0-beta.1/go.mod h1:D9LBEowZyv8/iSu97FU2zmXG3JxVTmNw21mu63niFzU=
github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8=
@@ -784,10 +782,10 @@ github.com/keybase/go-keychain v0.0.1/go.mod h1:PdEILRW3i9D8JcdM+FmY6RwkHGnhHxXw
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE=
github.com/klauspost/compress v1.20.5 h1:rJj5VjH4xQxbnLphg6eqUcDxRFCw1jpMdDY9qXlrwSs=
github.com/klauspost/compress v1.20.5/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI=
github.com/klauspost/cpuid/v2 v2.4.2 h1:xRw7IZEsAgVCp6trS/DgWbTAqpixhmywgVgBjYGg1bQ=
github.com/klauspost/cpuid/v2 v2.4.2/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU=
github.com/klauspost/compress v1.20.3 h1:zWNoFqq/lSuYQRim3dUXlXeA0IqwuZGicdG5ZTfY5j4=
github.com/klauspost/compress v1.20.3/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI=
github.com/klauspost/cpuid/v2 v2.4.0 h1:S6Hrbc7+ywsr0r+RLapfGBHfyefhCTwEh3A0tV913Dw=
github.com/klauspost/cpuid/v2 v2.4.0/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU=
github.com/klauspost/reedsolomon v1.14.2 h1:SafJYwpBBQBI6amHUygcjxZjXeN2HpiENHQDwuPWCCQ=
github.com/klauspost/reedsolomon v1.14.2/go.mod h1:yjqqjgMTQkBUHSG97/rm4zipffCNbCiZcB3kTqr++sQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@@ -921,8 +919,8 @@ github.com/nats-io/nkeys v0.4.16 h1:rd5oAuLOb8mnAycB0xleuEBNS1pVVnN0fv/FF34Eypg=
github.com/nats-io/nkeys v0.4.16/go.mod h1:llLgWoI0o4z/Q57q2R1kHfmocyhGV6VG/U18Glg1Afs=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/ncruces/go-strftime v1.1.0 h1:vtPmPWMkb539RGV9WpWT9EwJGvrOCKvMNI4obWL47Hk=
github.com/ncruces/go-strftime v1.1.0/go.mod h1:yVaq7iwCN09vHRrKBrrflXT0M9tTMG2KmZ9Fj7xeG/g=
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/ncw/swift/v2 v2.0.5 h1:9o5Gsd7bInAFEqsGPcaUdsboMbqf8lnNtxqWKFT9iz8=
github.com/ncw/swift/v2 v2.0.5/go.mod h1:cbAO76/ZwcFrFlHdXPjaqWZ9R7Hdar7HpjRXBfbjigk=
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
@@ -957,17 +955,15 @@ github.com/orcaman/concurrent-map/v2 v2.0.1 h1:jOJ5Pg2w1oeB6PeDurIYf6k9PQ+aTITr/
github.com/orcaman/concurrent-map/v2 v2.0.1/go.mod h1:9Eq3TG2oBe5FirmYWQfYO5iH1q0Jv47PLaNK++uCdOM=
github.com/panjf2000/ants/v2 v2.12.1 h1:BWvU2wHpyXWxhhNXsGB6JXLCNbshyLd1QxvoAmZnu10=
github.com/panjf2000/ants/v2 v2.12.1/go.mod h1:tSQuaNQ6r6NRhPt+IZVUevvDyFMTs+eS4ztZc52uJTY=
github.com/parquet-go/bitpack v1.1.1 h1:mygqlCBk/rnvtqqP5Oy7IkIPAxZ3bDM7V4yce/ms6pE=
github.com/parquet-go/bitpack v1.1.1/go.mod h1:XnVk9TH+O40eOOmvpAVZ7K2ocQFrQwysLMnc6M/8lgs=
github.com/parquet-go/jsonlite v1.5.7 h1:FxIrc2MBZ9QLpljM1+3F3JuCuug+BWOt8Yx+S4o3bl8=
github.com/parquet-go/jsonlite v1.5.7/go.mod h1:ZIyft0+sSdvgTu2m6RpqxWx/F3UBNtF3ammevxDJcoE=
github.com/parquet-go/parquet-go v0.33.0 h1:iDe13lcW6t0mnZWPqKqWccNa5GdP/L9GNNyzlr8JqNY=
github.com/parquet-go/parquet-go v0.33.0/go.mod h1:zl2XMxzSXZ5UYGfTLK0kvW0ifgVMPJ6I+/zmNnsOSh4=
github.com/parquet-go/bitpack v1.0.0 h1:AUqzlKzPPXf2bCdjfj4sTeacrUwsT7NlcYDMUQxPcQA=
github.com/parquet-go/bitpack v1.0.0/go.mod h1:XnVk9TH+O40eOOmvpAVZ7K2ocQFrQwysLMnc6M/8lgs=
github.com/parquet-go/jsonlite v1.0.0 h1:87QNdi56wOfsE5bdgas0vRzHPxfJgzrXGml1zZdd7VU=
github.com/parquet-go/jsonlite v1.0.0/go.mod h1:nDjpkpL4EOtqs6NQugUsi0Rleq9sW/OtC1NnZEnxzF0=
github.com/parquet-go/parquet-go v0.32.0 h1:NWDqTUHfrCS4cJP/Fj2HlxvqsrVedWG3sayMkf+znzM=
github.com/parquet-go/parquet-go v0.32.0/go.mod h1:navtkAYr2LGoJVp141oXPlO/sxLvaOe3la2JEoD8+rg=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0=
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y=
github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
github.com/pelletier/go-toml/v2 v2.4.3 h1:GTRvJQutkOSftxIFD5xw9aepkYNuPWmVJpffdDPYVpY=
github.com/pelletier/go-toml/v2 v2.4.3/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
@@ -1053,8 +1049,8 @@ github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8=
github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII=
github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw=
github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU=
github.com/rabbitmq/amqp091-go v1.17.0 h1:6KmTqrnJq93cGIE3Q3UnXgsqw6NtLu8MNfFoIbfBAIQ=
github.com/rabbitmq/amqp091-go v1.17.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
github.com/rabbitmq/amqp091-go v1.16.0 h1:1O8oQqnj9hLACoo6CVMgn57z2pLWXvgemhh4GsquV+Y=
github.com/rabbitmq/amqp091-go v1.16.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
github.com/rclone/Proton-API-Bridge v1.0.5 h1:K1++Qtk3PvgkiCCiv6Pahju1TMOzKY6VSwiwT7XLAVc=
github.com/rclone/Proton-API-Bridge v1.0.5/go.mod h1:vCeOPhlXzevN0AFojgh1zsjhetiShy/ArvJ/xkFUDWk=
github.com/rclone/go-proton-api v1.0.4 h1:AJW0e9pB4j0hVK4WqyGErFwaI+5MUQWPCtj5FYYxtPg=
@@ -1104,8 +1100,8 @@ github.com/schollz/progressbar/v3 v3.19.1 h1:iv8BgwOvdML/S3p84uBpy/IMigv4U9594vP
github.com/schollz/progressbar/v3 v3.19.1/go.mod h1:LFL7jqimKxfhero4K1eCkUr/6R39AgQeiPCJtlTWIW8=
github.com/seaweedfs/cockroachdb-parser v0.0.0-20260225204133-2f342c5ea564 h1:TgxPraf1NmF6XTcUG53ULpLQrKvhtUJxQ3hyekxSDNQ=
github.com/seaweedfs/cockroachdb-parser v0.0.0-20260225204133-2f342c5ea564/go.mod h1:JSKCh6uCHBz91lQYFYHCyTrSVIPge4SUFVn28iwMNB0=
github.com/seaweedfs/go-fuse/v2 v2.9.5 h1:qz3tuAGbUJOPJtaxyP35xW3JT23utywXKer0hoTiJPU=
github.com/seaweedfs/go-fuse/v2 v2.9.5/go.mod h1:zABdmWEa6A0bwaBeEOBUeUkGIZlxUhcdv+V1Dcc/U/I=
github.com/seaweedfs/go-fuse/v2 v2.9.4 h1:ACyloiuopdhRSjdLLeSWbsVaemMPskORaRF01TY6GyM=
github.com/seaweedfs/go-fuse/v2 v2.9.4/go.mod h1:zABdmWEa6A0bwaBeEOBUeUkGIZlxUhcdv+V1Dcc/U/I=
github.com/seaweedfs/goexif v1.0.3 h1:ve/OjI7dxPW8X9YQsv3JuVMaxEyF9Rvfd04ouL+Bz30=
github.com/seaweedfs/goexif v1.0.3/go.mod h1:Oni780Z236sXpIQzk1XoJlTwqrJ02smEin9zQeff7Fk=
github.com/seaweedfs/raft v1.2.4 h1:lEBQ9seDSGrJNs2WitMgfYpaDxLgh9qukm1IJTEV1hk=
@@ -1321,8 +1317,8 @@ github.com/ydb-platform/ydb-go-genproto v0.0.0-20260810122915-65bfd5c4b705 h1:7V
github.com/ydb-platform/ydb-go-genproto v0.0.0-20260810122915-65bfd5c4b705/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I=
github.com/ydb-platform/ydb-go-sdk-auth-environ v0.5.3 h1:A48PcmIETWwbEMIGwndv52uME6J1eJ28MBgF7HVR74o=
github.com/ydb-platform/ydb-go-sdk-auth-environ v0.5.3/go.mod h1:oRGF+67GWLbtNzqGygsPIUsjXmsRXD1KS5m3o5ppm2k=
github.com/ydb-platform/ydb-go-sdk/v3 v3.157.1 h1:eaf2VLTwta3VO0+K9+rUd1yWtXU6C5WxZx7v/sdbz/Y=
github.com/ydb-platform/ydb-go-sdk/v3 v3.157.1/go.mod h1:dJXJ1u00IqO8Vsph8fWmYj8b1E7jyphnvJPqA69emBY=
github.com/ydb-platform/ydb-go-sdk/v3 v3.155.1 h1:ZMByYe53zZ9R1o23fxJsbNhjzKFQkzpXm6uGj8gWHXQ=
github.com/ydb-platform/ydb-go-sdk/v3 v3.155.1/go.mod h1:dJXJ1u00IqO8Vsph8fWmYj8b1E7jyphnvJPqA69emBY=
github.com/ydb-platform/ydb-go-yc v0.12.5 h1:qYIeU1N6a92FaDA0+/vR55l5IzRF50MeLZwUWwvy2xQ=
github.com/ydb-platform/ydb-go-yc v0.12.5/go.mod h1:DlSltVQKEdXJotaAYwoHzMGDF9EJw5S3hg3LXe/5yYw=
github.com/ydb-platform/ydb-go-yc-metadata v0.6.2 h1:CZFawwHjLcjsxcl/g0dGIXbI2r41okPGLCydF4qTHcc=
@@ -1355,12 +1351,12 @@ go.etcd.io/bbolt v1.5.0 h1:S7GAl7Fxv12yohbwFfIbQCGDWbQbtDGPET4P/bD4lxU=
go.etcd.io/bbolt v1.5.0/go.mod h1:mkltfYE5aUHQxUct9N9V+Kp7aSjFqjgrhcXIS70Lrdk=
go.etcd.io/etcd/api/v3 v3.7.3 h1:2tumepXe+wi7Wab64uUO71K7ISQyUWLGC1DJbbc59sY=
go.etcd.io/etcd/api/v3 v3.7.3/go.mod h1:HOR9Qn4gb/1/hVAmYprmlLpvTe6ZgfgNS9Z/+Ty65po=
go.etcd.io/etcd/client/pkg/v3 v3.7.4 h1:633yLMDAQHWqLTRMxUNuZfOy6a4REJPcA3juoMRx5qU=
go.etcd.io/etcd/client/pkg/v3 v3.7.4/go.mod h1:I1lMmoiq2SF4Wg0Gru7uXMovS1eEo6wwAxcFPFPk/v0=
go.etcd.io/etcd/client/pkg/v3 v3.7.3 h1:5zMwNu3ycrzCeA5NwOfQbxFRhqq974chq1DrYMua4QI=
go.etcd.io/etcd/client/pkg/v3 v3.7.3/go.mod h1:/OhzqYrF0U7d1NOk55VMyUQGbYD1WoIe4bJwxb47wOk=
go.etcd.io/etcd/client/v3 v3.7.3 h1:UrXcetgkuSEocaBlQlulQRJlXLEnUAHuBRbHh0lue1Q=
go.etcd.io/etcd/client/v3 v3.7.3/go.mod h1:DcPxpqcpV8WIaRi/2waPCx0/Uq8rQUweDJaDYZk1gEE=
go.mongodb.org/mongo-driver v1.17.10 h1:kdAgQvu8TROXZpSkJQd5wzfaNCCrMbpZyKFtQ6qkPCE=
go.mongodb.org/mongo-driver v1.17.10/go.mod h1:LlOhpH5NUEfhxcAwG0UEkMqwYcc4JU18gtCdGudk/tQ=
go.mongodb.org/mongo-driver v1.17.9 h1:IexDdCuuNJ3BHrELgBlyaH9p60JXAvdzWR128q+U5tU=
go.mongodb.org/mongo-driver v1.17.9/go.mod h1:LlOhpH5NUEfhxcAwG0UEkMqwYcc4JU18gtCdGudk/tQ=
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
@@ -1505,8 +1501,8 @@ golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY=
golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.38.0 h1:uW7XQbcu1eoiQS7uMJvLOjPMl04bTbmY1VeRPxvbspI=
golang.org/x/oauth2 v0.38.0/go.mod h1:IxwZNxUULJmpBFf9K/9NTMSIfZZuvuTy1gGxhigP/58=
golang.org/x/oauth2 v0.37.0 h1:JUlcxA8oAtauLfiH8FX2/FkAWHAdi0QtGCGc+hofE98=
golang.org/x/oauth2 v0.37.0/go.mod h1:IxwZNxUULJmpBFf9K/9NTMSIfZZuvuTy1gGxhigP/58=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -1518,8 +1514,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.25.0 h1:dJnifr0nMV8/SBnBvdo4eSGGnrc3O4FFx6IqvtLcmRs=
golang.org/x/sync v0.25.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA=
golang.org/x/sync v0.24.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1561,8 +1557,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.50.0 h1:dkKZEFTEKaLr1sjhs0WiKqoi8Jj5nHbS3Njmx1UoMJs=
golang.org/x/sys v0.50.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA=
golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
@@ -1571,8 +1567,8 @@ golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.48.0 h1:G6UU1eiSB8nl3DzeUGt7Mg+2SctI8tPS6Z5/mBt6cOk=
golang.org/x/term v0.48.0/go.mod h1:BRDLHCZr2SUjIeBHHpRyQeC9xzSAVbzY2rvKgafnHf4=
golang.org/x/term v0.47.0 h1:cpyOwQkr2Nzxe2p6KnrTG7Ei2wtzjsuSjhpXXepZ/BM=
golang.org/x/term v0.47.0/go.mod h1:efAfAuG6RKABvg1ArGebRkvX6LXul14SM67o2e4mUCY=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
@@ -1709,20 +1705,20 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
modernc.org/b v1.0.0 h1:vpvqeyp17ddcQWF29Czawql4lDdABCDRbXRAS4+aF2o=
modernc.org/b v1.0.0/go.mod h1:uZWcZfRj1BpYzfN9JTerzlNUnnPsV9O2ZA8JsRcubNg=
modernc.org/cc/v4 v4.30.3 h1:aDq8gIX1X7+VFgO/JYYji6pLWL2H4tv3g8WatT3KCys=
modernc.org/cc/v4 v4.30.3/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI=
modernc.org/ccgo/v4 v4.37.0 h1:BAuJCUtIHIxFIYaFhqXIw5YaoMBlNCUlFovejHfMip4=
modernc.org/ccgo/v4 v4.37.0/go.mod h1:/8627VhwWtAbqUXmPORxFQU5SgLrAx2jl9seLw9GBhY=
modernc.org/cc/v4 v4.29.7 h1:q+NXGJ0bK3b4TXFYQQVr9pYETGnmwFWkrUzJnMya/Tg=
modernc.org/cc/v4 v4.29.7/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI=
modernc.org/ccgo/v4 v4.36.1 h1:ZNIUZAryN0UgnJwtyxrdEzcFc3yD4Cu4AzjfPXsLsIE=
modernc.org/ccgo/v4 v4.36.1/go.mod h1:rrtGc2QkS239nYb/mQNuBMyjq3/y3ZXWbBjPoV3wqzA=
modernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM=
modernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU=
modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI=
modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
modernc.org/gc/v3 v3.2.0 h1:/Y3LGDMQaoYf55PebP1qsZ5FDGgAZyG1RYKEHeQzh1o=
modernc.org/gc/v3 v3.2.0/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY=
modernc.org/gc/v3 v3.1.5 h1:21ldfPfRYE31Tb7B3mwAK8gy1AxP4+dKjrOQPfqakoc=
modernc.org/gc/v3 v3.1.5/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY=
modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks=
modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI=
modernc.org/libc v1.79.0 h1:9Dvvv++bAMSkSuBzuOFAatbTV5OIoq6Y6FohmD3e7q8=
modernc.org/libc v1.79.0/go.mod h1:uT3kR61NsbeKJSLqq83GJwSnZMVLlSjyAz4DfTaBy1M=
modernc.org/libc v1.77.1 h1:Ct8j47QtiZ1Enj2DtFXQtUqrPCAjdCmPjtCuvrYQ0Hs=
modernc.org/libc v1.77.1/go.mod h1:87/pZ4L6nD1zqW4nItuS12YO7hN1igAah34xjnQo/W0=
modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
@@ -1732,8 +1728,8 @@ modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg=
modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
modernc.org/sqlite v1.61.1 h1:TBEE49wz7VlxS+qXRXMQiPUZYOXHJ4ku83daYv1fe04=
modernc.org/sqlite v1.61.1/go.mod h1:f4gr5tbpx2umklaT/QVtbi/50hNdM+4ng+2zMo8KXJ0=
modernc.org/sqlite v1.60.1 h1:/blz53O951KWFOso4QQvEs/Fq6cDBKLtMVrYNSeJVKw=
modernc.org/sqlite v1.60.1/go.mod h1:1dIoEagfDE72QytD5scH1lxARtaUgKgHC/NuApA27r0=
modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
+2 -2
View File
@@ -1,6 +1,6 @@
apiVersion: v1
description: SeaweedFS
name: seaweedfs
appVersion: "4.56"
appVersion: "4.55"
# Dev note: Trigger a helm chart release by `git tag -a helm-<version>`
version: 4.56.0
version: 4.55.0
-76
View File
@@ -122,18 +122,6 @@ https://github.com/rancher/local-path-provisioner
you can use ANY storage class you like, just update the correct storage-class
for your deployment.
Every claim the chart creates also takes an optional `volumeAttributesClassName`
next to its `storageClass` (for example `master.data.volumeAttributesClassName`
or `volume.dataDirs[].volumeAttributesClassName`), to set provisioned
performance such as IOPS and throughput through a
[VolumeAttributesClass](https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/).
It needs Kubernetes 1.34+, or 1.31+ with the `VolumeAttributesClass` feature gate.
`volumeClaimTemplates` cannot be changed on an existing StatefulSet, and a new
template only reaches claims created after it. To set it on a release that
already exists, patch `spec.volumeAttributesClassName` on each existing claim,
and delete the StatefulSet with `--cascade=orphan` before the upgrade so the
upgrade can apply the new template.
### Master data: hostPath vs a claim
The master's `-mdir` holds its Raft log and snapshots, and with them the
@@ -267,18 +255,6 @@ filer:
enabled: true
```
### Message queue broker
An S3 gateway can run a message queue broker beside it, on gRPC port 17777 by default. `s3.mqBroker`, `filer.s3.mqBroker` and `allInOne.s3.mqBroker` choose it:
- `auto` (the default) runs it only with `global.seaweedfs.enableSecurity`, where the chart gives it mutual TLS through `[grpc.msg_broker]` in security.toml.
- `true` runs it either way. Without `enableSecurity` it then accepts any client that can reach the port.
- `false` never runs it.
`s3.mqBrokerPort`, `filer.s3.mqBrokerPort` and `allInOne.s3.mqBrokerPort` set the port, and 0 also turns the broker off. The `allInOne.s3` values inherit the `s3` ones when null. The container port and NetworkPolicy entry appear only when the broker runs.
Brokers register with the master under the pod IP, and clients and other brokers find them there and dial that address, so the port is deliberately left off the Services; a LoadBalancer or NodePort Service would only publish it outside the cluster. With `networkPolicy.enabled` the chart admits the port from the release's own pods; publishers and subscribers elsewhere need an `extraIngress` rule for it.
### Enabling Authentication to S3
To enable authentication for S3, you have two options:
@@ -354,54 +330,6 @@ applies. Rotating a key in the Secret takes effect on the next pod restart, as
with any other environment variable. The COSI driver parses the config itself
and does not resolve these references.
#### Reload identities without a restart
The chart hashes `existingConfigSecret` into the filer and S3 pod templates when it renders,
so the first Helm upgrade after the Secret's content changes restarts those pods, and every
identity change briefly takes S3 down, completely so with a single filer. SeaweedFS also
reloads the identities file on SIGHUP, which `configReloader` uses instead:
```yaml
filer:
s3:
enabled: true
enableAuth: true
existingConfigSecret: my-s3-identities
configReloader:
enabled: true
```
`s3.configReloader` does the same for the standalone S3 gateway. With it:
- An `s3-config-reloader` sidecar checks the mounted identities file every second, and
sends SIGHUP to SeaweedFS when it changes and once when it starts. Kubelet updates the
file at its next sync of the pod. Secret volumes are eventually consistent, so there is no
fixed bound: with the kubelet's default settings (a one-minute sync period and the `Watch`
Secret change detection strategy) it typically takes up to about 90 seconds, and changing
an annotation on the pod usually brings it down to seconds. Other kubelet settings can make
it slower. Until the file is updated, a revoked identity keeps working.
- Changes to the content of `existingConfigSecret` no longer restart the pod: the chart
leaves `checksum/s3config` off it. Adding, changing, disabling and deleting identities
apply without a restart. Other files in the Secret, such as an audit log config, still
need one, and so do changes to the values the chart generates its own Secret from, such
as `s3.credentials`.
- Every reload also re-creates the KMS providers configured in the identities file, and
drops the ones it no longer lists. A file whose identities don't parse changes neither.
A provider that fails to load keeps its previous instance, unless it's the one S3 uses,
which fails the KMS reload. S3 uses `default_provider`, or the first provider by name
when it isn't set, so set it when you list more than one, as adding a provider whose
name sorts first would switch S3 to it. The `local` provider reads its `keys` list
again, so objects encrypted under those keys stay readable. The keys it generates in
memory are lost on a reload, as on a restart, so list every key that protects objects
you need to keep, and give the alias `aws/s3` to the one that should serve requests
naming no key.
- The pod shares its process namespace (see [Sharing the process namespace](#sharing-the-process-namespace)),
so the sidecar can see SeaweedFS. It uses the component's image and container security
context, because it must run as the same user as SeaweedFS to signal it. If it can't
signal SeaweedFS, it logs a warning.
The all-in-one deployment does not have this option.
## Admin Component
The admin component provides a modern web-based administration interface for managing SeaweedFS clusters. It includes:
@@ -701,10 +629,6 @@ The volume servers do not require client certificates, because kubelet probes ca
`commonLabels` adds labels to the metadata of every object the chart creates. It may be a map or a template string rendering to one. The chart's own labels cannot be overridden, and pods (see `podLabels`) and `volumeClaimTemplates` are left unchanged.
## Sharing the process namespace
`filer.shareProcessNamespace` and `s3.shareProcessNamespace` let the containers in the filer and S3 pods see each other's processes, so a sidecar can signal SeaweedFS, for example with SIGHUP to reload the S3 identities file. SeaweedFS is then no longer PID 1 in its container, and every container in the pod can read the other containers' processes and files through `/proc`. Both are off by default.
## Pod and container security contexts
Pod and container security contexts are configurable independently for every built-in workload and remain empty by default for backwards compatibility. The examples in `values.yaml` show how to enable a `RuntimeDefault` seccomp profile, disable privilege escalation and privileged mode, drop all Linux capabilities, and use a read-only root filesystem.
@@ -359,9 +359,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.admin.data.storageClass }}
{{- with .Values.admin.data.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.admin.data.size }}
@@ -376,9 +373,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.admin.logs.storageClass }}
{{- with .Values.admin.logs.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.admin.logs.size }}
@@ -274,9 +274,6 @@ spec:
{{- if gt $s3PreStopSeconds 0 }}
-s3.preStopSeconds={{ $s3PreStopSeconds }} \
{{- end }}
{{- with (include "seaweedfs.mqBroker" (list . "allInOne") | fromJson).args }}
{{ . }} \
{{- end }}
{{- end }}
{{- if .Values.allInOne.sftp.enabled }}
-sftp \
@@ -409,10 +406,6 @@ spec:
- containerPort: {{ $httpsPort }}
name: swfs-s3-tls
{{- end }}
{{- with (include "seaweedfs.mqBroker" (list . "allInOne") | fromJson).port }}
- containerPort: {{ int . }}
name: swfs-mq-broker
{{- end }}
{{- end }}
{{- if .Values.allInOne.sftp.enabled }}
- containerPort: {{ .Values.allInOne.sftp.port | default .Values.sftp.port }}
@@ -22,9 +22,6 @@ spec:
{{- if .Values.allInOne.data.storageClass }}
storageClassName: {{ .Values.allInOne.data.storageClass }}
{{- end }}
{{- with .Values.allInOne.data.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.allInOne.data.size | default "10Gi" }}
@@ -4,10 +4,6 @@
{{- if .Values.filer.s3.enabled }}
{{- $s3PreStopSeconds = .Values.filer.s3.preStopSeconds | int }}
{{- end }}
{{- $s3ConfigReloader := (.Values.filer.s3.configReloader | default dict).enabled }}
{{- if and $s3ConfigReloader (not (and .Values.filer.s3.enabled .Values.filer.s3.enableAuth)) }}
{{- fail "filer.s3.configReloader.enabled needs filer.s3.enabled and filer.s3.enableAuth: it reloads the identities file they mount" }}
{{- end }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
@@ -54,11 +50,8 @@ spec:
{{- end }}
{{- $podAnnotations := mergeOverwrite (deepCopy (.Values.podAnnotations | default dict)) (.Values.filer.podAnnotations | default dict) }}
{{- if .Values.filer.s3.existingConfigSecret }}
{{- /* With the config reloader, a change to the existing Secret is applied by SIGHUP, so nothing in it may restart the pod. */}}
{{- if not $s3ConfigReloader }}
{{- $configSecret := (lookup "v1" "Secret" (include "seaweedfs.namespace" .) .Values.filer.s3.existingConfigSecret) | default dict }}
{{- $_ := set $podAnnotations "checksum/s3config" ($configSecret | toYaml | sha256sum) }}
{{- end }}
{{- else }}
{{- $_ := set $podAnnotations "checksum/s3config" (include "seaweedfs.s3.configChecksum" .) }}
{{- end }}
@@ -89,9 +82,6 @@ spec:
schedulerName: {{ .Values.filer.schedulerName | quote }}
{{- end }}
enableServiceLinks: false
{{- if or .Values.filer.shareProcessNamespace $s3ConfigReloader }}
shareProcessNamespace: true
{{- end }}
{{- if .Values.filer.initContainers }}
initContainers:
{{ tpl .Values.filer.initContainers . | nindent 8 | trim }}
@@ -296,9 +286,6 @@ spec:
{{- if gt $s3PreStopSeconds 0 }}
-s3.preStopSeconds={{ $s3PreStopSeconds }} \
{{- end }}
{{- with (include "seaweedfs.mqBroker" (list . "filer") | fromJson).args }}
{{ . }} \
{{- end }}
{{- end }}
-master={{ include "seaweedfs.masterServerArg" . }} \
{{- range .Values.filer.extraArgs }}
@@ -366,10 +353,6 @@ spec:
- containerPort: {{ .Values.filer.s3.httpsPort }}
name: swfs-s3-tls
{{- end }}
{{- with (include "seaweedfs.mqBroker" (list . "filer") | fromJson).port }}
- containerPort: {{ int . }}
name: swfs-mq-broker
{{- end }}
{{- end }}
{{- $jwt := (.Values.global.seaweedfs.securityConfig).jwtSigning | default dict }}
{{- $isJwtEnabled := or $jwt.filerWrite $jwt.filerRead }}
@@ -414,9 +397,6 @@ spec:
{{- if .Values.filer.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.filer.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if $s3ConfigReloader }}
{{- include "seaweedfs.s3.configReloaderContainer" (dict "root" $ "image" (include "seaweedfs.filer.image" .) "port" .Values.filer.s3.port "resources" .Values.filer.s3.configReloader.resources "securityContext" .Values.filer.containerSecurityContext) | nindent 8 }}
{{- end }}
{{- if .Values.filer.sidecars }}
{{- include "seaweedfs.tplvalues.render" (dict "value" .Values.filer.sidecars "context" $) | nindent 8 }}
{{- end }}
@@ -517,9 +497,6 @@ spec:
{{- if .Values.filer.storageClass }}
storageClassName: {{ .Values.filer.storageClass }}
{{- end }}
{{- with .Values.filer.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
{{- end }}
{{- $pvc_exists := include "seaweedfs.filer.pvc_exists" . -}}
{{- if $pvc_exists }}
@@ -536,9 +513,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.filer.data.storageClass }}
{{- with .Values.filer.data.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.filer.data.size }}
@@ -555,9 +529,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.filer.logs.storageClass }}
{{- with .Values.filer.logs.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.filer.logs.size }}
@@ -340,9 +340,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.master.data.storageClass }}
{{- with .Values.master.data.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.master.data.size }}
@@ -359,9 +356,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.master.logs.storageClass }}
{{- with .Values.master.logs.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.master.logs.size }}
@@ -1,10 +1,6 @@
{{- include "seaweedfs.compat" . -}}
{{- if .Values.s3.enabled }}
{{- $preStopSeconds := .Values.s3.preStopSeconds | int }}
{{- $s3ConfigReloader := (.Values.s3.configReloader | default dict).enabled }}
{{- if and $s3ConfigReloader (not .Values.s3.enableAuth) }}
{{- fail "s3.configReloader.enabled needs s3.enableAuth: it reloads the identities file that mounts" }}
{{- end }}
{{- $minGracePeriod := add $preStopSeconds 15 }}
{{- if and (gt $preStopSeconds 0) (lt (.Values.s3.terminationGracePeriodSeconds | int) $minGracePeriod) }}
{{- fail (printf "s3.terminationGracePeriodSeconds (%v) must be at least %d: the gateway keeps serving for s3.preStopSeconds (%d) after SIGTERM, then gives in-flight requests up to 15s to finish; add the time any s3.lifecycle.preStop hook takes" .Values.s3.terminationGracePeriodSeconds $minGracePeriod $preStopSeconds) -}}
@@ -51,11 +47,8 @@ spec:
{{- end }}
{{- $podAnnotations := mergeOverwrite (deepCopy (.Values.podAnnotations | default dict)) (.Values.s3.podAnnotations | default dict) }}
{{- if .Values.s3.existingConfigSecret }}
{{- /* With the config reloader, a change to the existing Secret is applied by SIGHUP, so nothing in it may restart the pod. */}}
{{- if not $s3ConfigReloader }}
{{- $configSecret := (lookup "v1" "Secret" (include "seaweedfs.namespace" .) .Values.s3.existingConfigSecret) | default dict }}
{{- $_ := set $podAnnotations "checksum/s3config" ($configSecret | toYaml | sha256sum) }}
{{- end }}
{{- else }}
{{- $_ := set $podAnnotations "checksum/s3config" (include "seaweedfs.s3.configChecksum" .) }}
{{- end }}
@@ -85,9 +78,6 @@ spec:
schedulerName: {{ .Values.s3.schedulerName | quote }}
{{- end }}
enableServiceLinks: false
{{- if or .Values.s3.shareProcessNamespace $s3ConfigReloader }}
shareProcessNamespace: true
{{- end }}
{{- if .Values.s3.serviceAccountName }}
serviceAccountName: {{ .Values.s3.serviceAccountName | quote }}
{{- end }}
@@ -179,9 +169,6 @@ spec:
{{- end }}
{{- /* rendered even when 0: an if would drop the flag and weed would serve its default */}}
-port.lance={{ .Values.s3.lancePort | default 0 }} \
{{- with (include "seaweedfs.mqBroker" (list . "s3") | fromJson).args }}
{{ . }} \
{{- end }}
{{- range .Values.s3.extraArgs }}
{{ . }} \
{{- end }}
@@ -236,10 +223,6 @@ spec:
- containerPort: {{ .Values.s3.lancePort }}
name: swfs-lance
{{- end }}
{{- with (include "seaweedfs.mqBroker" (list . "s3") | fromJson).port }}
- containerPort: {{ int . }}
name: swfs-mq-broker
{{- end }}
{{- if .Values.s3.metricsPort }}
- containerPort: {{ .Values.s3.metricsPort }}
name: metrics
@@ -279,9 +262,6 @@ spec:
{{- if .Values.s3.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.s3.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if $s3ConfigReloader }}
{{- include "seaweedfs.s3.configReloaderContainer" (dict "root" $ "image" (include "seaweedfs.s3.image" .) "port" .Values.s3.port "resources" .Values.s3.configReloader.resources "securityContext" .Values.s3.containerSecurityContext) | nindent 8 }}
{{- end }}
{{- if .Values.s3.sidecars }}
{{- include "seaweedfs.tplvalues.render" (dict "value" .Values.s3.sidecars "context" $) | nindent 8 }}
{{- end }}
@@ -283,55 +283,6 @@ true
{{- end -}}
{{- end -}}
{{/*
The message queue broker beside an S3 gateway, for (list $ "s3"|"filer"|"allInOne"),
as JSON: "args" are its flags and "port" the port it serves, 0 when it cannot run.
Unflagged, weed starts it only with grpc.msg_broker TLS, which enableSecurity
writes, and on 17777; defaults are left out so images without these flags start.
allInOne.s3 inherits s3's mqBroker and mqBrokerPort when null.
*/}}
{{- define "seaweedfs.mqBroker" -}}
{{- $root := index . 0 -}}
{{- $component := index . 1 -}}
{{- $prefix := "" -}}
{{- $name := "s3.mqBroker" -}}
{{- $mode := $root.Values.s3.mqBroker -}}
{{- $port := $root.Values.s3.mqBrokerPort -}}
{{- if eq $component "filer" -}}
{{- $prefix = "s3." -}}
{{- $name = "filer.s3.mqBroker" -}}
{{- $mode = $root.Values.filer.s3.mqBroker -}}
{{- $port = $root.Values.filer.s3.mqBrokerPort -}}
{{- else if eq $component "allInOne" -}}
{{- if not (kindIs "invalid" $root.Values.allInOne.s3.mqBroker) -}}
{{- $name = "allInOne.s3.mqBroker" -}}
{{- $mode = $root.Values.allInOne.s3.mqBroker -}}
{{- end -}}
{{- if not (kindIs "invalid" $root.Values.allInOne.s3.mqBrokerPort) -}}
{{- $port = $root.Values.allInOne.s3.mqBrokerPort -}}
{{- end -}}
{{- end -}}
{{- $mode = ternary "auto" (toString $mode | lower) (kindIs "invalid" $mode) -}}
{{- if not (has $mode (list "auto" "true" "false")) -}}
{{- fail (printf "%s must be auto, true or false, not %q" $name $mode) -}}
{{- end -}}
{{- $port = int ($port | default 0) -}}
{{- $runs := false -}}
{{- if and (gt $port 0) (or (eq $mode "true") (and (eq $mode "auto") $root.Values.global.seaweedfs.enableSecurity)) -}}
{{- $runs = true -}}
{{- end -}}
{{- $args := list -}}
{{- if or (eq $mode "false") (eq $port 0) -}}
{{- $args = append $args (printf "-%smq.broker=false" $prefix) -}}
{{- else if eq $mode "true" -}}
{{- $args = append $args (printf "-%smq.broker=true" $prefix) -}}
{{- end -}}
{{- if and $runs (ne $port 17777) -}}
{{- $args = append $args (printf "-%smq.broker.port=%d" $prefix $port) -}}
{{- end -}}
{{- dict "args" (join " " $args) "port" (ternary $port 0 $runs) | toJson -}}
{{- end -}}
{{/* Return the proper volume image */}}
{{- define "seaweedfs.volume.image" -}}
{{- if .Values.volume.imageOverride -}}
@@ -838,65 +789,6 @@ on install.
| toJson | sha256sum -}}
{{- end -}}
{{/*
The s3-config-reloader sidecar of the filer and S3 pods. It checks the mounted identities file every
second and sends SIGHUP to SeaweedFS when it changes, so SeaweedFS loads it again without a restart.
It only signals once SeaweedFS listens on its S3 port, because SeaweedFS registers the reload when it
starts serving S3, and it sends one SIGHUP when it starts, which catches changes made while it was not
running. It needs the pod's process namespace to see SeaweedFS, and the same user to signal it, so it
uses the component's image and container security context.
Usage: include "seaweedfs.s3.configReloaderContainer" (dict "root" $ "image" <image> "port" <S3 port>
"resources" <resources> "securityContext" <the component's containerSecurityContext>)
*/}}
{{- define "seaweedfs.s3.configReloaderContainer" -}}
- name: s3-config-reloader
image: {{ .image }}
imagePullPolicy: {{ default "IfNotPresent" .root.Values.global.seaweedfs.imagePullPolicy }}
command:
- /bin/sh
- -c
- |
config_file=/etc/sw/seaweedfs_s3_config
# /proc/net/tcp lists ports in hex, and 0A is the state LISTEN.
s3_port=$(printf '%04X' {{ .port }})
last_hash=""
warned=""
while sleep 1; do
current_hash=$(sha256sum "$config_file" 2>/dev/null | cut -d' ' -f1)
if [ -z "$current_hash" ] || [ "$current_hash" = "$last_hash" ]; then
continue
fi
if ! grep -qE ":$s3_port [0-9A-F]+:[0-9A-F]+ 0A " /proc/net/tcp /proc/net/tcp6 2>/dev/null; then
continue
fi
signalled=""
for process_dir in /proc/[0-9]*; do
if [ "$(cat "$process_dir/comm" 2>/dev/null)" = "weed" ] && kill -HUP "${process_dir#/proc/}" 2>/dev/null; then
echo "S3 config changed (sha256 $current_hash), sent SIGHUP to weed (PID ${process_dir#/proc/})"
signalled=1
fi
done
if [ -n "$signalled" ]; then
last_hash=$current_hash
warned=""
elif [ -z "$warned" ]; then
echo "S3 config changed, but no weed process is visible: the pod must share its process namespace, and the sidecar must run as the same user as SeaweedFS" >&2
warned=1
fi
done
volumeMounts:
- name: config-users
mountPath: /etc/sw
readOnly: true
{{- with .resources }}
resources:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .securityContext.enabled }}
securityContext: {{- omit .securityContext "enabled" | toYaml | nindent 4 }}
{{- end }}
{{- end -}}
{{/* Master ConfigMap checksum, ignoring commonLabels so labels do not roll the pods */}}
{{- define "seaweedfs.master.configChecksum" -}}
{{- $context := merge (dict "Values" (omit .Values "commonLabels")) (omit . "Values") -}}
@@ -26,9 +26,6 @@
{{- if and $https (gt (int $https) 0) }}
{{- $ports = append $ports $https }}
{{- end }}
{{- with (include "seaweedfs.mqBroker" (list $ "allInOne") | fromJson).port }}
{{- $ports = append $ports (int .) }}
{{- end }}
{{- end }}
{{- if .Values.allInOne.sftp.enabled }}
{{- $ports = append $ports (.Values.allInOne.sftp.port | default .Values.sftp.port) }}
@@ -65,9 +62,6 @@
{{- if and .Values.filer.s3.httpsPort (gt (int .Values.filer.s3.httpsPort) 0) }}
{{- $ports = append $ports .Values.filer.s3.httpsPort }}
{{- end }}
{{- with (include "seaweedfs.mqBroker" (list $ "filer") | fromJson).port }}
{{- $ports = append $ports (int .) }}
{{- end }}
{{- end }}
{{- $targets = append $targets (dict "component" "filer" "ports" $ports) }}
{{- end }}
@@ -82,9 +76,6 @@
{{- if .Values.s3.lancePort }}
{{- $ports = append $ports .Values.s3.lancePort }}
{{- end }}
{{- with (include "seaweedfs.mqBroker" (list $ "s3") | fromJson).port }}
{{- $ports = append $ports (int .) }}
{{- end }}
{{- if .Values.s3.metricsPort }}
{{- $ports = append $ports .Values.s3.metricsPort }}
{{- end }}
@@ -120,14 +120,6 @@ stringData:
cert = "/usr/local/share/ca-certificates/client/tls.crt"
key = "/usr/local/share/ca-certificates/client/tls.key"
{{- /* The broker beside each S3 gateway serves with this identity and
dials other brokers with it; weed starts that broker only when this
section has a cert and key. Same internal client cert as grpc.s3, which
every pod running a gateway already mounts. */}}
[grpc.msg_broker]
cert = "/usr/local/share/ca-certificates/client/tls.crt"
key = "/usr/local/share/ca-certificates/client/tls.key"
# use this for any place needs a grpc client
# i.e., "weed backup|benchmark|filer.copy|filer.replicate|mount|s3|upload"
[grpc.client]
@@ -412,9 +412,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ $dir.storageClass }}
{{- with $dir.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ $dir.size }}
@@ -433,9 +430,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ $volume.idx.storageClass }}
{{- with $volume.idx.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ $volume.idx.size }}
@@ -452,9 +446,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ $volume.logs.storageClass }}
{{- with $volume.logs.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ $volume.logs.size }}
@@ -1,199 +0,0 @@
package tests
import (
"fmt"
"os/exec"
"strings"
"testing"
)
const security = "global.seaweedfs.enableSecurity=true"
type brokerGateway struct {
name string
settings []string
kind string
object string
prefix string
broker string
port string
}
var brokerGateways = []brokerGateway{
{"s3", []string{"s3.enabled=true"}, "Deployment", "vector-test-seaweedfs-s3", "", "s3.mqBroker", "s3.mqBrokerPort"},
{"filer.s3", []string{"filer.s3.enabled=true"}, "StatefulSet", "vector-test-seaweedfs-filer", "s3.", "filer.s3.mqBroker", "filer.s3.mqBrokerPort"},
{"allInOne", []string{"allInOne.enabled=true", "allInOne.s3.enabled=true"}, "Deployment", "vector-test-seaweedfs-all-in-one", "", "allInOne.s3.mqBroker", "allInOne.s3.mqBrokerPort"},
}
func firstContainer(workload map[string]interface{}) map[string]interface{} {
return workload["spec"].(map[string]interface{})["template"].(map[string]interface{})["spec"].(map[string]interface{})["containers"].([]interface{})[0].(map[string]interface{})
}
// brokerFlags returns the broker flags of the workload's first container.
func brokerFlags(workload map[string]interface{}) []string {
container := firstContainer(workload)
var words []string
for _, key := range []string{"command", "args"} {
if list, ok := container[key].([]interface{}); ok {
for _, word := range list {
words = append(words, strings.Fields(word.(string))...)
}
}
}
var flags []string
for _, word := range words {
if strings.Contains(word, "mq.broker") {
flags = append(flags, word)
}
}
return flags
}
func namedPort(ports []interface{}, name, field string) int {
for _, port := range ports {
if p := port.(map[string]interface{}); p["name"] == name {
return p[field].(int)
}
}
return 0
}
func policyAllows(policy map[string]interface{}, want int) bool {
rules, _ := policy["spec"].(map[string]interface{})["ingress"].([]interface{})
for _, rule := range rules {
ports, _ := rule.(map[string]interface{})["ports"].([]interface{})
for _, port := range ports {
if port.(map[string]interface{})["port"] == want {
return true
}
}
}
return false
}
// checkBroker asserts the flags, that the broker port is declared and
// admitted exactly when the broker runs, so a broker that runs with its port
// blocked fails, and that no Service ever carries it.
func checkBroker(t *testing.T, gateway brokerGateway, label string, settings []string, wantFlags []string, wantPort int) {
t.Helper()
_, documents := render(t, append(append([]string{"networkPolicy.enabled=true"}, gateway.settings...), settings...)...)
label = fmt.Sprintf("%s %s", gateway.name, label)
workload := findDocument(documents, gateway.kind, gateway.object)
if workload == nil {
t.Fatalf("%s: no %s %s", label, gateway.kind, gateway.object)
}
if got := brokerFlags(workload); strings.Join(got, " ") != strings.Join(wantFlags, " ") {
t.Errorf("%s: broker flags %q, want %q", label, got, wantFlags)
}
containerPorts, _ := firstContainer(workload)["ports"].([]interface{})
if got := namedPort(containerPorts, "swfs-mq-broker", "containerPort"); got != wantPort {
t.Errorf("%s: containerPort %d, want %d", label, got, wantPort)
}
// Clients find brokers through the master and dial the pod, so a Service
// port would only publish the broker through a LoadBalancer or NodePort.
for _, document := range documents {
if document["kind"] != "Service" {
continue
}
for _, port := range document["spec"].(map[string]interface{})["ports"].([]interface{}) {
p := port.(map[string]interface{})
if p["name"] == "swfs-mq-broker" || p["port"] == 17777 || p["targetPort"] == 17777 || (wantPort != 0 && (p["port"] == wantPort || p["targetPort"] == wantPort)) {
t.Errorf("%s: Service %v carries the broker port: %v", label, document["metadata"].(map[string]interface{})["name"], p)
}
}
}
policy := findDocument(documents, "NetworkPolicy", gateway.object)
if policy == nil {
t.Fatalf("%s: no NetworkPolicy %s", label, gateway.object)
}
if wantPort != 0 && !policyAllows(policy, wantPort) {
t.Errorf("%s: NetworkPolicy does not admit broker port %d", label, wantPort)
}
for _, port := range []int{17777, 18887} {
if port != wantPort && policyAllows(policy, port) {
t.Errorf("%s: NetworkPolicy admits %d with no broker on it", label, port)
}
}
}
func TestMqBrokerModes(t *testing.T) {
for _, gateway := range brokerGateways {
on := "-" + gateway.prefix + "mq.broker=true"
off := "-" + gateway.prefix + "mq.broker=false"
port := "-" + gateway.prefix + "mq.broker.port=18887"
cases := []struct {
label string
settings []string
wantFlags []string
wantPort int
}{
{"auto without security", nil, nil, 0},
{"auto with security", []string{security}, nil, 17777},
{"auto with security, custom port", []string{security, gateway.port + "=18887"}, []string{port}, 18887},
{"auto without security, custom port", []string{gateway.port + "=18887"}, nil, 0},
{"true", []string{gateway.broker + "=true"}, []string{on}, 17777},
{"true, custom port", []string{gateway.broker + "=true", gateway.port + "=18887"}, []string{on, port}, 18887},
{"false with security", []string{security, gateway.broker + "=false"}, []string{off}, 0},
{"true, port 0", []string{gateway.broker + "=true", gateway.port + "=0"}, []string{off}, 0},
}
for _, c := range cases {
checkBroker(t, gateway, c.label, c.settings, c.wantFlags, c.wantPort)
}
}
}
func TestMqBrokerAllInOneInherits(t *testing.T) {
allInOne := brokerGateways[2]
cases := []struct {
label string
settings []string
wantFlags []string
wantPort int
}{
{"null inherits s3.mqBroker=true", []string{"s3.mqBroker=true"}, []string{"-mq.broker=true"}, 17777},
{"null inherits s3.mqBroker=false", []string{security, "s3.mqBroker=false"}, []string{"-mq.broker=false"}, 0},
{"explicit auto overrides s3.mqBroker=false", []string{security, "s3.mqBroker=false", "allInOne.s3.mqBroker=auto"}, nil, 17777},
{"null inherits s3.mqBrokerPort", []string{security, "s3.mqBrokerPort=18887"}, []string{"-mq.broker.port=18887"}, 18887},
{"explicit port overrides s3.mqBrokerPort=0", []string{security, "s3.mqBrokerPort=0", "allInOne.s3.mqBrokerPort=18887"}, []string{"-mq.broker.port=18887"}, 18887},
}
for _, c := range cases {
checkBroker(t, allInOne, c.label, c.settings, c.wantFlags, c.wantPort)
}
}
func TestMqBrokerTLSOnlyWithSecurity(t *testing.T) {
for _, secured := range []bool{false, true} {
// filer JWT signing writes security.toml without enableSecurity
settings := []string{"s3.enabled=true", "global.seaweedfs.securityConfig.jwtSigning.filerWrite=true"}
if secured {
settings = append(settings, security)
}
_, documents := render(t, settings...)
secret := findDocument(documents, "Secret", "vector-test-seaweedfs-security-config")
if secret == nil {
t.Fatalf("security %v: no security config Secret", secured)
}
toml := secret["stringData"].(map[string]interface{})["security.toml"].(string)
section := "[grpc.msg_broker]\ncert = \"/usr/local/share/ca-certificates/client/tls.crt\"\nkey = \"/usr/local/share/ca-certificates/client/tls.key\""
if got := strings.Contains(toml, section); got != secured {
t.Errorf("security %v: [grpc.msg_broker] with the client cert present = %v\n%s", secured, got, toml)
}
if !secured && strings.Contains(toml, "[grpc.msg_broker]") {
t.Errorf("[grpc.msg_broker] written without enableSecurity")
}
}
}
func TestMqBrokerRejectsUnknownValue(t *testing.T) {
if _, err := exec.LookPath("helm"); err != nil {
t.Skip("helm is not installed")
}
output, err := exec.Command("helm", "template", "test", "..", "--set", "s3.enabled=true", "--set", "s3.mqBroker=yes").CombinedOutput()
if err == nil || !strings.Contains(string(output), `s3.mqBroker must be auto, true or false, not "yes"`) {
t.Fatalf("s3.mqBroker=yes accepted: %v %s", err, output)
}
}
+1 -52
View File
@@ -151,14 +151,12 @@ master:
# Enter any extra configuration for master.toml here.
# It may be a multi-line string.
# volumeAttributesClassName (optional) needs Kubernetes 1.34+, or 1.31+ with the VolumeAttributesClass feature gate.
# You may use ANY storage-class, example with local-path-provisioner
# Annotations are optional.
# data:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
# volumeAttributesClassName: "my-attributes-class"
# annotations:
# "key": "value"
#
@@ -186,7 +184,6 @@ master:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
# volumeAttributesClassName: "my-attributes-class"
# annotations:
# "key": "value"
@@ -419,7 +416,6 @@ volume:
# extraArgs: ["-customFlag", "value", "-anotherFlag"]
extraArgs: []
# volumeAttributesClassName (optional) needs Kubernetes 1.34+, or 1.31+ with the VolumeAttributesClass feature gate.
# For each data disk you may use ANY storage-class, example with local-path-provisioner
# Annotations are optional.
# dataDirs:
@@ -427,7 +423,6 @@ volume:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
# volumeAttributesClassName: "my-attributes-class"
# annotations:
# "key": "value"
# maxVolumes: 0 # If set to zero on non-windows OS, the limit will be auto configured. (default "7")
@@ -482,7 +477,6 @@ volume:
# type: "persistentVolumeClaim"
# size: "20Gi"
# storageClass: "local-path-provisioner"
# volumeAttributesClassName: "my-attributes-class"
#
# or
#
@@ -805,16 +799,12 @@ filer:
storage: 25Gi
# storageClass is the class of storage which defaults to null (the Kube cluster will pick the default).
storageClass: null
# volumeAttributesClassName is the VolumeAttributesClass of the enablePVC claim; null leaves it unset.
volumeAttributesClassName: null
# volumeAttributesClassName (optional) needs Kubernetes 1.34+, or 1.31+ with the VolumeAttributesClass feature gate.
# You may use ANY storage-class, example with local-path-provisioner
# Annotations are optional.
# data:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
# volumeAttributesClassName: "my-attributes-class"
# annotations:
# "key": "value"
#
@@ -838,7 +828,6 @@ filer:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
# volumeAttributesClassName: "my-attributes-class"
# annotations:
# "key": "value"
@@ -867,11 +856,6 @@ filer:
extraVolumes: ""
extraVolumeMounts: ""
# Share one process namespace between the containers of the filer pod, so a
# sidecar can see and signal the filer process, for example to reload its
# configuration with SIGHUP. The filer is then no longer PID 1.
shareProcessNamespace: false
# Labels to be added to the filer pods
podLabels: {}
@@ -1096,9 +1080,6 @@ filer:
port: 8333
# add additional https port
httpsPort: 0
# Message queue broker beside the gateway, see s3.mqBroker
mqBroker: auto
mqBrokerPort: 17777
# Suffix of the host name, {bucket}.{domainName}
domainName: ""
# Seconds the gateway keeps serving after SIGTERM while its health checks
@@ -1110,13 +1091,6 @@ filer:
# set to the name of an existing kubernetes Secret with the s3 json config file
# should have a secret key called seaweedfs_s3_config with an inline json configure
existingConfigSecret: null
# Reload the identities file without restarting the filer: a sidecar sends
# SIGHUP to SeaweedFS when kubelet updates the mounted config Secret, and the
# pod no longer restarts when the content of existingConfigSecret changes.
# Needs enableAuth, and turns on shareProcessNamespace. See the README.
configReloader:
enabled: false
resources: {}
# To provide explicit credentials for the S3 gateway, set them under
# the top-level s3.credentials key (not filer.s3.credentials).
# The s3-secret.yaml template only reads from .Values.s3.credentials.
@@ -1189,26 +1163,12 @@ s3:
# Lance Namespace port; weed serves 9101 by default, 0 disables it
# (and the worker's Lance container)
lancePort: 9101
# Message queue broker beside the gateway: auto runs it only with
# global.seaweedfs.enableSecurity, which gives it mTLS; true runs it either
# way, without TLS when security is off; false never does.
mqBroker: auto
# Its gRPC port, 0 turns it off. Clients and other brokers find the broker
# through the master and dial the pod IP, so no Service carries this port.
mqBrokerPort: 17777
loggingOverrideLevel: null
# enable user & permission to s3 (need to inject to all services)
enableAuth: false
# set to the name of an existing kubernetes Secret with the s3 json config file
# should have a secret key called seaweedfs_s3_config with an inline json config
existingConfigSecret: null
# Reload the identities file without restarting the gateway: a sidecar sends
# SIGHUP to SeaweedFS when kubelet updates the mounted config Secret, and the
# pod no longer restarts when the content of existingConfigSecret changes.
# Needs enableAuth, and turns on shareProcessNamespace. See the README.
configReloader:
enabled: false
resources: {}
# Optionally provide explicit credentials for the S3 gateway.
# When set, these are used in the generated s3 secret instead of
# auto-generating random credentials.
@@ -1268,11 +1228,6 @@ s3:
extraVolumes: ""
extraVolumeMounts: ""
# Share one process namespace between the containers of the s3 pod, so a
# sidecar can see and signal the gateway process, for example to reload its
# configuration with SIGHUP. The gateway is then no longer PID 1.
shareProcessNamespace: false
# Labels to be added to the s3 pods
podLabels: {}
@@ -1654,12 +1609,10 @@ admin:
extraArgs: []
# Storage configuration
# volumeAttributesClassName (optional) needs Kubernetes 1.34+, or 1.31+ with the VolumeAttributesClass feature gate.
data:
type: "emptyDir" # Options: "hostPath", "persistentVolumeClaim", "emptyDir", "existingClaim"
size: "10Gi"
storageClass: ""
volumeAttributesClassName: ""
hostPathPrefix: /storage
claimName: ""
annotations: {}
@@ -1668,7 +1621,6 @@ admin:
type: "emptyDir" # Options: "hostPath", "persistentVolumeClaim", "emptyDir", "existingClaim"
size: "5Gi"
storageClass: ""
volumeAttributesClassName: ""
hostPathPrefix: /storage
claimName: ""
annotations: {}
@@ -1896,7 +1848,7 @@ worker:
# Worker job types - categories or comma-separated list of names/aliases
# Categories: all, default, heavy
# default: vacuum, volume_balance, ec_balance, admin_script
# heavy: erasure_coding, iceberg_maintenance, mq_topic_table
# heavy: erasure_coding, iceberg_maintenance
# all: every registered job type
# Examples: "all", "default", "heavy", "default,iceberg" (default+iceberg), "vacuum,volume_balance"
# Refer: https://github.com/seaweedfs/seaweedfs/wiki/Worker
@@ -2070,8 +2022,6 @@ allInOne:
enabled: false # Whether to enable S3 gateway
port: null # S3 gateway port (null inherits from s3.port)
httpsPort: null # S3 gateway HTTPS port (null inherits from s3.httpsPort)
mqBroker: null # Message queue broker: auto, true or false (null inherits from s3.mqBroker)
mqBrokerPort: null # Message queue broker gRPC port (null inherits from s3.mqBrokerPort, 0 turns the broker off)
domainName: null # Suffix of the host name (null inherits from s3.domainName)
enableAuth: false # Enable user & permission to S3
# Set to the name of an existing kubernetes Secret with the s3 json config file
@@ -2166,7 +2116,6 @@ allInOne:
claimName: seaweedfs-data-pvc # Name of the PVC to use (for existingClaim type)
size: null # Size of the PVC (null defaults to 10Gi for persistentVolumeClaim type)
storageClass: null # Storage class for the PVC (null uses cluster default)
volumeAttributesClassName: null # VolumeAttributesClass for the PVC; needs Kubernetes 1.34+, or 1.31+ with the feature gate
# accessModes for the PVC. Default is ["ReadWriteOnce"].
# For multi-replica deployments, use ["ReadWriteMany"] with a compatible storage class.
accessModes: []
+1013 -1029
View File
File diff suppressed because it is too large. Load diff

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

@@ -42,26 +42,12 @@ public class FileChunkManifest {
// avoid deprecated chunk.getFileId()
resolvedChunks.add(t.toBuilder().setFileId(FilerClient.toFileId(t.getFid())).build());
}
dataChunks.addAll(resolveChunkManifest(filerClient, cutToManifestSpan(chunk, resolvedChunks)));
dataChunks.addAll(resolveChunkManifest(filerClient, resolvedChunks));
}
return dataChunks;
}
// A truncate may have shortened a manifest and left the chunks it holds whole.
static List<FilerProto.FileChunk> cutToManifestSpan(FilerProto.FileChunk manifest, List<FilerProto.FileChunk> held) {
long end = manifest.getOffset() + manifest.getSize();
List<FilerProto.FileChunk> cut = new ArrayList<>(held.size());
for (FilerProto.FileChunk chunk : held) {
if (chunk.getOffset() + chunk.getSize() <= end) {
cut.add(chunk);
} else if (chunk.getOffset() < end) {
cut.add(chunk.toBuilder().setSize(end - chunk.getOffset()).build());
}
}
return cut;
}
private static byte[] fetchChunk(final FilerClient filerClient, FilerProto.FileChunk chunk) throws IOException {
String vid = "" + chunk.getFid().getVolumeId();
@@ -1,102 +0,0 @@
package seaweedfs.client;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.StandardCharsets;
import java.security.GeneralSecurityException;
import java.util.Base64;
// Credentials for a filer's own HTTP port: [filer.basic_auth], [jwt.filer_signing] and
// [jwt.filer_signing.read]. Each FilerClient starts from its own copy of the security.toml values.
public final class FilerCredentials {
private static final long DEFAULT_SIGNING_EXPIRES_AFTER_SECONDS = 10;
private static final long DEFAULT_READ_SIGNING_EXPIRES_AFTER_SECONDS = 60;
private volatile String basicAuthUser = "";
private volatile String basicAuthPassword = "";
private volatile String basicAuthHeaderValue;
private volatile String signingKey = "";
private volatile long signingExpiresAfterSeconds = DEFAULT_SIGNING_EXPIRES_AFTER_SECONDS;
private volatile String readSigningKey = "";
private volatile long readSigningExpiresAfterSeconds = DEFAULT_READ_SIGNING_EXPIRES_AFTER_SECONDS;
public FilerCredentials() {
}
public FilerCredentials(FilerCredentials other) {
synchronized (other) {
basicAuthUser = other.basicAuthUser;
basicAuthPassword = other.basicAuthPassword;
basicAuthHeaderValue = other.basicAuthHeaderValue;
signingKey = other.signingKey;
signingExpiresAfterSeconds = other.signingExpiresAfterSeconds;
readSigningKey = other.readSigningKey;
readSigningExpiresAfterSeconds = other.readSigningExpiresAfterSeconds;
}
}
// A null argument keeps the current value. Like the filer, an empty password turns
// Basic Auth off and an empty user is allowed.
public synchronized void setBasicAuth(String user, String password) {
if (user != null) {
basicAuthUser = user;
}
if (password != null) {
basicAuthPassword = password;
}
basicAuthHeaderValue = basicAuthPassword.isEmpty() ? null
: FilerSecurityContext.encodeBasicAuth(basicAuthUser, basicAuthPassword);
}
// A null key or expiresAfterSeconds <= 0 keeps the current value; an empty key turns signing off.
public synchronized void setJwtSigningKey(String key, long expiresAfterSeconds) {
if (key != null) {
signingKey = key;
}
if (expiresAfterSeconds > 0) {
signingExpiresAfterSeconds = expiresAfterSeconds;
}
}
// Same as setJwtSigningKey, for the read key.
public synchronized void setJwtReadSigningKey(String key, long expiresAfterSeconds) {
if (key != null) {
readSigningKey = key;
}
if (expiresAfterSeconds > 0) {
readSigningExpiresAfterSeconds = expiresAfterSeconds;
}
}
// Returns the Authorization header value for an HTTP request addressed to the filer:
// a filer JWT for the access level when its key is set, else [filer.basic_auth], else
// [basic_auth]; null when none is configured. The filer reads GET and HEAD with the read key.
public String getAuthorizationHeaderValue(boolean isWrite) {
String key = isWrite ? signingKey : readSigningKey;
if (!key.isEmpty()) {
return "BEARER " + genJwtForFilerServer(key.getBytes(StandardCharsets.UTF_8),
isWrite ? signingExpiresAfterSeconds : readSigningExpiresAfterSeconds);
}
String basicAuth = basicAuthHeaderValue;
if (basicAuth != null) {
return basicAuth;
}
return FilerSecurityContext.getBasicAuthHeaderValue();
}
// Mints an HS256 token with only an "exp" claim, like security.GenJwtForFilerServer.
static String genJwtForFilerServer(byte[] signingKey, long expiresAfterSeconds) {
Base64.Encoder encoder = Base64.getUrlEncoder().withoutPadding();
long exp = System.currentTimeMillis() / 1000 + expiresAfterSeconds;
String signingInput = encoder.encodeToString("{\"alg\":\"HS256\",\"typ\":\"JWT\"}".getBytes(StandardCharsets.UTF_8))
+ "." + encoder.encodeToString(("{\"exp\":" + exp + "}").getBytes(StandardCharsets.UTF_8));
try {
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(signingKey, "HmacSHA256"));
return signingInput + "." + encoder.encodeToString(mac.doFinal(signingInput.getBytes(StandardCharsets.UTF_8)));
} catch (GeneralSecurityException e) {
throw new IllegalStateException("cannot sign filer jwt", e);
}
}
}
@@ -50,7 +50,6 @@ public class FilerGrpcClient {
private String replication = "";
private int volumeServerAccess = VOLUME_SERVER_ACCESS_DIRECT;
private String filerAddress;
private final FilerCredentials filerCredentials = new FilerCredentials(FilerSecurityContext.getFilerCredentials());
public FilerGrpcClient(String host, int port, int grpcPort, String cn) {
this(host, port, grpcPort, cn, sslContext);
@@ -155,11 +154,6 @@ public class FilerGrpcClient {
return SeaweedFilerGrpc.newFutureStub(getChannel());
}
// Credentials for this client's requests to the filer's HTTP port; changes affect only this client.
public FilerCredentials getFilerCredentials() {
return filerCredentials;
}
public void setAccessVolumeServerDirectly() {
this.volumeServerAccess = VOLUME_SERVER_ACCESS_DIRECT;
}
@@ -189,18 +183,9 @@ public class FilerGrpcClient {
case VOLUME_SERVER_ACCESS_PUBLIC_URL:
return String.format("%s://%s/%s", protocol, publicUrl, chunkId);
case VOLUME_SERVER_ACCESS_FILER_PROXY:
return proxyChunkUrlPrefix() + chunkId;
return String.format("%s://%s/?proxyChunkId=%s", protocol, this.filerAddress, chunkId);
default:
return String.format("%s://%s/%s", protocol, url, chunkId);
}
}
// Reports whether a chunk URL addresses this client's filer chunk proxy rather than a volume server.
public boolean isProxyChunkUrl(String url) {
return isAccessVolumeServerByFilerProxy() && url != null && url.startsWith(proxyChunkUrlPrefix());
}
private String proxyChunkUrlPrefix() {
return String.format("%s://%s/?proxyChunkId=", protocol, this.filerAddress);
}
}
@@ -43,8 +43,6 @@ public abstract class FilerSecurityContext extends SslContext {
// volume/proxy HTTP requests. Precomputed so per-chunk requests don't re-encode.
private static volatile String basicAuthHeaderValue;
private static final FilerCredentials filerCredentials = new FilerCredentials();
static {
String securityFileName = "security.toml";
@@ -66,11 +64,6 @@ public abstract class FilerSecurityContext extends SslContext {
basicAuthHeaderValue = computeBasicAuthHeaderValue(
toml.getString("basic_auth.username"), toml.getString("basic_auth.password"));
filerCredentials.setBasicAuth(toml.getString("filer.basic_auth.user"), toml.getString("filer.basic_auth.password"));
filerCredentials.setJwtSigningKey(toml.getString("jwt.filer_signing.key"),
toml.getLong("jwt.filer_signing.expires_after_seconds", 0L));
filerCredentials.setJwtReadSigningKey(toml.getString("jwt.filer_signing.read.key"),
toml.getLong("jwt.filer_signing.read.expires_after_seconds", 0L));
grpcTrustCertCollectionFilePath = toml.getString("grpc.ca");
logger.debug("loading gRPC ca from {}", grpcTrustCertCollectionFilePath);
@@ -93,7 +86,7 @@ public abstract class FilerSecurityContext extends SslContext {
}
}
if (toml.getBoolean("https.client.enabled", false)) {
if (toml.getBoolean("https.client.enabled")) {
httpTrustCertCollectionFilePath = toml.getString("https.client.ca");
logger.debug("loading HTTP ca from {}", httpTrustCertCollectionFilePath);
httpClientCertChainFilePath = toml.getString("https.client.cert");
@@ -153,20 +146,11 @@ public abstract class FilerSecurityContext extends SslContext {
return basicAuthHeaderValue;
}
// The filer credentials read from security.toml; each FilerClient copies them.
static FilerCredentials getFilerCredentials() {
return filerCredentials;
}
private static String computeBasicAuthHeaderValue(String username, String password) {
if (Strings.isNullOrEmpty(username)) {
return null;
}
return encodeBasicAuth(username, password == null ? "" : password);
}
static String encodeBasicAuth(String username, String password) {
String credentials = username + ":" + password;
String credentials = username + ":" + (password == null ? "" : password);
return "Basic " + Base64.getEncoder().encodeToString(credentials.getBytes(StandardCharsets.UTF_8));
}
@@ -136,7 +136,7 @@ public class SeaweedRead {
for (FilerProto.Location location : locations.getLocationsList()) {
String url = filerClient.getChunkUrl(chunkView.fileId, location.getUrl(), location.getPublicUrl());
try {
byte[] fetched = doFetchOneFullChunkData(filerClient, chunkView, url);
byte[] fetched = doFetchOneFullChunkData(chunkView, url);
// An empty (or null) body for a chunk we are reading from is never
// valid; treat it as a transient failure so the retry loop tries
// another location and backs off, rather than caching an empty chunk.
@@ -171,19 +171,15 @@ public class SeaweedRead {
}
private static byte[] doFetchOneFullChunkData(FilerClient filerClient, ChunkView chunkView, String url) throws IOException {
private static byte[] doFetchOneFullChunkData(ChunkView chunkView, String url) throws IOException {
HttpGet request = new HttpGet(url);
request.setHeader(HttpHeaders.ACCEPT_ENCODING, "gzip");
String authHeader = FilerSecurityContext.getBasicAuthHeaderValue();
if (filerClient.isProxyChunkUrl(url)) {
authHeader = filerClient.getFilerCredentials().getAuthorizationHeaderValue(false);
request.setConfig(SeaweedUtil.PROXY_CHUNK_REQUEST_CONFIG);
}
if (authHeader != null) {
request.setHeader(HttpHeaders.AUTHORIZATION, authHeader);
String basicAuthHeader = FilerSecurityContext.getBasicAuthHeaderValue();
if (basicAuthHeader != null) {
request.setHeader(HttpHeaders.AUTHORIZATION, basicAuthHeader);
}
byte[] data = null;
@@ -191,11 +187,6 @@ public class SeaweedRead {
CloseableHttpResponse response = SeaweedUtil.getClosableHttpClient().execute(request);
try {
int status = response.getStatusLine().getStatusCode();
if (status / 100 != 2) {
throw new IOException("fetch " + url + ": " + response.getStatusLine());
}
HttpEntity entity = response.getEntity();
Header contentEncodingHeader = entity.getContentEncoding();
@@ -1,6 +1,5 @@
package seaweedfs.client;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.config.Registry;
import org.apache.http.config.RegistryBuilder;
import org.apache.http.conn.socket.ConnectionSocketFactory;
@@ -91,7 +90,4 @@ public class SeaweedUtil {
}
return host + ":" + port;
}
// Redirects would carry the filer credential to the redirect target.
static final RequestConfig PROXY_CHUNK_REQUEST_CONFIG = RequestConfig.custom().setRedirectsEnabled(false).build();
}
@@ -135,7 +135,7 @@ public class SeaweedWrite {
cipherKeyString = ByteString.copyFrom(cipherKey);
}
String etag = multipartUpload(filerClient, targetUrl, auth, bytes, bytesOffset, bytesLength, cipherKey);
String etag = multipartUpload(targetUrl, auth, bytes, bytesOffset, bytesLength, cipherKey);
return FilerProto.FileChunk.newBuilder()
.setFileId(fileId)
@@ -167,8 +167,7 @@ public class SeaweedWrite {
}
}
private static String multipartUpload(FilerClient filerClient,
String targetUrl,
private static String multipartUpload(String targetUrl,
String auth,
final byte[] bytes,
final long bytesOffset, final long bytesLength,
@@ -194,14 +193,7 @@ public class SeaweedWrite {
}
HttpPost post = new HttpPost(targetUrl);
String filerAuthHeader = null;
if (filerClient.isProxyChunkUrl(targetUrl)) {
filerAuthHeader = filerClient.getFilerCredentials().getAuthorizationHeaderValue(true);
post.setConfig(SeaweedUtil.PROXY_CHUNK_REQUEST_CONFIG);
}
if (filerAuthHeader != null) {
post.addHeader("Authorization", filerAuthHeader);
} else if (auth != null && auth.length() != 0) {
if (auth != null && auth.length() != 0) {
// Volume JWT and Basic Auth both use the Authorization header; the JWT wins
// when present. Front the volume with a JWT-free path to use Basic Auth here.
post.addHeader("Authorization", "BEARER " + auth);
@@ -556,15 +556,9 @@ message AtomicRenameEntryRequest {
// already exists. Lets a caller that authorized the rename without delete
// access on an absent target stay safe if one is created concurrently.
bool fail_if_target_exists = 6;
// Set on a rename forwarded to the source's write owner, so it is not
// forwarded again.
bool is_moved = 7;
}
message AtomicRenameEntryResponse {
// Set for a forwarded rename: the owner's metadata log position of
// the rename's last event.
int64 ts_ns = 1;
}
message StreamRenameEntryRequest {
@@ -573,9 +567,6 @@ message StreamRenameEntryRequest {
string new_directory = 3;
string new_name = 4;
repeated int32 signatures = 5;
// Set on a rename forwarded to the source's write owner, so it is not
// forwarded again.
bool is_moved = 6;
}
message StreamRenameEntryResponse {
string directory = 1;
@@ -690,7 +681,6 @@ message GetFilerConfigurationResponse {
string filer_group = 13;
int32 major_version = 14;
int32 minor_version = 15;
string digest = 16; // "md5" or "sha256": the hash behind ETags and chunk digests
}
message SubscribeMetadataRequest {
@@ -1,43 +0,0 @@
package seaweedfs.client;
import org.junit.Assert;
import org.junit.Test;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
public class FileChunkManifestTest {
private static FilerProto.FileChunk chunk(int volumeId, long key, long offset, long size) {
return FilerProto.FileChunk.newBuilder()
.setFid(FilerProto.FileId.newBuilder().setVolumeId(volumeId).setFileKey(key).setCookie(1))
.setOffset(offset)
.setSize(size)
.setModifiedTsNs(1)
.build();
}
@Test
public void testCutToManifestSpanCutsAShortenedManifest() throws IOException {
List<FilerProto.FileChunk> held = Arrays.asList(chunk(9, 1, 0, 100), chunk(9, 2, 100, 100), chunk(9, 3, 200, 100));
FilerProto.FileChunk manifest = chunk(9, 4, 0, 150).toBuilder().setIsChunkManifest(true).build();
List<FilerProto.FileChunk> cut = FileChunkManifest.cutToManifestSpan(manifest, held);
Assert.assertEquals(2, cut.size());
Assert.assertEquals(held.get(0), cut.get(0));
Assert.assertEquals(100, cut.get(1).getOffset());
Assert.assertEquals(50, cut.get(1).getSize());
Assert.assertEquals(100, held.get(1).getSize());
List<SeaweedRead.VisibleInterval> visibles = ReadChunks.readResolvedChunks(cut);
Assert.assertEquals(150, visibles.get(visibles.size() - 1).stop);
}
@Test
public void testCutToManifestSpanLeavesAWholeManifestAlone() {
List<FilerProto.FileChunk> held = Arrays.asList(chunk(9, 1, 0, 100), chunk(9, 2, 100, 100));
FilerProto.FileChunk manifest = chunk(9, 4, 0, 200).toBuilder().setIsChunkManifest(true).build();
Assert.assertEquals(held, FileChunkManifest.cutToManifestSpan(manifest, held));
}
}
@@ -1,244 +0,0 @@
package seaweedfs.client;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpServer;
import io.grpc.Server;
import io.grpc.ServerBuilder;
import io.grpc.stub.StreamObserver;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
public class FilerJwtTest {
private FilerCredentials credentials;
@Before
public void clearCredentials() {
FilerSecurityContext.setBasicAuth(null, null);
credentials = new FilerCredentials();
}
@After
public void clearProxyBasicAuth() {
FilerSecurityContext.setBasicAuth(null, null);
}
@Test
public void filerJwtIsSignedHs256WithExp() throws Exception {
long before = System.currentTimeMillis() / 1000;
String token = FilerCredentials.genJwtForFilerServer("write-key".getBytes(StandardCharsets.UTF_8), 10);
long after = System.currentTimeMillis() / 1000;
String[] parts = token.split("\\.");
assertEquals(3, parts.length);
assertEquals("{\"alg\":\"HS256\",\"typ\":\"JWT\"}", decode(parts[0]));
long exp = exp(decode(parts[1]));
assertTrue(exp >= before + 10 && exp <= after + 10);
assertEquals(sign("write-key", parts[0] + "." + parts[1]), parts[2]);
assertFalse(token.contains("="));
}
@Test
public void noCredentialsMeansNoFilerHeader() {
assertNull(credentials.getAuthorizationHeaderValue(true));
assertNull(credentials.getAuthorizationHeaderValue(false));
}
@Test
public void accessLevelPicksItsSigningKey() throws Exception {
credentials.setJwtSigningKey("write-key", 0);
credentials.setJwtReadSigningKey("read-key", 0);
long now = System.currentTimeMillis() / 1000;
String[] write = bearer(credentials.getAuthorizationHeaderValue(true));
assertEquals(sign("write-key", write[0] + "." + write[1]), write[2]);
assertTrue(exp(decode(write[1])) - now <= 11);
String[] read = bearer(credentials.getAuthorizationHeaderValue(false));
assertEquals(sign("read-key", read[0] + "." + read[1]), read[2]);
assertTrue(exp(decode(read[1])) - now >= 60);
}
@Test
public void basicAuthCoversAccessLevelsWithoutKey() {
FilerSecurityContext.setBasicAuth("proxy", "proxy-pass");
assertEquals(FilerSecurityContext.getBasicAuthHeaderValue(),
credentials.getAuthorizationHeaderValue(false));
credentials.setBasicAuth("filer", "filer-pass");
String filerBasic = "Basic " + Base64.getEncoder()
.encodeToString("filer:filer-pass".getBytes(StandardCharsets.UTF_8));
assertEquals(filerBasic, credentials.getAuthorizationHeaderValue(false));
credentials.setJwtSigningKey("write-key", 5);
assertTrue(credentials.getAuthorizationHeaderValue(true).startsWith("BEARER "));
assertEquals(filerBasic, credentials.getAuthorizationHeaderValue(false));
}
@Test
public void filerBasicAuthFollowsThePassword() {
credentials.setBasicAuth("filer", "");
assertNull(credentials.getAuthorizationHeaderValue(false));
credentials.setBasicAuth("", "only-pass");
assertEquals("Basic " + Base64.getEncoder().encodeToString(":only-pass".getBytes(StandardCharsets.UTF_8)),
credentials.getAuthorizationHeaderValue(false));
}
@Test
public void nullKeepsTheCurrentValue() throws Exception {
credentials.setBasicAuth("filer", "old-pass");
credentials.setBasicAuth(null, "new-pass");
assertEquals("Basic " + Base64.getEncoder().encodeToString("filer:new-pass".getBytes(StandardCharsets.UTF_8)),
credentials.getAuthorizationHeaderValue(false));
credentials.setJwtSigningKey("write-key", 0);
credentials.setJwtSigningKey(null, 300);
long now = System.currentTimeMillis() / 1000;
String[] write = bearer(credentials.getAuthorizationHeaderValue(true));
assertEquals(sign("write-key", write[0] + "." + write[1]), write[2]);
assertTrue(exp(decode(write[1])) - now >= 300);
credentials.setJwtSigningKey("", 0);
assertTrue(credentials.getAuthorizationHeaderValue(true).startsWith("Basic "));
}
@Test
public void copiesSignIndependently() throws Exception {
credentials.setJwtSigningKey("shared-key", 0);
FilerCredentials a = new FilerCredentials(credentials);
FilerCredentials b = new FilerCredentials(credentials);
b.setJwtSigningKey("b-key", 0);
String[] fromA = bearer(a.getAuthorizationHeaderValue(true));
String[] fromB = bearer(b.getAuthorizationHeaderValue(true));
assertEquals(sign("shared-key", fromA[0] + "." + fromA[1]), fromA[2]);
assertEquals(sign("b-key", fromB[0] + "." + fromB[1]), fromB[2]);
String[] fromDefaults = bearer(credentials.getAuthorizationHeaderValue(true));
assertEquals(sign("shared-key", fromDefaults[0] + "." + fromDefaults[1]), fromDefaults[2]);
}
@Test
public void onlyFilerProxyUrlsAreFilerRequests() throws Exception {
Server filerGrpc = startFilerGrpc();
FilerClient filerClient = new FilerClient("127.0.0.1", 8888, filerGrpc.getPort(), "");
try {
String proxyUrl = "http://127.0.0.1:8888/?proxyChunkId=3,01637037d6";
assertFalse(filerClient.isProxyChunkUrl(proxyUrl));
filerClient.setAccessVolumeServerByFilerProxy();
assertEquals(proxyUrl, filerClient.getChunkUrl("3,01637037d6", "volume:8080", "volume:8080"));
assertTrue(filerClient.isProxyChunkUrl(proxyUrl));
assertFalse(filerClient.isProxyChunkUrl("http://volume:8080/3,01637037d6"));
assertFalse(filerClient.isProxyChunkUrl("http://volume:8080/?proxyChunkId=/3,01637037d6"));
assertFalse(filerClient.isProxyChunkUrl("http://127.0.0.1:8888.example/?proxyChunkId=3,01637037d6"));
assertFalse(filerClient.isProxyChunkUrl(null));
} finally {
filerClient.shutdown();
filerGrpc.shutdownNow().awaitTermination(5, TimeUnit.SECONDS);
}
}
@Test
public void proxyChunkReadDoesNotFollowRedirects() throws Exception {
AtomicInteger targetHits = new AtomicInteger();
HttpServer target = HttpServer.create(new InetSocketAddress("127.0.0.1", 0), 0);
target.createContext("/", exchange -> {
targetHits.incrementAndGet();
respond(exchange, 200, "leaked");
});
List<String> filerAuth = new CopyOnWriteArrayList<>();
HttpServer filer = HttpServer.create(new InetSocketAddress("127.0.0.1", 0), 0);
filer.createContext("/", exchange -> {
filerAuth.add(exchange.getRequestHeaders().getFirst("Authorization"));
if (filerAuth.size() == 1) {
exchange.getResponseHeaders().set("Location", "http://127.0.0.1:" + target.getAddress().getPort() + "/");
respond(exchange, 302, "");
} else {
respond(exchange, 200, "chunk");
}
});
Server filerGrpc = startFilerGrpc();
target.start();
filer.start();
FilerClient filerClient = new FilerClient("127.0.0.1", filer.getAddress().getPort(), filerGrpc.getPort(), "");
try {
filerClient.setAccessVolumeServerByFilerProxy();
filerClient.getFilerCredentials().setJwtReadSigningKey("read-key", 0);
FilerProto.Locations locations = FilerProto.Locations.newBuilder()
.addLocations(FilerProto.Location.newBuilder().setUrl("volume:8080")).build();
byte[] data = SeaweedRead.doFetchFullChunkData(filerClient,
new SeaweedRead.ChunkView("3,01637037d6", 0, 5, 0, true, null, false), locations);
assertEquals("chunk", new String(data, StandardCharsets.UTF_8));
assertEquals(0, targetHits.get());
assertEquals(2, filerAuth.size());
assertTrue(filerAuth.get(0).startsWith("BEARER "));
} finally {
filerClient.shutdown();
filerGrpc.shutdownNow().awaitTermination(5, TimeUnit.SECONDS);
filer.stop(0);
target.stop(0);
}
}
private static Server startFilerGrpc() throws IOException {
return ServerBuilder.forPort(0).addService(new SeaweedFilerGrpc.SeaweedFilerImplBase() {
@Override
public void getFilerConfiguration(FilerProto.GetFilerConfigurationRequest request,
StreamObserver<FilerProto.GetFilerConfigurationResponse> observer) {
observer.onNext(FilerProto.GetFilerConfigurationResponse.getDefaultInstance());
observer.onCompleted();
}
}).build().start();
}
private static void respond(HttpExchange exchange, int status, String body) throws IOException {
byte[] bytes = body.getBytes(StandardCharsets.UTF_8);
exchange.sendResponseHeaders(status, bytes.length == 0 ? -1 : bytes.length);
exchange.getResponseBody().write(bytes);
exchange.close();
}
private static String[] bearer(String header) {
assertTrue(header.startsWith("BEARER "));
return header.substring("BEARER ".length()).split("\\.");
}
private static String decode(String part) {
return new String(Base64.getUrlDecoder().decode(part), StandardCharsets.UTF_8);
}
private static long exp(String payload) {
Matcher m = Pattern.compile("^\\{\"exp\":(\\d+)\\}$").matcher(payload);
assertTrue(payload, m.matches());
return Long.parseLong(m.group(1));
}
private static String sign(String key, String signingInput) throws Exception {
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA256"));
return Base64.getUrlEncoder().withoutPadding()
.encodeToString(mac.doFinal(signingInput.getBytes(StandardCharsets.UTF_8)));
}
}
-69
View File
@@ -149,75 +149,6 @@ The test suite covers:
hadoop fs -put local.txt seaweedfs://localhost:8888/test/
```
### Secured filer
With `fs.seaweed.volume.server.access` set to `filerProxy`, chunk reads and writes go to the
filer's HTTP port, so they need the filer's HTTP credentials. The client signs a filer JWT
when it has the filer's `jwt.filer_signing` key (writes) or
`jwt.filer_signing.read` key (reads), and otherwise sends the `[filer.basic_auth]`
credentials. These credentials are sent only to the filer, never to volume servers. In `direct`
and `publicUrl` modes chunk requests go straight to volume servers, so the filer's HTTP
credentials are not used; writes carry the volume token from the volume assignment as before.
gRPC mTLS comes from the `[grpc]` section as before, but it does not cover these HTTP chunk requests:
to keep the credentials off plain HTTP, serve the filer HTTP port over HTTPS (`[https.filer]`
on the filer) and enable `[https.client]` here. The client checks the certificate chain but
not the host name, so set `https.client.ca` to a CA that issues certificates only for your
SeaweedFS servers.
`security.toml` (read from `./`, `~/.seaweedfs/` or `/etc/seaweedfs/`), using the filer's
own values:
```toml
[jwt.filer_signing]
key = "<filer write key>"
[jwt.filer_signing.read]
key = "<filer read key>"
# or, for a filer with Basic Auth
[filer.basic_auth]
user = "<user>"
password = "<password>"
[grpc]
ca = "/etc/seaweedfs/ca.crt"
[grpc.client]
cert = "/etc/seaweedfs/client.crt"
key = "/etc/seaweedfs/client.key"
[https.client]
enabled = true
ca = "/etc/seaweedfs/ca.crt"
cert = "/etc/seaweedfs/client.crt"
key = "/etc/seaweedfs/client.key"
```
The same values can be set in `core-site.xml`. Each option overrides only its own
`security.toml` value (for example, a password alone keeps the `security.toml` user), and
applies only to that filesystem. The secrets can also come from a Hadoop credential provider:
```xml
<property>
<name>fs.seaweed.volume.server.access</name>
<value>filerProxy</value>
</property>
<property>
<name>fs.seaweed.filer.jwt.signing.key</name>
<value>filer write key</value>
</property>
<property>
<name>fs.seaweed.filer.jwt.signing.read.key</name>
<value>filer read key</value>
</property>
<!-- token lifetimes, defaults 10 and 60 seconds:
fs.seaweed.filer.jwt.signing.expires.after.seconds
fs.seaweed.filer.jwt.signing.read.expires.after.seconds -->
<!-- or Basic Auth:
fs.seaweed.filer.basic.auth.user
fs.seaweed.filer.basic.auth.password -->
```
## Continuous Integration
For CI environments, tests can be run in two modes:
@@ -10,7 +10,6 @@ import org.apache.hadoop.util.Progressable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import seaweedfs.client.FilerProto;
import seaweedfs.client.FilerCredentials;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -31,12 +30,6 @@ public class SeaweedFileSystem extends FileSystem {
public static final String FS_SEAWEED_VOLUME_SERVER_ACCESS = "fs.seaweed.volume.server.access";
public static final int FS_SEAWEED_DEFAULT_BUFFER_SIZE = 4 * 1024 * 1024;
public static final String FS_SEAWEED_FILER_CN = "fs.seaweed.filer.cn";
public static final String FS_SEAWEED_FILER_BASIC_AUTH_USER = "fs.seaweed.filer.basic.auth.user";
public static final String FS_SEAWEED_FILER_BASIC_AUTH_PASSWORD = "fs.seaweed.filer.basic.auth.password";
public static final String FS_SEAWEED_FILER_JWT_SIGNING_KEY = "fs.seaweed.filer.jwt.signing.key";
public static final String FS_SEAWEED_FILER_JWT_SIGNING_EXPIRES = "fs.seaweed.filer.jwt.signing.expires.after.seconds";
public static final String FS_SEAWEED_FILER_JWT_SIGNING_READ_KEY = "fs.seaweed.filer.jwt.signing.read.key";
public static final String FS_SEAWEED_FILER_JWT_SIGNING_READ_EXPIRES = "fs.seaweed.filer.jwt.signing.read.expires.after.seconds";
private static final Logger LOG = LoggerFactory.getLogger(SeaweedFileSystem.class);
@@ -76,21 +69,6 @@ public class SeaweedFileSystem extends FileSystem {
seaweedFileSystemStore = new SeaweedFileSystemStore(host, port, grpcPort, cn, conf);
}
// Each option set here overrides only its own [filer.basic_auth] or [jwt.filer_signing] value of security.toml.
static void applyFilerCredentials(Configuration conf, FilerCredentials credentials) throws IOException {
credentials.setBasicAuth(conf.get(FS_SEAWEED_FILER_BASIC_AUTH_USER),
secret(conf, FS_SEAWEED_FILER_BASIC_AUTH_PASSWORD));
credentials.setJwtSigningKey(secret(conf, FS_SEAWEED_FILER_JWT_SIGNING_KEY),
conf.getLong(FS_SEAWEED_FILER_JWT_SIGNING_EXPIRES, 0));
credentials.setJwtReadSigningKey(secret(conf, FS_SEAWEED_FILER_JWT_SIGNING_READ_KEY),
conf.getLong(FS_SEAWEED_FILER_JWT_SIGNING_READ_EXPIRES, 0));
}
private static String secret(Configuration conf, String name) throws IOException {
char[] value = conf.getPassword(name);
return value == null ? null : new String(value);
}
@Override
public void close() throws IOException {
super.close();
@@ -27,15 +27,9 @@ public class SeaweedFileSystemStore {
private FilerClient filerClient;
private Configuration conf;
public SeaweedFileSystemStore(String host, int port, int grpcPort, String cn, Configuration conf) throws IOException {
public SeaweedFileSystemStore(String host, int port, int grpcPort, String cn, Configuration conf) {
filerClient = new FilerClient(host, port, grpcPort, cn);
this.conf = conf;
try {
SeaweedFileSystem.applyFilerCredentials(conf, filerClient.getFilerCredentials());
} catch (IOException | RuntimeException e) {
close();
throw e;
}
String volumeServerAccessMode = this.conf.get(FS_SEAWEED_VOLUME_SERVER_ACCESS, "direct");
if (volumeServerAccessMode.equals("publicUrl")) {
filerClient.setAccessVolumeServerByPublicUrl();
@@ -4,12 +4,6 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.junit.Before;
import org.junit.Test;
import seaweedfs.client.FilerCredentials;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import static org.junit.Assert.*;
@@ -93,57 +87,4 @@ public class SeaweedFileSystemConfigTest {
// Test default port constant
assertEquals(8888, SeaweedFileSystem.FS_SEAWEED_DEFAULT_PORT);
}
@Test
public void testFilerCredentialsFromConfiguration() throws Exception {
FilerCredentials credentials = new FilerCredentials();
conf.set(SeaweedFileSystem.FS_SEAWEED_FILER_BASIC_AUTH_USER, "alice");
conf.set(SeaweedFileSystem.FS_SEAWEED_FILER_BASIC_AUTH_PASSWORD, "s3cret");
SeaweedFileSystem.applyFilerCredentials(conf, credentials);
String basic = "Basic " + Base64.getEncoder().encodeToString("alice:s3cret".getBytes(StandardCharsets.UTF_8));
assertEquals(basic, credentials.getAuthorizationHeaderValue(true));
conf.set(SeaweedFileSystem.FS_SEAWEED_FILER_JWT_SIGNING_KEY, "write-key");
conf.setLong(SeaweedFileSystem.FS_SEAWEED_FILER_JWT_SIGNING_EXPIRES, 120);
SeaweedFileSystem.applyFilerCredentials(conf, credentials);
long now = System.currentTimeMillis() / 1000;
assertTrue(signedExp(credentials.getAuthorizationHeaderValue(true), "write-key") - now >= 119);
assertEquals(basic, credentials.getAuthorizationHeaderValue(false));
conf.set(SeaweedFileSystem.FS_SEAWEED_FILER_JWT_SIGNING_READ_KEY, "read-key");
conf.setLong(SeaweedFileSystem.FS_SEAWEED_FILER_JWT_SIGNING_READ_EXPIRES, 240);
SeaweedFileSystem.applyFilerCredentials(conf, credentials);
long readExp = signedExp(credentials.getAuthorizationHeaderValue(false), "read-key") - now;
assertTrue(readExp >= 239 && readExp <= 245);
long writeExp = signedExp(credentials.getAuthorizationHeaderValue(true), "write-key") - now;
assertTrue(writeExp >= 119 && writeExp <= 125);
}
@Test
public void testFilerCredentialOptionsOverrideOneValueEach() throws Exception {
FilerCredentials credentials = new FilerCredentials();
credentials.setBasicAuth("toml-user", "toml-pass");
credentials.setJwtReadSigningKey("toml-read-key", 0);
conf.set(SeaweedFileSystem.FS_SEAWEED_FILER_BASIC_AUTH_PASSWORD, "new-pass");
conf.setLong(SeaweedFileSystem.FS_SEAWEED_FILER_JWT_SIGNING_READ_EXPIRES, 300);
SeaweedFileSystem.applyFilerCredentials(conf, credentials);
assertEquals("Basic " + Base64.getEncoder().encodeToString("toml-user:new-pass".getBytes(StandardCharsets.UTF_8)),
credentials.getAuthorizationHeaderValue(true));
long exp = signedExp(credentials.getAuthorizationHeaderValue(false), "toml-read-key");
assertTrue(exp - System.currentTimeMillis() / 1000 >= 299);
}
// Asserts the header is a filer JWT signed with key and returns its exp claim.
private static long signedExp(String header, String key) throws Exception {
assertTrue(header, header.startsWith("BEARER "));
String[] parts = header.substring("BEARER ".length()).split("\\.");
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA256"));
assertEquals(Base64.getUrlEncoder().withoutPadding().encodeToString(
mac.doFinal((parts[0] + "." + parts[1]).getBytes(StandardCharsets.UTF_8))), parts[2]);
String payload = new String(Base64.getUrlDecoder().decode(parts[1]), StandardCharsets.UTF_8);
return Long.parseLong(payload.replaceAll("[^0-9]", ""));
}
}
File diff suppressed because it is too large. Load diff
-2
View File
@@ -1,2 +0,0 @@
*.sh text eol=lf
core/chunkkernel/chunk-kernel-2.tsv text eol=lf
-47
View File
@@ -1,47 +0,0 @@
# Model citations for mapped files
The spec-trace workflow reads `model-code-trace.tsv` and the validator from
the target branch. A PR cannot replace its own mapping or checker.
Each non-comment line has two tab-separated columns: an exact repository
path and `Module.Action`. Repeat a path to list alternative actions that
cover it. Paths are case-sensitive; directories and glob patterns are not
expanded. Missing, empty or malformed mappings refuse the check.
The reviewed map uses the neutral public module names: `SnapshotRemoval`,
`RestoreTarget`, `HolderInterface`, `EngineAdapter`, `StopAndRestart`,
`MoveAdmission`, `Promotion`, `ProbeRound`, `FencingRound`, `VolumeCreate`,
`ReplicationPeer` and `RestoreCommand`.
Actions name top-level definitions used by the corresponding model's `Next`.
The mapping is the source of accepted citations; private model names and
storage locations do not belong in the public map or PR description.
For every changed mapped path, including deletions, the PR's `Model:` line
must contain a listed action or `NONE (pure function of Module)` for that
module. Separate multiple citations with semicolons, for example:
```text
Model: EngineAdapter.Begin; MoveAdmission.Revoke; NONE (pure function of RestoreTarget)
```
Unmapped paths keep the existing spec-trace policy. The pure-function
declaration is a review claim; CI checks its module, not its truth.
## Adding a model or file
1. Have the model owner confirm its neutral public module name and the
top-level action definitions used by `Next`. Use those names in public
code, mapping rows and PR descriptions.
2. Add an exact-path TSV row for each implementation and enforcement file
that the action covers. Split actions get separate rows. Include receiving
guards as well as senders; a reviewer checks that each file really enforces
the cited action. Environment actions without a Go site and mutant test
obligations are not implementation mappings.
3. Add controls for accepted and refused citations when extending the
checker. For mapping additions, check the real map against representative
affected paths. Run `python3 -B .github/scripts/model-trace-check-test.py`
and `bash .github/scripts/spec-trace-check-test.sh` on Linux.
4. Submit the map and its evidence for review with the model change or before
its callers land. The PR description cites the applicable public actions.
The new rows govern later PRs once they are on the target branch; changing
a PR's own map never changes the check that evaluates that PR.
-208
View File
@@ -1,208 +0,0 @@
# Exact repository-relative path<TAB>Module.Action; repeat a path for alternatives.
cmd/sw-block/volume_backup.go RestoreCommand.Abort
cmd/sw-block/volume_backup.go RestoreCommand.AbortVerify
cmd/sw-block/volume_backup.go RestoreCommand.Run
cmd/sw-block/volume_backup.go RestoreCommand.Start
core/authority/workspace.go HolderInterface.ForcedMove
core/authority/workspace.go HolderInterface.PlannedMove
core/authority/workspace.go MoveAdmission.Ack
core/authority/workspace.go MoveAdmission.IssueClean
core/authority/workspace.go MoveAdmission.IssueForced
core/authority/workspace.go MoveAdmission.Lease2Ends
core/authority/workspace.go MoveAdmission.LeaseEnds
core/authority/workspace.go MoveAdmission.ReadForMove
core/authority/workspace.go MoveAdmission.Revoke
core/authority/workspace.go StopAndRestart.IssueClean
core/authority/workspace.go StopAndRestart.IssueForced
core/authority/workspace.go StopAndRestart.LeaseEnds
core/authority/workspace.go StopAndRestart.ReadForced
core/authority/workspace_delete_reservation.go MoveAdmission.DelCheck
core/authority/workspace_delete_reservation.go MoveAdmission.Reserve
core/authority/workspace_lease_view.go HolderInterface.Grant
core/authority/workspace_lease_view.go HolderInterface.Regrant
core/engine/apply.go ReplicationPeer.Reconcile
core/frontend/chunkstore/layout/claim.go EngineAdapter.Takeover
core/frontend/chunkstore/layout/claim.go MoveAdmission.ClaimB
core/frontend/chunkstore/layout/claim.go SnapshotRemoval.Claim
core/frontend/chunkstore/layout/claim.go StopAndRestart.ClaimB
core/frontend/chunkstore/layout/clean.go EngineAdapter.MaintBegin
core/frontend/chunkstore/layout/clean.go EngineAdapter.MaintEnd
core/frontend/chunkstore/layout/clean.go SnapshotRemoval.BeginClean
core/frontend/chunkstore/layout/clean.go SnapshotRemoval.EndClean
core/frontend/chunkstore/layout/commit.go EngineAdapter.Apply
core/frontend/chunkstore/layout/commit.go SnapshotRemoval.Commit
core/frontend/chunkstore/layout/commit.go VolumeCreate.Commit
core/frontend/chunkstore/layout/create.go RestoreTarget.CreateHead
core/frontend/chunkstore/layout/create.go RestoreTarget.CreateVol
core/frontend/chunkstore/layout/create.go VolumeCreate.Claim
core/frontend/chunkstore/layout/delete.go MoveAdmission.DelMark
core/frontend/chunkstore/layout/delete.go MoveAdmission.DelRead
core/frontend/chunkstore/layout/delete.go RestoreTarget.OpRelease
core/frontend/chunkstore/layout/delete.go RestoreTarget.OpTomb
core/frontend/chunkstore/layout/head.go SnapshotRemoval.Abort
core/frontend/chunkstore/layout/head.go SnapshotRemoval.Begin
core/frontend/chunkstore/layout/head.go StopAndRestart.Apply
core/frontend/chunkstore/layout/head.go StopAndRestart.Begin
core/frontend/chunkstore/layout/objects.go SnapshotRemoval.Upload
core/frontend/chunkstore/layout/remove.go SnapshotRemoval.Issue
core/frontend/chunkstore/layout/remove.go SnapshotRemoval.Stat
core/frontend/chunkstore/layout/remove.go SnapshotRemoval.Validate
core/frontend/chunkstore/layout/snapshots.go EngineAdapter.OpWrite
core/frontend/chunkstore/layout/snapshots.go MoveAdmission.OpWrite
core/frontend/chunkstore/layout/snapshots.go RestoreTarget.AddDep
core/frontend/chunkstore/layout/snapshots.go SnapshotRemoval.DeleteSnap
core/frontend/chunkstore/layout/start.go HolderInterface.Start
core/frontend/chunkstore/layout/start.go StopAndRestart.CrashRestart
core/frontend/chunkstore/layout/start.go VolumeCreate.Claim
core/frontend/chunkstore/layout_create.go VolumeCreate.IssueHead
core/frontend/chunkstore/layout_create.go VolumeCreate.IssueVol
core/frontend/chunkstore/layout_remote.go EngineAdapter.Begin
core/frontend/chunkstore/layout_remote.go EngineAdapter.ReadHead
core/frontend/chunkstore/layout_remote.go EngineAdapter.SendCommit
core/frontend/chunkstore/layout_remote.go EngineAdapter.SettleAbort
core/frontend/chunkstore/layout_remote.go EngineAdapter.TakeAbandon
core/frontend/chunkstore/layout_remote.go StopAndRestart.SendCommit
core/frontend/chunkstore/layout_remote.go StopAndRestart.SettleAbort
core/frontend/chunkstore/layout_store.go SnapshotRemoval.ApplyDelete
core/frontend/chunkstore/layout_store.go SnapshotRemoval.ApplyMark
core/frontend/chunkstore/swfs.go VolumeCreate.Land
core/frontend/durable/provider_chunk.go EngineAdapter.SettleResume
core/frontend/durable/provider_chunk.go EngineAdapter.StartStop
core/frontend/durable/provider_chunk.go HolderInterface.StopBegin
core/frontend/durable/provider_chunk.go StopAndRestart.SendDetach
core/frontend/durable/provider_chunk.go StopAndRestart.SettleResume
core/frontend/durable/provider_layout.go EngineAdapter.SettleDown
core/frontend/durable/provider_layout.go StopAndRestart.SettleDown
core/frontend/durable/storage_adapter.go EngineAdapter.GuestWrite
core/frontend/durable/storage_adapter.go HolderInterface.Write
core/host/master/layout_ready.go VolumeCreate.Place
core/host/master/probe_round.go FencingRound.Deliver
core/host/master/probe_round.go FencingRound.Open
core/host/master/product_loop.go FencingRound.Decide
core/host/master/product_loop.go Promotion.Decide
core/host/master/store_attestation.go ReplicationPeer.Attest
core/host/master/workspace_service.go MoveAdmission.ReadForMove
core/host/master/workspace_service.go StopAndRestart.ReadClean
core/host/volume/primary_evidence.go FencingRound.Adopt
core/host/volume/primary_evidence.go Promotion.Adopt
core/host/volume/primary_evidence.go Promotion.Refuse
core/host/volume/probe_round.go FencingRound.Answer
core/host/volume/workspace_lease.go HolderInterface.Expire
core/host/volume/workspace_lease.go MoveAdmission.StopOnExpiry
core/host/volume/workspace_lease.go MoveAdmission.Write
core/host/volume/workspace_lease.go SnapshotRemoval.Expire
core/host/volume/workspace_lease.go StopAndRestart.Write
core/lifecycle/store.go VolumeCreate.MarkReady
core/lifecycle/store.go VolumeCreate.Record
core/replication/peer.go Promotion.Ship1
core/replication/peer.go Promotion.Ship2
core/replication/peer.go ReplicationPeer.Barrier
core/replication/peer.go ReplicationPeer.Fail
core/replication/peer.go ReplicationPeer.Heal
core/replication/peer.go ReplicationPeer.Ship
core/replication/volume.go FencingRound.Ack
core/replication/volume.go Promotion.Ack1
core/replication/volume.go Promotion.Rejoin
core/replication/volume.go Promotion.Write1
core/replication/volume.go Promotion.Write2
core/replication/volume.go ReplicationPeer.Ack
core/replication/volume.go ReplicationPeer.Write
core/storage/chunk_head_belt.go HolderInterface.Fence
core/storage/chunk_layer.go EngineAdapter.EngineReRead
core/storage/chunk_layer.go EngineAdapter.NoOpCut
core/storage/chunk_layer.go HolderInterface.Commit
core/storage/chunk_layer.go HolderInterface.StopCommit
core/storage/chunk_layer.go MoveAdmission.Detach
core/storage/chunk_layer.go MoveAdmission.Publish
core/storage/chunk_layer.go SnapshotRemoval.Write
core/storage/chunk_state_upgrade.go SlotFence.Publish
core/storage/chunk_state_upgrade.go SlotFence.Sync
core/transport/catchup_sender.go ReplicationPeer.CatchUp
core/transport/rebuild_sender.go ReplicationPeer.Rebuild
core/transport/replica.go FencingRound.Recv
core/transport/replica.go ReplicationPeer.CatchUp
core/transport/replica.go ReplicationPeer.Rebuild
core/transport/replica.go ReplicationPeer.Ship
core/storage/chunk_coverage.go SlotFence.Publish
core/storage/chunk_coverage_map.go MoveWide2.Write
core/storage/walstore_v3.go SlotFence2.OpenNew
core/frontend/chunkstore/snapshot_operation.go SnapOps.Send
core/frontend/chunkstore/snapshot_operation.go SnapOps.TornAdmit
core/frontend/chunkstore/snapshot_operation.go SnapOps.Retire
core/frontend/chunkstore/snapshot_operation_index.go SnapOps.TermFlag
core/frontend/chunkstore/snapshot_operation_index.go SnapOps.GC
core/frontend/chunkstore/snapshot_operation_index.go SnapOps.Poll
core/frontend/chunkstore/snapshot_operation_guard.go SnapOps.Publish
core/frontend/chunkstore/snapshot_operation_guard.go SnapOps.Delete
core/host/volume/chunk_control.go SnapOps.Start
cmd/sw-block/snapshot_operation.go SnapOps.Send
core/host/volume/snapshot_operation.go SnapOps.Start
cmd/blockvolume/snapshot_operation_shutdown.go SnapOps.Stall
core/frontend/chunkstore/snapshot_delete_operation.go SnapDelete.Send
core/storage/wal_admission_fast.go WALHold.FastArrive
core/storage/wal_admission_fast.go WALHold.FastReEnter
core/storage/wal_admission_fast.go WALHold.FastResubmit
core/storage/wal_admission.go WALHold.Arrive
core/storage/wal_admission_fifo.go WALHold.Arrive
core/storage/wal_admission_fifo.go WALHold.ReEnter
core/storage/wal_admission_fifo.go WALHold.Admit
core/storage/walstore.go WALHold.Admit
core/frontend/durable/storage_adapter.go WALHold.Resubmit
core/storage/flusher.go WALHold.Reclaim
core/storage/wal_hold_window.go WALHold.Stall
core/storage/wal_write_hold.go WALHold.Stall
core/storage/wal_hold_window.go WALHold.CapAnswer
core/storage/wal_write_hold.go WALHold.CapAnswer
core/frontend/nvme/io.go WALHold.Stall
core/frontend/iscsi/scsi.go WALHold.Stall
core/host/master/format_gate.go FormatGate.Finalize
core/host/master/format_gate.go FormatGate.Place
core/host/master/workspace_service.go FormatGate.Place
core/host/master/format_gate.go FormatGate.Grant
core/host/master/workspace_binding.go FormatGate.Grant
core/host/master/format_gate.go FormatGate.Report
core/host/master/services.go FormatGate.Report
core/host/master/format_gate.go FormatGate.Retire
core/host/volume/host.go FormatGate.Upgrade
core/host/volume/host.go FormatGate.Downgrade
core/frontend/chunkstore/layout/format_level.go FormatGate.Upgrade1
core/frontend/chunkstore/layout/format_level.go FormatGate.PublishOp
core/frontend/chunkstore/snapshot_delete_target.go FormatGate.AdmitOp
core/frontend/chunkstore/snapshot_delete_operation.go FormatGate.AdmitOp
core/storage/recovery_progress.go RecoveryProgress.Replay
core/host/volume/recovery_watchdog.go RecoveryProgress.Replay
core/storage/walstore_v3.go RecoveryProgress.Fence
core/host/volume/recovery_watchdog.go RecoveryProgress.Fence
core/host/volume/recovery_watchdog.go RecoveryProgress.ToFence
core/host/volume/recovery_watchdog.go RecoveryProgress.Authority
core/host/volume/recovery_watchdog.go RecoveryProgress.Stall
core/frontend/chunkstore/layout/delete_intent.go PageChain.WritePage
core/frontend/chunkstore/layout/list_chain.go PageChain.WritePage
core/frontend/chunkstore/layout/delete_intent.go PageChain.Send
core/frontend/chunkstore/layout/list_chain.go PageChain.Send
core/frontend/chunkstore/layout/delete_intent.go PageChain.Resend
core/frontend/chunkstore/layout/list_chain.go PageChain.Resend
core/frontend/chunkstore/layout/delete_intent.go PageChain.CRead
core/frontend/chunkstore/layout/list_chain.go PageChain.CRead
core/frontend/chunkstore/layout/delete_intent.go PageChain.CApply
core/frontend/chunkstore/layout/delete_intent.go PageChain.CAdvance
core/frontend/chunkstore/layout/list_chain.go PageChain.CAdvance
core/frontend/chunkstore/layout/delete_intent.go PageChain.CResolve
core/frontend/chunkstore/layout/list_chain.go PageChain.CResolve
core/frontend/chunkstore/clean_intent_b.go PageChain.CRead
core/frontend/chunkstore/layout_remote.go PageChain.CRead
core/frontend/chunkstore/layout/remove.go PageChain.Sweep
core/frontend/chunkstore/clean_b.go PageChain.Sweep
core/frontend/chunkstore/layout/remove.go StaleClean.Stat
core/frontend/chunkstore/layout/remove.go StaleClean.HeadRead
core/frontend/chunkstore/layout/remove.go StaleClean.MarkIt
core/frontend/chunkstore/layout/remove.go StaleClean.DeleteIt
core/frontend/chunkstore/layout_store.go StaleClean.Adopt
core/frontend/chunkstore/layout/commit.go StaleClean.HeadCommit
core/frontend/chunkstore/layout/commit.go StaleClean.CommitCheck
core/frontend/chunkstore/layout/delete_intent.go QueueCap.Produce
core/frontend/chunkstore/layout/list_chain.go QueueCap.Produce
core/frontend/chunkstore/layout/delete_intent.go QueueCap.Consume
core/frontend/chunkstore/clean_intent_b.go QueueCap.Consume
core/frontend/chunkstore/layout/commit.go QueueCap.TakeBack
1 # Exact repository-relative path<TAB>Module.Action; repeat a path for alternatives.
2 cmd/sw-block/volume_backup.go RestoreCommand.Abort
3 cmd/sw-block/volume_backup.go RestoreCommand.AbortVerify
4 cmd/sw-block/volume_backup.go RestoreCommand.Run
5 cmd/sw-block/volume_backup.go RestoreCommand.Start
6 core/authority/workspace.go HolderInterface.ForcedMove
7 core/authority/workspace.go HolderInterface.PlannedMove
8 core/authority/workspace.go MoveAdmission.Ack
9 core/authority/workspace.go MoveAdmission.IssueClean
10 core/authority/workspace.go MoveAdmission.IssueForced
11 core/authority/workspace.go MoveAdmission.Lease2Ends
12 core/authority/workspace.go MoveAdmission.LeaseEnds
13 core/authority/workspace.go MoveAdmission.ReadForMove
14 core/authority/workspace.go MoveAdmission.Revoke
15 core/authority/workspace.go StopAndRestart.IssueClean
16 core/authority/workspace.go StopAndRestart.IssueForced
17 core/authority/workspace.go StopAndRestart.LeaseEnds
18 core/authority/workspace.go StopAndRestart.ReadForced
19 core/authority/workspace_delete_reservation.go MoveAdmission.DelCheck
20 core/authority/workspace_delete_reservation.go MoveAdmission.Reserve
21 core/authority/workspace_lease_view.go HolderInterface.Grant
22 core/authority/workspace_lease_view.go HolderInterface.Regrant
23 core/engine/apply.go ReplicationPeer.Reconcile
24 core/frontend/chunkstore/layout/claim.go EngineAdapter.Takeover
25 core/frontend/chunkstore/layout/claim.go MoveAdmission.ClaimB
26 core/frontend/chunkstore/layout/claim.go SnapshotRemoval.Claim
27 core/frontend/chunkstore/layout/claim.go StopAndRestart.ClaimB
28 core/frontend/chunkstore/layout/clean.go EngineAdapter.MaintBegin
29 core/frontend/chunkstore/layout/clean.go EngineAdapter.MaintEnd
30 core/frontend/chunkstore/layout/clean.go SnapshotRemoval.BeginClean
31 core/frontend/chunkstore/layout/clean.go SnapshotRemoval.EndClean
32 core/frontend/chunkstore/layout/commit.go EngineAdapter.Apply
33 core/frontend/chunkstore/layout/commit.go SnapshotRemoval.Commit
34 core/frontend/chunkstore/layout/commit.go VolumeCreate.Commit
35 core/frontend/chunkstore/layout/create.go RestoreTarget.CreateHead
36 core/frontend/chunkstore/layout/create.go RestoreTarget.CreateVol
37 core/frontend/chunkstore/layout/create.go VolumeCreate.Claim
38 core/frontend/chunkstore/layout/delete.go MoveAdmission.DelMark
39 core/frontend/chunkstore/layout/delete.go MoveAdmission.DelRead
40 core/frontend/chunkstore/layout/delete.go RestoreTarget.OpRelease
41 core/frontend/chunkstore/layout/delete.go RestoreTarget.OpTomb
42 core/frontend/chunkstore/layout/head.go SnapshotRemoval.Abort
43 core/frontend/chunkstore/layout/head.go SnapshotRemoval.Begin
44 core/frontend/chunkstore/layout/head.go StopAndRestart.Apply
45 core/frontend/chunkstore/layout/head.go StopAndRestart.Begin
46 core/frontend/chunkstore/layout/objects.go SnapshotRemoval.Upload
47 core/frontend/chunkstore/layout/remove.go SnapshotRemoval.Issue
48 core/frontend/chunkstore/layout/remove.go SnapshotRemoval.Stat
49 core/frontend/chunkstore/layout/remove.go SnapshotRemoval.Validate
50 core/frontend/chunkstore/layout/snapshots.go EngineAdapter.OpWrite
51 core/frontend/chunkstore/layout/snapshots.go MoveAdmission.OpWrite
52 core/frontend/chunkstore/layout/snapshots.go RestoreTarget.AddDep
53 core/frontend/chunkstore/layout/snapshots.go SnapshotRemoval.DeleteSnap
54 core/frontend/chunkstore/layout/start.go HolderInterface.Start
55 core/frontend/chunkstore/layout/start.go StopAndRestart.CrashRestart
56 core/frontend/chunkstore/layout/start.go VolumeCreate.Claim
57 core/frontend/chunkstore/layout_create.go VolumeCreate.IssueHead
58 core/frontend/chunkstore/layout_create.go VolumeCreate.IssueVol
59 core/frontend/chunkstore/layout_remote.go EngineAdapter.Begin
60 core/frontend/chunkstore/layout_remote.go EngineAdapter.ReadHead
61 core/frontend/chunkstore/layout_remote.go EngineAdapter.SendCommit
62 core/frontend/chunkstore/layout_remote.go EngineAdapter.SettleAbort
63 core/frontend/chunkstore/layout_remote.go EngineAdapter.TakeAbandon
64 core/frontend/chunkstore/layout_remote.go StopAndRestart.SendCommit
65 core/frontend/chunkstore/layout_remote.go StopAndRestart.SettleAbort
66 core/frontend/chunkstore/layout_store.go SnapshotRemoval.ApplyDelete
67 core/frontend/chunkstore/layout_store.go SnapshotRemoval.ApplyMark
68 core/frontend/chunkstore/swfs.go VolumeCreate.Land
69 core/frontend/durable/provider_chunk.go EngineAdapter.SettleResume
70 core/frontend/durable/provider_chunk.go EngineAdapter.StartStop
71 core/frontend/durable/provider_chunk.go HolderInterface.StopBegin
72 core/frontend/durable/provider_chunk.go StopAndRestart.SendDetach
73 core/frontend/durable/provider_chunk.go StopAndRestart.SettleResume
74 core/frontend/durable/provider_layout.go EngineAdapter.SettleDown
75 core/frontend/durable/provider_layout.go StopAndRestart.SettleDown
76 core/frontend/durable/storage_adapter.go EngineAdapter.GuestWrite
77 core/frontend/durable/storage_adapter.go HolderInterface.Write
78 core/host/master/layout_ready.go VolumeCreate.Place
79 core/host/master/probe_round.go FencingRound.Deliver
80 core/host/master/probe_round.go FencingRound.Open
81 core/host/master/product_loop.go FencingRound.Decide
82 core/host/master/product_loop.go Promotion.Decide
83 core/host/master/store_attestation.go ReplicationPeer.Attest
84 core/host/master/workspace_service.go MoveAdmission.ReadForMove
85 core/host/master/workspace_service.go StopAndRestart.ReadClean
86 core/host/volume/primary_evidence.go FencingRound.Adopt
87 core/host/volume/primary_evidence.go Promotion.Adopt
88 core/host/volume/primary_evidence.go Promotion.Refuse
89 core/host/volume/probe_round.go FencingRound.Answer
90 core/host/volume/workspace_lease.go HolderInterface.Expire
91 core/host/volume/workspace_lease.go MoveAdmission.StopOnExpiry
92 core/host/volume/workspace_lease.go MoveAdmission.Write
93 core/host/volume/workspace_lease.go SnapshotRemoval.Expire
94 core/host/volume/workspace_lease.go StopAndRestart.Write
95 core/lifecycle/store.go VolumeCreate.MarkReady
96 core/lifecycle/store.go VolumeCreate.Record
97 core/replication/peer.go Promotion.Ship1
98 core/replication/peer.go Promotion.Ship2
99 core/replication/peer.go ReplicationPeer.Barrier
100 core/replication/peer.go ReplicationPeer.Fail
101 core/replication/peer.go ReplicationPeer.Heal
102 core/replication/peer.go ReplicationPeer.Ship
103 core/replication/volume.go FencingRound.Ack
104 core/replication/volume.go Promotion.Ack1
105 core/replication/volume.go Promotion.Rejoin
106 core/replication/volume.go Promotion.Write1
107 core/replication/volume.go Promotion.Write2
108 core/replication/volume.go ReplicationPeer.Ack
109 core/replication/volume.go ReplicationPeer.Write
110 core/storage/chunk_head_belt.go HolderInterface.Fence
111 core/storage/chunk_layer.go EngineAdapter.EngineReRead
112 core/storage/chunk_layer.go EngineAdapter.NoOpCut
113 core/storage/chunk_layer.go HolderInterface.Commit
114 core/storage/chunk_layer.go HolderInterface.StopCommit
115 core/storage/chunk_layer.go MoveAdmission.Detach
116 core/storage/chunk_layer.go MoveAdmission.Publish
117 core/storage/chunk_layer.go SnapshotRemoval.Write
118 core/storage/chunk_state_upgrade.go SlotFence.Publish
119 core/storage/chunk_state_upgrade.go SlotFence.Sync
120 core/transport/catchup_sender.go ReplicationPeer.CatchUp
121 core/transport/rebuild_sender.go ReplicationPeer.Rebuild
122 core/transport/replica.go FencingRound.Recv
123 core/transport/replica.go ReplicationPeer.CatchUp
124 core/transport/replica.go ReplicationPeer.Rebuild
125 core/transport/replica.go ReplicationPeer.Ship
126 core/storage/chunk_coverage.go SlotFence.Publish
127 core/storage/chunk_coverage_map.go MoveWide2.Write
128 core/storage/walstore_v3.go SlotFence2.OpenNew
129 core/frontend/chunkstore/snapshot_operation.go SnapOps.Send
130 core/frontend/chunkstore/snapshot_operation.go SnapOps.TornAdmit
131 core/frontend/chunkstore/snapshot_operation.go SnapOps.Retire
132 core/frontend/chunkstore/snapshot_operation_index.go SnapOps.TermFlag
133 core/frontend/chunkstore/snapshot_operation_index.go SnapOps.GC
134 core/frontend/chunkstore/snapshot_operation_index.go SnapOps.Poll
135 core/frontend/chunkstore/snapshot_operation_guard.go SnapOps.Publish
136 core/frontend/chunkstore/snapshot_operation_guard.go SnapOps.Delete
137 core/host/volume/chunk_control.go SnapOps.Start
138 cmd/sw-block/snapshot_operation.go SnapOps.Send
139 core/host/volume/snapshot_operation.go SnapOps.Start
140 cmd/blockvolume/snapshot_operation_shutdown.go SnapOps.Stall
141 core/frontend/chunkstore/snapshot_delete_operation.go SnapDelete.Send
142 core/storage/wal_admission_fast.go WALHold.FastArrive
143 core/storage/wal_admission_fast.go WALHold.FastReEnter
144 core/storage/wal_admission_fast.go WALHold.FastResubmit
145 core/storage/wal_admission.go WALHold.Arrive
146 core/storage/wal_admission_fifo.go WALHold.Arrive
147 core/storage/wal_admission_fifo.go WALHold.ReEnter
148 core/storage/wal_admission_fifo.go WALHold.Admit
149 core/storage/walstore.go WALHold.Admit
150 core/frontend/durable/storage_adapter.go WALHold.Resubmit
151 core/storage/flusher.go WALHold.Reclaim
152 core/storage/wal_hold_window.go WALHold.Stall
153 core/storage/wal_write_hold.go WALHold.Stall
154 core/storage/wal_hold_window.go WALHold.CapAnswer
155 core/storage/wal_write_hold.go WALHold.CapAnswer
156 core/frontend/nvme/io.go WALHold.Stall
157 core/frontend/iscsi/scsi.go WALHold.Stall
158 core/host/master/format_gate.go FormatGate.Finalize
159 core/host/master/format_gate.go FormatGate.Place
160 core/host/master/workspace_service.go FormatGate.Place
161 core/host/master/format_gate.go FormatGate.Grant
162 core/host/master/workspace_binding.go FormatGate.Grant
163 core/host/master/format_gate.go FormatGate.Report
164 core/host/master/services.go FormatGate.Report
165 core/host/master/format_gate.go FormatGate.Retire
166 core/host/volume/host.go FormatGate.Upgrade
167 core/host/volume/host.go FormatGate.Downgrade
168 core/frontend/chunkstore/layout/format_level.go FormatGate.Upgrade1
169 core/frontend/chunkstore/layout/format_level.go FormatGate.PublishOp
170 core/frontend/chunkstore/snapshot_delete_target.go FormatGate.AdmitOp
171 core/frontend/chunkstore/snapshot_delete_operation.go FormatGate.AdmitOp
172 core/storage/recovery_progress.go RecoveryProgress.Replay
173 core/host/volume/recovery_watchdog.go RecoveryProgress.Replay
174 core/storage/walstore_v3.go RecoveryProgress.Fence
175 core/host/volume/recovery_watchdog.go RecoveryProgress.Fence
176 core/host/volume/recovery_watchdog.go RecoveryProgress.ToFence
177 core/host/volume/recovery_watchdog.go RecoveryProgress.Authority
178 core/host/volume/recovery_watchdog.go RecoveryProgress.Stall
179 core/frontend/chunkstore/layout/delete_intent.go PageChain.WritePage
180 core/frontend/chunkstore/layout/list_chain.go PageChain.WritePage
181 core/frontend/chunkstore/layout/delete_intent.go PageChain.Send
182 core/frontend/chunkstore/layout/list_chain.go PageChain.Send
183 core/frontend/chunkstore/layout/delete_intent.go PageChain.Resend
184 core/frontend/chunkstore/layout/list_chain.go PageChain.Resend
185 core/frontend/chunkstore/layout/delete_intent.go PageChain.CRead
186 core/frontend/chunkstore/layout/list_chain.go PageChain.CRead
187 core/frontend/chunkstore/layout/delete_intent.go PageChain.CApply
188 core/frontend/chunkstore/layout/delete_intent.go PageChain.CAdvance
189 core/frontend/chunkstore/layout/list_chain.go PageChain.CAdvance
190 core/frontend/chunkstore/layout/delete_intent.go PageChain.CResolve
191 core/frontend/chunkstore/layout/list_chain.go PageChain.CResolve
192 core/frontend/chunkstore/clean_intent_b.go PageChain.CRead
193 core/frontend/chunkstore/layout_remote.go PageChain.CRead
194 core/frontend/chunkstore/layout/remove.go PageChain.Sweep
195 core/frontend/chunkstore/clean_b.go PageChain.Sweep
196 core/frontend/chunkstore/layout/remove.go StaleClean.Stat
197 core/frontend/chunkstore/layout/remove.go StaleClean.HeadRead
198 core/frontend/chunkstore/layout/remove.go StaleClean.MarkIt
199 core/frontend/chunkstore/layout/remove.go StaleClean.DeleteIt
200 core/frontend/chunkstore/layout_store.go StaleClean.Adopt
201 core/frontend/chunkstore/layout/commit.go StaleClean.HeadCommit
202 core/frontend/chunkstore/layout/commit.go StaleClean.CommitCheck
203 core/frontend/chunkstore/layout/delete_intent.go QueueCap.Produce
204 core/frontend/chunkstore/layout/list_chain.go QueueCap.Produce
205 core/frontend/chunkstore/layout/delete_intent.go QueueCap.Consume
206 core/frontend/chunkstore/clean_intent_b.go QueueCap.Consume
207 core/frontend/chunkstore/layout/commit.go QueueCap.TakeBack
-94
View File
@@ -1,94 +0,0 @@
# What a PR labelled "post-merge-review" may touch.
#
# A labelled PR passes the "post-merge-review paths" check only if EVERY
# changed file (both names of a rename) matches an allow line and no "!"
# line. Anything not allowed is denied: new files start denied. A PR that
# fails keeps the full review before merge. Without the label the check
# passes and nothing changes.
#
# One bash glob per line, matched against the repo-relative path; "*" also
# matches "/". A line starting with "!" denies, and wins over any allow line.
# Blank lines and text after "#" are ignored. The check reads this file from
# the base branch, so a PR cannot loosen its own check; a missing or empty
# file fails the check.
# ---- Allowed ----
# Docs.
docs/*
*.md
# Tests: added or modified, never deleted or moved (the check enforces
# that); a test file in a denied directory stays denied.
*_test.go
# Status, metrics and observation files, by name.
core/host/master/observation_service.go
core/host/master/observation_snapshot.go
core/host/volume/memory_status.go
core/ops/observation.go
core/ops/observation_bundle.go
core/ops/observation_dashboard.go
core/ops/observation_report.go
core/ops/volume_status_artifacts.go
core/ops/volume_status_report.go
core/ops/volume_status_report_collector.go
core/ops/volume_status_summary.go
# ---- Denied even if allowed above ----
# The check itself and CI.
!.github/*
# The test gates: the testops engine, its CLI and the gate definitions
# (their docs stay allowed).
!internal/testops/*.go
!internal/testops/*.json
!cmd/sw-testops/*
# Data path and replication.
!core/storage/*
!core/frontend/*
!core/transport/*
!core/replication/*
!core/recovery/*
!core/engine/*
!core/adapter/*
# Authority: lease, epoch, fencing, move.
!core/authority/*
!core/host/master/workspace_*
!core/host/volume/workspace_*
!cmd/blockvolume/workspace_lease*
# Wire and persisted formats.
!*.proto
!*.pb.go
!core/host/master/journal_isolation*
!core/lifecycle/store*
!cmd/sparrow/persist*
# GC and delete paths.
!cmd/sw-block/chunk_gc*
!cmd/sw-block/chunk_volume_delete*
!core/lifecycle/deletion_reservations*
!core/ops/delete_safety_contract*
!*/gc[_.]*
!*_gc[_.]*
# Lease, epoch, claim, admission, GC, delete or format code (tests included)
# wherever it lives, by file name.
!*/lease*.go
!*_lease*.go
!*epoch*.go
!*fenc*.go
!*claim*.go
!*admission*.go
!*/gc_*.go
!*_gc.go
!*_gc_*.go
!*delet*.go
!*purge*.go
!*persist*.go
!*journal*.go
!*format*.go
-47
View File
@@ -1,47 +0,0 @@
# Seconds each process-level test took on the CI runner (main 032eb197, run 45972669823),
# used only to balance the parallel shards (.github/scripts/shard-named-tests.py). A test
# missing here counts as 60 s; a stale time unbalances the shards but never skips a test.
TestAVolumeThatServedBeforeItsFirstGateTickFailsOver 31.4
TestClaimedTargetAfterAMasterRestartIsNotNeverStarted 18.7
TestCutoverCreateFromSnapshot 25.4
TestCutoverWriteSnapshotKillRestartRestore 34.1
TestDoubleFailoverReadsBackEveryAckedWrite 10.2
TestFencingRoundHealContinuesThePrimary 13.4
TestFencingRoundSurvivorRejoins 17.0
TestKnownZeroAcceptance 27.1
TestKnownZeroTargetReservesBeforeHarness 0.0
TestNeverAttachedRestoreTargetIsDeletable 16.5
TestNeverStartedDeleteAfterAMasterRestart 166.8
TestNeverStartedDeleteFencesALateStart 53.6
TestNeverStartedDeleteRacesAStart 42.4
TestNeverStartedLineDeleteFencesALateStart 240.3
TestNeverStartedLineDeleteRacesAStart 458.9
TestNeverStartedLineIsDeletableWithoutARevoke 335.1
TestProcedureDeleteAVolume 79.1
TestProcedureDeleteAfterASignalStop 116.1
TestProcedureForcedMoveWithTheOldHostReturning 100.2
TestProcedureMasterKilledAfterMoveBeforeTargetStarts 23.2
TestProcedureMasterUnreachableFencesBeforeForcedMove 159.4
TestProcedurePlannedHandoffToAnotherHost 16.8
TestProcedureReturnAfterALapsedLease 81.4
TestProcedureRevokeWithoutACKThenForcedMove 79.6
TestProcedureSameHostCrashRestartInsideTheLease 17.5
TestProcedureSameHostRestartInsideTheLease 17.5
TestProcedureStartInsideTheBarrierWaitIsReGranted 80.0
TestSnapshotLadderA1OneBlockOneSnapshot 18.8
TestSnapshotLadderA2IncrementalSnapshot 20.9
TestSnapshotLadderA3WritesDuringASnapshot 26.1
TestSnapshotLadderA4ContentReturnsToAnOldValue 23.6
TestSnapshotLadderB1SnapshotQuery 19.1
TestSnapshotLadderC1FullRestore 18.8
TestSnapshotLadderC2IncrementalRestore 21.3
TestSnapshotLadderC3KilledHydrating 35.6
TestSnapshotLadderC3RestoreThenWriteThenSnapshotIt 21.3
TestSnapshotLadderD1DeleteTheNewest 21.4
TestSnapshotLadderD2DeleteAMiddleOne 23.9
TestSnapshotLadderD3DeleteWhenContentRecurs 21.3
TestSnapshotLadderD4DeleteAllButOneThenCollect 19.4
TestSnapshotLadderE1CrashDuringASnapshot 31.1
TestSnapshotLadderF1VolumesOneHost 528.4
TestStandaloneCleanMoveWithoutTheACKIsRefused 16.6
TestStandalonePlannedHandoffToTheSameHost 17.7
-91
View File
@@ -1,91 +0,0 @@
# Process-level tests (cmd/blockvolume with build tags subprocess and
# chunkstore_integration, linux) named as release evidence. CI runs them
# against real blockmaster, blockvolume and sw-block binaries and the pinned
# SeaweedFS release. Every name here must PASS: a skip, a failure or a test
# that never ran fails the job (.github/scripts/required-tests-check.py).
#
# Not here, and why: the three headroom tests (TestHeadroom*), the power-loss
# replay (TestPowerLossReplayChunkVolume, a dm-log-writes harness) and the
# tests tagged systemd_integration need root, a loop or mapped device, or
# systemd; the CI runners have none of these. They run as root outside CI,
# and their counts are recorded there.
# Known-zero acceptance, small shape in CI (KZ_RUN=1 KZ_SIZE=1G, user-space
# client, no device); the 1 TiB run is lab only.
TestKnownZeroAcceptance
TestKnownZeroTargetReservesBeforeHarness
# The procedure gate, delete and master loss.
TestProcedurePlannedHandoffToAnotherHost
TestProcedureSameHostRestartInsideTheLease
TestProcedureSameHostCrashRestartInsideTheLease
TestProcedureReturnAfterALapsedLease
TestProcedureForcedMoveWithTheOldHostReturning
TestProcedureRevokeWithoutACKThenForcedMove
TestProcedureStartInsideTheBarrierWaitIsReGranted
TestProcedureDeleteAVolume
TestANewClustersRealHolderReportsLevel1AndIsGranted
TestProcedureDeleteAfterASignalStop
TestProcedureMasterKilledAfterMoveBeforeTargetStarts
TestProcedureMasterUnreachableFencesBeforeForcedMove
TestStandalonePlannedHandoffToTheSameHost
TestStandaloneCleanMoveWithoutTheACKIsRefused
# Failover and the fencing round.
TestDoubleFailoverReadsBackEveryAckedWrite
# The replicated preview's fencing round runs and is reported on every job but
# does not gate it (#920: a sync-quorum flush under shared-runner load); it
# gates the nightly run on a quiet lab box.
TestFencingRoundHealContinuesThePrimary # nongating=#920
TestFencingRoundSurvivorRejoins # nongating=#920
TestAVolumeThatServedBeforeItsFirstGateTickFailsOver
# Many volumes on one host (F1_RUN=1).
TestSnapshotLadderF1VolumesOneHost
# Never-started delete.
TestNeverAttachedRestoreTargetIsDeletable
TestNeverStartedDeleteFencesALateStart
TestNeverStartedDeleteRacesAStart
TestNeverStartedLineIsDeletableWithoutARevoke
TestNeverStartedLineDeleteFencesALateStart
TestNeverStartedLineDeleteRacesAStart
TestNeverStartedDeleteAfterAMasterRestart
TestClaimedTargetAfterAMasterRestartIsNotNeverStarted
# Snapshot ladders and cutover.
TestSnapshotLadderA1OneBlockOneSnapshot
TestSnapshotLadderA2IncrementalSnapshot
TestSnapshotLadderA3WritesDuringASnapshot
TestSnapshotLadderA4ContentReturnsToAnOldValue
TestSnapshotLadderB1SnapshotQuery
TestSnapshotLadderC1FullRestore
TestSnapshotLadderC2IncrementalRestore
TestSnapshotLadderC3RestoreThenWriteThenSnapshotIt
# A first write after the holder reports its frontend ready can be answered
# namespace-not-ready for longer than a host retries (#905, a v1.1 release
# gate); it runs and is reported on every job until the fix removes this.
TestSnapshotLadderC3KilledHydrating # nongating=#905
TestSnapshotLadderD1DeleteTheNewest
TestSnapshotLadderD2DeleteAMiddleOne
TestSnapshotLadderD3DeleteWhenContentRecurs
TestSnapshotLadderD4DeleteAllButOneThenCollect
TestSnapshotLadderE1CrashDuringASnapshot
TestCutoverCreateFromSnapshot
TestCutoverWriteSnapshotKillRestartRestore
# CSI real-binary seams: dispatched to blockcsi.test in the same process job.
# package=blockcsi is routing metadata; the required-test checker needs all names.
TestBlockCSI_BinaryStartsAndServesIdentity # package=blockcsi
TestG15a_BlockCSIControllerPublishUsesMasterFrontendFact # package=blockcsi
TestG15c_BlockCSICreateVolumeWritesMasterLifecycleIntent # package=blockcsi
# Typed delete stdout remains separate from HEAD diagnostics.
TestDeleteNoRevokeKeepsTheTypedStdoutSeparate
# Procedure ordering compares the UTC log instant including its fraction.
TestProcedureLogTimesUseTheUTCInstant
# Snapshot operation intent and publication receipts survive real holder kills.
TestSnapshotOperationIntentAndPublicationCrashBoundaries
TestSnapshotOperationKillReceiptRejectsOrdinaryExit
-43
View File
@@ -1,43 +0,0 @@
Feature: <roadmap item>
Machine/INV: <kind> / <INV rows>
Model: <Module.Action; OtherModule.Action, or NONE (pure function of Module) for mapped files>
Red-first: <commit + test that failed on the base, or NONE: reason>
Simplest: <the simplest version, and what this PR did not add>
Five questions, answered in plain words before review:
Serves: <which statement of the specification or the docs this change serves>
Decided by: <whose decision this is, and where it is recorded>
Layer use: <conventional: the layer below is used the usual way; or the deviation>
Deviation buys: <what the deviation buys, measured; or none: no deviation>
Weakens: <which existing guarantee this weakens (its cost, the way it fails, a mode it leaves out, whether its proof runs on the production type), or none and why>
Facts: <per fact this change adds or changes, its one placement class: DURABLE; MEMORY-REBUILT-FAST (its rebuild cost, bounded by the change since the last durable point, or constant); or MEMORY-MAY-BE-LOST (its loss only delays or repeats bounded idempotent work, and resets to refuse). Also where it lives and what a restart and an abort do. Or none -- and why>
<!--
The spec-trace check reads the lines above.
Machine/INV starts with exactly one kind:
IMPL <machine>.<transition> implements an existing transition; no new state, flag or reason.
FIX <INV-ID> the red test is that invariant failing on the base.
CHANGE <machine> new or changed states, transitions or invariants; the automaton
text and rows land with or before the code.
A fix without an invariant, or a guard term without a transition, is a CHANGE.
A PR that changes no behaviour uses one of these instead, checked against its files:
DOCS docs (not docs/spec), tests, and Go whose tokens are unchanged
(comments only; directive comments count as code).
TEST only tests, testdata and test helpers.
CI only .github/ (scripts/ ships install and deploy scripts).
DOCS may still change contract text (docs/design/invariants.md): the reviewer is the gate for that.
NONE needs a reason of at least 10 characters. Simplest is required when the PR
changes non-test Go under core/ or cmd/.
Weakens and Facts are required on every PR that changes product code: a review
is refused without them. "none" needs its reason.
A fact that fits none of the three placement classes is a finding: the review
is refused.
Mapped files in .github/model-code-trace.tsv require a listed Module.Action
or NONE (pure function of Module). Separate citations for multiple modules
with semicolons. Unmapped files retain the existing Model trace policy.
-->
-53
View File
@@ -1,53 +0,0 @@
#!/usr/bin/env bash
# Self-test of changed-go-blobs.sh and of the fetch setting the PR checks use:
# a PR tree that names a '..' entry must neither write outside the output
# directory nor be fetched at all.
set -euo pipefail
script=$(cd "$(dirname "$0")" && pwd)/changed-go-blobs.sh
t=$(mktemp -d)
trap 'rm -rf "$t"' EXIT
fail() { echo "changed-go-blobs-test: FAIL: $*" >&2; exit 1; }
git init -q "$t/r"
cd "$t/r"
git config user.email t@example.com
git config user.name t
mkdir -p a
printf 'package a\n' >a/a.go
printf 'package a\n' >a/a_test.go
git add . && git commit -q -m base
base=$(git rev-parse HEAD)
# 1. An ordinary change: the old and new blobs land under the output directory.
printf 'package a\n\nvar X = 1\n' >a/a.go
printf 'package b\n' >b.go
git add . && git commit -q -m change
bash "$script" "$base" HEAD "$t/out1"
grep -q 'var X' "$t/out1/new/a/a.go" || fail "new blob of a/a.go missing"
[ -f "$t/out1/old/a/a.go" ] || fail "old blob of a/a.go missing"
[ -f "$t/out1/new/b.go" ] && [ ! -e "$t/out1/old/b.go" ] || fail "added file b.go not new-only"
[ ! -e "$t/out1/new/a/a_test.go" ] || fail "a test file was written"
# 2. A crafted tree: '..' nested three times, holding x.go. git writes such
# a tree only with --literally; the diff still lists '../../../x.go', and
# writing blobs by that path would create new/../../../x.go, outside the
# output directory (the inline loop this script replaced did exactly that).
blob=$(printf 'package evil\n' | git hash-object -w --stdin)
entry() { perl -e 'print $ARGV[0], "\0", pack("H*", $ARGV[1])' "$1" "$2"; }
tr=$(entry "100644 x.go" "$blob" | git hash-object -t tree --literally -w --stdin)
for _ in 1 2 3; do tr=$(entry "40000 .." "$tr" | git hash-object -t tree --literally -w --stdin); done
evil=$(git commit-tree "$tr" -p "$base" -m evil)
mkdir -p "$t/deep/ws/out2"
if bash "$script" "$base" "$evil" "$t/deep/ws/out2" 2>"$t/err"; then fail "a '..' path was accepted"; fi
grep -q 'refusing path' "$t/err" || fail "refusal not reported: $(cat "$t/err")"
[ -z "$(find "$t/deep" -name x.go)" ] || fail "a file was written outside the output directory"
# 3. The checks fetch the PR head with fetch.fsckObjects=true: the crafted
# tree is refused at the fetch.
git update-ref refs/pull/1/head "$evil"
git init -q "$t/c"
cd "$t/c"
if git -c fetch.fsckObjects=true fetch -q --no-tags "$t/r" "+refs/pull/1/head:refs/remotes/pr/head" 2>"$t/err2"; then
fail "fetch with fsckObjects accepted a '..' tree"
fi
echo "changed-go-blobs-test: PASS (3 cases)"
-29
View File
@@ -1,29 +0,0 @@
#!/usr/bin/env bash
# Writes the old and new blob of each changed non-test Go file between two
# commits under <out>/old/<path> and <out>/new/<path>, for the spec trace's
# kind DOCS (objects only; nothing from the PR is built or run).
#
# usage: changed-go-blobs.sh <merge-base> <head> <out>
#
# The paths come from the PR's tree objects, which git does not check when it
# prints a diff. A path that is absolute or has an empty, '.' or '..'
# component would write outside <out>, so it is refused before anything is
# written (exit 1).
set -euo pipefail
mb=$1 head=$2 out=$3
mkdir -p "$out"
git diff --name-only --no-renames -z "$mb" "$head" -- "*.go" ":(exclude)*_test.go" >"$out/.paths"
while IFS= read -r -d "" p; do
case "/$p/" in
*//* | */./* | */../*)
printf 'changed-go-blobs: refusing path %q\n' "$p" >&2
exit 1
;;
esac
done <"$out/.paths"
while IFS= read -r -d "" p; do
mkdir -p "$out/old/$(dirname "$p")" "$out/new/$(dirname "$p")"
git show "$mb:$p" >"$out/old/$p" 2>/dev/null || rm -f "$out/old/$p"
git show "$head:$p" >"$out/new/$p" 2>/dev/null || rm -f "$out/new/$p"
done <"$out/.paths"
rm -f "$out/.paths"
-53
View File
@@ -1,53 +0,0 @@
#!/usr/bin/env bash
# Tests chunkstore-scope.sh against real commits. Any failure exits nonzero.
set -euo pipefail
here=$(cd "$(dirname "$0")" && pwd)
scope="$here/chunkstore-scope.sh"
fail=0
check() { # name want got
if [ "$2" = "$3" ]; then echo "ok $1"; else echo "FAIL $1: want [$2], got [$3]"; fail=1; fi
}
repo=$(mktemp -d)
trap 'rm -rf "$repo"' EXIT
cd "$repo"
git init -q
git config user.email t@example.invalid
git config user.name t
git config core.autocrlf false
mkdir -p core/frontend/chunkstore core/frontend/durable core/storage core/other docs
echo c >core/frontend/chunkstore/c.go
echo p >core/frontend/durable/p.go
echo s >core/storage/s.go
echo o >core/other/o.go
echo d >docs/d.md
git add -A
git commit -qm base
base=$(git rev-parse HEAD)
case_of() { # name want: commit the current tree, classify against base, reset
git add -A
git commit -qm "$1" --allow-empty
check "$1" "$2" "$(bash "$scope" "$base" HEAD)"
git reset -q --hard "$base"
}
echo c2 >core/frontend/chunkstore/c.go
case_of "a chunkstore file" "run 1 core/frontend/chunkstore/c.go"
echo p2 >core/frontend/durable/p.go
case_of "a durable provider file only" "run 1 core/frontend/durable/p.go"
echo s2 >core/storage/s.go; echo o2 >core/other/o.go
case_of "storage and another package" "run 2 core/storage/s.go"
echo o2 >core/other/o.go; echo d2 >docs/d.md
case_of "neither path" "skip 2"
case_of "no file changed" "skip 0"
mkdir -p core/storage-old; echo x >core/storage-old/x.go
case_of "a storage-like prefix" "skip 1"
git rm -q core/storage/s.go
case_of "a storage deletion" "run 1 core/storage/s.go"
for i in $(seq 1 20000); do printf 'x\n' >"docs/f$i.md"; done
echo late >core/storage/zz_late.go
case_of "20000 other files and one storage file, listed last" "run 20001 core/storage/zz_late.go"
if out=$(bash "$scope" "$base" no-such-revision 2>/dev/null); then
check "an unknown revision is an error" "nonzero exit" "exit 0: $out"
else
check "an unknown revision is an error" "nonzero exit" "nonzero exit"
fi
exit "$fail"
-33
View File
@@ -1,33 +0,0 @@
#!/usr/bin/env bash
# chunkstore-scope.sh BASE HEAD: decides whether a pull request runs the
# real-filer integration tests. It prints one line:
# "run N FIRST" at least one of the N changed files is under
# core/frontend/chunkstore/, core/storage/ or
# core/frontend/durable/ (FIRST is one)
# "skip N" none of the N changed files is
# and exits 0. Any error (git fails, the list cannot be read) exits nonzero,
# and the caller then runs the tests: an error never selects skip.
#
# The NUL-delimited list is written to a file first and read to its end, so
# no pipe can stop early and leave a writer's error looking like an answer.
set -euo pipefail
[ "$#" -eq 2 ] || { echo "usage: chunkstore-scope.sh BASE HEAD" >&2; exit 2; }
list=$(mktemp)
trap 'rm -f "$list"' EXIT
if ! git diff --name-only --no-renames -z "$1" "$2" >"$list"; then
echo "chunkstore-scope: git diff $1 $2 failed" >&2
exit 2
fi
n=0
hit=""
while IFS= read -r -d '' f; do
n=$((n + 1))
case $f in
core/frontend/chunkstore/* | core/storage/* | core/frontend/durable/*) [ -n "$hit" ] || hit=$f ;;
esac
done <"$list"
if [ -n "$hit" ]; then
echo "run $n $hit"
else
echo "skip $n"
fi
-41
View File
@@ -1,41 +0,0 @@
# Failed-job evidence
Both test suites keep one `ci-<suite>-<run>-<attempt>` artifact on failure for
14 days. `go-test.json` contains Go's timestamped events and per-test `Elapsed`
values; process shards also keep their original JSON, logs and exit receipts.
`go-test.stderr` keeps build/tool errors outside Go's JSON event stream. The
console still shows the original test output. Recording/rendering errors are
best effort: they report the missing evidence and keep draining Go, whose own
exit code alone decides the wrapper's result. Test arguments, scope, timeouts,
exit-code handling and the required-tests gate are unchanged.
`load.tsv` begins immediately after checkout and samples once per second until
the final collection step. It covers setup, builds and tests; the checkout
itself and the artifact upload are outside the sampling interval. The sampler
has the job's maximum lifetime if cancellation prevents its stop step. The
stop receipt includes the process start time, so a recycled PID is not killed.
Columns:
- `ts_utc`: UTC timestamp with milliseconds. Scheduling gaps remain visible;
delayed sampling does not invent backfilled one-second rows.
- `load1`: machine load average.
- `steal_pct`, `iowait_pct`: interval percentages from `/proc/stat` (the first
row has no baseline and is null). Guest counters are not counted twice.
- `psi_cpu`, `psi_io`, `psi_mem`: JSON objects containing the kernel's `some`
and, when available, `full` pressure averages and cumulative microseconds.
- `disk_await_ms`: JSON map by device, calculated as the interval's read/write
milliseconds divided by completed reads/writes from `/proc/diskstats`.
Devices are kept separate, including partitions and device-mapper layers;
do not sum them. No completed IO, reset counters or a new device yields null.
Discard and flush-only operations are not included in this read/write mean.
- `cgroup_cpu_max`: JSON map of `cpu.max` for the sampler's current cgroup and
every visible ancestor. The sampler inherits the job's cgroup. Parent quotas
matter even when the leaf says `max`. Cgroup v1/unavailable data is null.
- `errors`: read/parse errors; missing or inaccessible counters are null,
never fabricated zero load. Consult `load.sampler.log` for sampler errors.
No package installation, sudo, or `iostat` executable is required. `/proc`
CPU/PSI/disk observations are machine-wide; these are correlation evidence,
not proof that the job itself caused contention. Sampling is diagnostic and
does not revoke, retry or change a test's result.
-129
View File
@@ -1,129 +0,0 @@
"""Fixed Linux counter fixtures; no host load or privileged runner needed."""
import importlib.util
import json
import pathlib
import subprocess
import sys
import tempfile
import time
import unittest
spec = importlib.util.spec_from_file_location('ci_load', pathlib.Path(__file__).with_name('ci-load.py'))
load = importlib.util.module_from_spec(spec)
spec.loader.exec_module(load)
class LoadTest(unittest.TestCase):
@unittest.skipUnless(sys.platform == 'linux', 'real /proc lifecycle is Linux-only')
def test_cli_samples_and_stops_its_own_process(self):
with tempfile.TemporaryDirectory() as name:
output = pathlib.Path(name)/'load.tsv'
command = [sys.executable, '-I', str(pathlib.Path(__file__).with_name('ci-load.py'))]
try:
subprocess.run(command+['start', str(output), '--duration', '30'], check=True, timeout=10)
deadline = time.monotonic()+10
while time.monotonic() < deadline:
if output.exists() and len(output.read_text().splitlines()) >= 3:
break
time.sleep(0.05)
finally:
subprocess.run(command+['stop', str(output)], check=True, timeout=5)
lines = output.read_text().splitlines()
self.assertGreaterEqual(len(lines), 3)
self.assertTrue(lines[0].startswith('ts_utc\tload1\tsteal_pct'))
for line in lines[1:]:
fields = line.split('\t')
self.assertEqual(len(fields), 10)
self.assertTrue(fields[0].endswith('+00:00'))
for field in fields[1:]:
json.loads(field)
# The sampler exited: its pid is gone, and no incomplete note.
pid = json.loads(output.with_suffix('.pid.json').read_text())['pid']
self.assertFalse(pathlib.Path(f'/proc/{pid}').exists() and
pathlib.Path(f'/proc/{pid}/stat').read_text().split(')')[1].split()[0] != 'Z')
self.assertFalse(output.with_suffix('.incomplete').exists())
@unittest.skipUnless(sys.platform == 'linux', 'real /proc lifecycle is Linux-only')
def test_stop_records_a_sampler_that_does_not_exit(self):
with tempfile.TemporaryDirectory() as name:
output = pathlib.Path(name)/'load.tsv'
ready = pathlib.Path(name)/'ready'
stubborn = subprocess.Popen([sys.executable, '-c',
'import pathlib,signal,sys,time; signal.signal(signal.SIGTERM, signal.SIG_IGN); '
'pathlib.Path(sys.argv[1]).touch(); time.sleep(30)', str(ready)])
try:
deadline = time.monotonic()+10
while not ready.exists():
self.assertIsNone(stubborn.poll(), 'the stand-in exited before it was ready')
self.assertLess(time.monotonic(), deadline, 'the stand-in never became ready')
time.sleep(0.01)
output.with_suffix('.pid.json').write_text(json.dumps(dict(pid=stubborn.pid, start=load.identity(stubborn.pid))))
began = time.monotonic()
done = subprocess.run([sys.executable, '-I', str(pathlib.Path(__file__).with_name('ci-load.py')), 'stop', str(output)],
capture_output=True, text=True, timeout=10)
self.assertEqual(done.returncode, 0)
self.assertLess(time.monotonic()-began, 5)
self.assertIn('did not exit', output.with_suffix('.incomplete').read_text())
self.assertIn('load evidence incomplete', done.stderr)
finally:
stubborn.kill()
stubborn.wait()
def test_cpu_and_disk_interval_not_since_boot(self):
# CPU: 100 ticks, 10 iowait, 5 stolen. guest ticks are already in user.
before = {'cpu': [100, 0, 20, 800, 20, 0, 0, 10, 3, 0],
'disks': {'nvme0n1': [10, 30]}}
after = {'cpu': [130, 0, 25, 850, 30, 0, 0, 15, 7, 0],
'disks': {'nvme0n1': [14, 50], 'new': [1000, 9000]}}
cpu, disks = load.interval(before, after)
self.assertEqual(cpu, {'steal_pct': 5.0, 'iowait_pct': 10.0})
self.assertEqual(disks, {'nvme0n1': 5.0, 'new': None})
def test_reset_or_no_io_is_unknown_not_zero_latency(self):
before = {'cpu': [10]*8, 'disks': {'sda': [10, 100], 'sdb': [20, 200]}}
after = {'cpu': [1]*8, 'disks': {'sda': [10, 100], 'sdb': [1, 3]}}
cpu, disks = load.interval(before, after)
self.assertEqual(cpu, {'steal_pct': None, 'iowait_pct': None})
self.assertEqual(disks, {'sda': None, 'sdb': None})
def test_proc_fields_and_cgroup_ancestor_quota(self):
with tempfile.TemporaryDirectory() as name:
root = pathlib.Path(name)
(root/'pressure').mkdir()
(root/'self').mkdir()
mount = root/'cg'
(mount/'runner/job').mkdir(parents=True)
(mount/'cpu.max').write_text('max 100000\n')
(mount/'runner/cpu.max').write_text('200000 100000\n')
(mount/'runner/job/cpu.max').write_text('max 100000\n')
(root/'self/cgroup').write_text('0::/slice/runner/job\n')
(root/'self/mountinfo').write_text(f'1 0 0:1 /slice {mount.as_posix()} rw - cgroup2 cgroup rw\n')
(root/'loadavg').write_text('3.25 2.00 1.00 1/1 1\n')
(root/'stat').write_text('cpu 100 0 20 800 20 0 0 10 3 0\n')
(root/'diskstats').write_text('259 0 nvme0n1 2 0 0 6 3 0 0 9 0 0 0\n')
for kind in ('cpu', 'io', 'memory'):
(root/'pressure'/kind).write_text('some avg10=1.25 avg60=0.50 avg300=0.20 total=12345\n')
snapshot = load.read_snapshot(root)
self.assertEqual(snapshot['load1'], 3.25)
self.assertEqual(snapshot['disks'], {'nvme0n1': [5, 15]})
self.assertEqual(snapshot['psi']['cpu']['some']['total'], 12345)
self.assertEqual(snapshot['cpu_max'][str(mount/'runner/cpu.max')], '200000 100000')
self.assertEqual(snapshot['errors'], [])
(mount/'cpu.max').unlink()
snapshot = load.read_snapshot(root)
self.assertEqual(snapshot['cpu_max'][str(mount/'runner/cpu.max')], '200000 100000')
self.assertIsNone(snapshot['cpu_max'][str(mount/'cpu.max')])
self.assertTrue(snapshot['errors'])
def test_missing_inputs_explicitly_reported(self):
with tempfile.TemporaryDirectory() as name:
snapshot = load.read_snapshot(pathlib.Path(name))
self.assertIsNone(snapshot['load1'])
self.assertIsNone(snapshot['cpu'])
self.assertTrue(snapshot['errors'])
self.assertIsNone(snapshot['psi']['cpu'])
self.assertIsNone(snapshot['cpu_max'])
if __name__ == '__main__':
unittest.main()
-176
View File
@@ -1,176 +0,0 @@
"""One-second Linux job-load evidence. Missing counters are null, never zero.
Disk await is delta(read_ms + write_ms) / delta(completed reads + writes),
per device from diskstats (the r_await/w_await weighted mean, not a sum across
stacked devices). PSI retains the kernel's avg10/60/300 and total microseconds.
cpu.max includes every visible ancestor, since a parent may impose the quota.
The sampler is diagnostic only; it has a job-sized lifetime even if stop is lost.
"""
import argparse
import datetime
import json
import os
import pathlib
import re
import select
import signal
import subprocess
import sys
import threading
import time
def read_snapshot(proc=pathlib.Path('/proc')):
errors = []
def read(path, parse):
try:
return parse(path.read_text())
except (OSError, ValueError, IndexError, StopIteration) as error:
errors.append(str(path)+': '+str(error))
return None
def pressure(text):
return {parts[0]: {k: (int(v) if k == 'total' else float(v))
for k, v in (item.split('=') for item in parts[1:])}
for parts in (line.split() for line in text.splitlines()) if parts}
def diskstats(text):
result = {}
for line in text.splitlines():
fields = line.split()
# fields after the device name: reads, merges, sectors, ms,
# writes, merges, sectors, ms (present on all supported kernels).
result[fields[2]] = [int(fields[3])+int(fields[7]), int(fields[6])+int(fields[10])]
return result
def quotas(_):
group = next(line.split('::', 1)[1] for line in (proc/'self/cgroup').read_text().splitlines()
if line.startswith('0::'))
for line in (proc/'self/mountinfo').read_text().splitlines():
fields, filesystem = line.split(' - ', 1)
if filesystem.split()[0] != 'cgroup2':
continue
# mountinfo escapes whitespace and backslash with octal codes.
unescape = lambda value: re.sub(r'\\([0-7]{3})', lambda m: chr(int(m[1], 8)), value)
fields = fields.split()
base, mount = unescape(fields[3]), pathlib.Path(unescape(fields[4]))
if base != '/' and (group == base or group.startswith(base+'/')):
relative = group[len(base):].lstrip('/')
else:
# cgroup namespace: membership is relative to its visible root.
relative = group.lstrip('/')
current = mount / relative
current.relative_to(mount)
result = {}
while True:
path = current/'cpu.max'
# The real hierarchy root need not expose cpu.max. Preserve
# readable leaf/parent quotas even if another level is absent.
result[str(path)] = read(path, str.strip)
if current == mount:
return result
current = current.parent
raise ValueError('no visible cgroup v2 mount (v1 or unavailable)')
return dict(load1=read(proc/'loadavg', lambda text: float(text.split()[0])),
cpu=read(proc/'stat', lambda text: [int(v) for v in next(
line for line in text.splitlines() if line.startswith('cpu ')).split()[1:]]),
disks=read(proc/'diskstats', diskstats),
psi={kind: read(proc/'pressure'/filename, pressure) for kind, filename in
[('cpu', 'cpu'), ('io', 'io'), ('mem', 'memory')]},
cpu_max=read(proc/'self/cgroup', quotas), errors=errors)
def interval(before, after):
cpu = dict(steal_pct=None, iowait_pct=None)
old, new = before['cpu'], after['cpu']
if old is not None and new is not None and len(old) >= 8 and len(new) >= 8:
deltas = [new[i]-old[i] for i in range(8)] # guest already included in user/nice
total = sum(deltas)
if min(deltas) >= 0 and total > 0:
cpu = dict(steal_pct=100*deltas[7]/total, iowait_pct=100*deltas[4]/total)
disks = None
if after['disks'] is not None:
disks = {}
for name, values in after['disks'].items():
previous = (before['disks'] or {}).get(name)
disks[name] = None
if previous and values[0] > previous[0] and values[1] >= previous[1]:
disks[name] = (values[1]-previous[1])/(values[0]-previous[0])
return cpu, disks
def sample(output, duration):
output.parent.mkdir(parents=True, exist_ok=True)
previous = dict(cpu=None, disks=None)
end, due = time.monotonic()+duration, time.monotonic()
stopped = threading.Event()
signal.signal(signal.SIGTERM, lambda *_: stopped.set())
with output.open('w', buffering=1) as stream:
stream.write('ts_utc\tload1\tsteal_pct\tiowait_pct\tpsi_cpu\tpsi_io\tpsi_mem\tdisk_await_ms\tcgroup_cpu_max\terrors\n')
while not stopped.is_set() and time.monotonic() < end:
timestamp = datetime.datetime.now(datetime.timezone.utc).isoformat(timespec='milliseconds')
current = read_snapshot()
cpu, disks = interval(previous, current)
fields = [timestamp, current['load1'], cpu['steal_pct'], cpu['iowait_pct'],
current['psi']['cpu'], current['psi']['io'], current['psi']['mem'],
disks, current['cpu_max'], current['errors']]
stream.write('\t'.join(json.dumps(v, separators=(',', ':')) if not isinstance(v, str) else v
for v in fields)+'\n')
previous = current
due += 1
stopped.wait(max(0, min(due, end)-time.monotonic()))
# Do not emit a burst of fictitious one-second samples after a stall.
due = max(due, time.monotonic())
def identity(pid):
# comm may contain spaces or parentheses; starttime is field 22.
return pathlib.Path(f'/proc/{pid}/stat').read_text().rsplit(')', 1)[1].split()[19]
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('action', choices=['start', 'sample', 'stop'])
parser.add_argument('output', type=pathlib.Path)
parser.add_argument('--duration', type=int, default=5400)
args = parser.parse_args()
receipt = args.output.with_suffix('.pid.json')
if args.action == 'sample':
sample(args.output, args.duration)
elif args.action == 'start':
args.output.parent.mkdir(parents=True, exist_ok=True)
with args.output.with_suffix('.sampler.log').open('w') as log:
child = subprocess.Popen([sys.executable, '-I', str(pathlib.Path(__file__).resolve()),
'sample', str(args.output), '--duration', str(args.duration)],
stdin=subprocess.DEVNULL, stdout=log, stderr=log, start_new_session=True)
receipt.write_text(json.dumps(dict(pid=child.pid, start=identity(child.pid))))
elif receipt.exists():
owner = json.loads(receipt.read_text())
handle = None
try:
# A pidfd makes the identity-check/signal pair safe even if the
# process exits and its numeric PID is recycled between the two.
handle = os.pidfd_open(owner['pid'])
if identity(owner['pid']) == owner['start']:
signal.pidfd_send_signal(handle, signal.SIGTERM)
# Flush the last row before the uploader reads the file. Never
# signal a reused PID and never wait indefinitely for evidence.
# The pidfd turns readable when the sampler exits; one still
# alive after 2 s leaves load.incomplete beside its rows.
if not select.select([handle], [], [], 2)[0]:
note = args.output.with_suffix('.incomplete')
note.write_text('the sampler did not exit within 2 s of SIGTERM; its last rows may be missing\n')
print('load evidence incomplete: '+str(note), file=sys.stderr)
except ProcessLookupError:
pass
except FileNotFoundError:
pass
finally:
if handle is not None:
os.close(handle)
if __name__ == '__main__':
main()
-59
View File
@@ -1,59 +0,0 @@
#!/usr/bin/env bash
# Tests docs-only-scope.sh against real commits, and that test.yml applies it
# only to the process suite of a pull request. Any failure exits nonzero.
set -euo pipefail
here=$(cd "$(dirname "$0")" && pwd)
scope="$here/docs-only-scope.sh"
workflow="$here/../workflows/test.yml"
fail=0
check() { # name want got
if [ "$2" = "$3" ]; then echo "ok $1"; else echo "FAIL $1: want [$2], got [$3]"; fail=1; fi
}
repo=$(mktemp -d)
trap 'rm -rf "$repo"' EXIT
cd "$repo"
git init -q
git config user.email t@example.invalid
git config user.name t
git config core.autocrlf false
mkdir -p docs cmd
echo a >docs/a.md
echo r >README.md
echo g >cmd/main.go
git add -A
git commit -qm base
base=$(git rev-parse HEAD)
case_of() { # name want: commit the current tree, classify against base, reset
git add -A
git commit -qm "$1" --allow-empty
check "$1" "$2" "$(bash "$scope" "$base" HEAD)"
git reset -q --hard "$base"
}
echo b >docs/b.md; echo a2 >docs/a.md
case_of "two docs files" "docs_only 2"
echo b >docs/b.md; echo t >cmd/x_test.go
case_of "docs and a test file" "run 2 cmd/x_test.go"
case_of "no file changed" "run 0"
mkdir -p docs-old; echo x >docs-old/x.md
case_of "a docs-like prefix" "run 1 docs-old/x.md"
echo r2 >README.md
case_of "README outside docs" "run 1 README.md"
git mv docs/a.md cmd/a.md
case_of "a move out of docs" "run 2 cmd/a.md"
git rm -q docs/a.md
case_of "a docs deletion" "docs_only 1"
for i in $(seq 1 20000); do printf 'x\n' >"docs/f$i.md"; done
echo late >zz-late.go
case_of "20000 docs files and one other, listed last" "run 20001 zz-late.go"
if out=$(bash "$scope" "$base" no-such-revision 2>/dev/null); then
check "an unknown revision is an error" "nonzero exit" "exit 0: $out"
else
check "an unknown revision is an error" "nonzero exit" "nonzero exit"
fi
# test.yml: the scope step runs only for a pull request's process suite, and
# every process step it can skip names its output.
step=$(grep -n -A3 'name: Docs-only pull request' "$workflow" | grep "if:" || true)
check "scope step condition" "1" "$(printf '%s' "$step" | grep -c "matrix.suite == 'process' && github.event_name == 'pull_request'" || true)"
check "process steps gated" "5" "$(grep -c "if: matrix.suite == 'process' && steps.scope.outputs.docs_only != '1'" "$workflow" || true)"
check "no ungated process step" "0" "$(grep -c "if: matrix.suite == 'process'$" "$workflow" || true)"
exit "$fail"
-32
View File
@@ -1,32 +0,0 @@
#!/usr/bin/env bash
# docs-only-scope.sh BASE HEAD: classifies the files changed between BASE and
# HEAD for the process-level suite. It prints one line:
# "docs_only N" every one of the N changed files is under docs/
# "run N [FIRST-OTHER]" no file changed, or at least one is elsewhere
# and exits 0. Any error (git fails, the list cannot be read) exits nonzero,
# and the caller then runs the tests: an error never selects docs_only.
#
# The NUL-delimited list is written to a file first and read to its end, so
# no pipe can stop early and leave a writer's error looking like an answer.
set -euo pipefail
[ "$#" -eq 2 ] || { echo "usage: docs-only-scope.sh BASE HEAD" >&2; exit 2; }
list=$(mktemp)
trap 'rm -f "$list"' EXIT
if ! git diff --name-only --no-renames -z "$1" "$2" >"$list"; then
echo "docs-only-scope: git diff $1 $2 failed" >&2
exit 2
fi
n=0
other=""
while IFS= read -r -d '' f; do
n=$((n + 1))
case $f in
docs/*) ;;
*) [ -n "$other" ] || other=$f ;;
esac
done <"$list"
if [ "$n" -gt 0 ] && [ -z "$other" ]; then
echo "docs_only $n"
else
echo "run $n${other:+ $other}"
fi
-58
View File
@@ -1,58 +0,0 @@
"""Drain a Go stream even when recording/rendering fails; never judge tests."""
import json
import os
import sys
sys.stdin.reconfigure(encoding='utf-8', errors='replace')
def warn(error):
try:
print('test evidence unavailable: '+str(error), file=sys.stderr)
except OSError:
pass
archive = None
try:
archive = open(sys.argv[1], 'a', encoding='utf-8', buffering=1)
except OSError as error:
warn(error)
raw = len(sys.argv) > 2 and sys.argv[2] == '--raw'
console = True
for line in sys.stdin:
if archive is not None:
try:
archive.write(line)
except OSError as error:
warn(error)
try:
archive.close()
except OSError:
pass
archive = None
output = line
if not raw:
try:
output = json.loads(line).get('Output', '')
except (ValueError, AttributeError) as error:
# Keep and display unexpected text, but keep draining the producer.
warn(error)
if console:
try:
sys.stdout.write(output)
sys.stdout.flush()
except OSError:
console = False
# Avoid an interpreter-exit BrokenPipe flush; the stream still
# drains Go to EOF so a dead console cannot send SIGPIPE upstream.
try:
with open(os.devnull, 'w') as sink:
os.dup2(sink.fileno(), sys.stdout.fileno())
except OSError:
pass
if archive is not None:
try:
archive.close()
except OSError as error:
warn(error)
-73
View File
@@ -1,73 +0,0 @@
#!/usr/bin/env bash
# Controls for lab-tag-check.sh and scripts/refuse-lab-binary.sh. Each case
# builds a small git repository from the real image recipes and publish
# workflow with one contamination, and expects a refusal; the unchanged copy
# passes. The refusal script is driven with stand-in binaries. Exit 0 when
# every control holds.
set -euo pipefail
here=$(cd "$(dirname "$0")" && pwd)
src=$(cd "$here/../.." && pwd)
check="$here/lab-tag-check.sh"
refuse="$src/scripts/refuse-lab-binary.sh"
t=$(mktemp -d); trap 'rm -rf -- "${t:?}"' EXIT
tag=swblock_lab_bigvol
sw=deploy/k8s/g15b/Dockerfile.sw-block
csi=deploy/k8s/g15b/Dockerfile.blockcsi
pub=.github/workflows/publish-alpha-images.yml
n=0
gadd() { git -C "$r" -c core.autocrlf=false -c core.safecrlf=false add -A; }
repo() { # the real recipes and publish workflow, plus one allowed file, in $t/r<n>
n=$((n+1)); r="$t/r$n"
mkdir -p "$r/deploy/k8s/g15b" "$r/.github/workflows" "$r/core/geometry" "$r/core/x"
tr -d '\r' < "$src/$sw" > "$r/$sw"
tr -d '\r' < "$src/$csi" > "$r/$csi"
tr -d '\r' < "$src/$pub" > "$r/$pub"
printf '//go:build %s\npackage geometry\n' "$tag" > "$r/core/geometry/volume_size_lab.go"
printf 'package x\n' > "$r/core/x/x.go"
git -C "$r" init -q && gadd
}
edit() { # edit FILE SED: change one file of the current repository
sed -i "$2" "$r/$1" && gadd
}
expect() { # expect pass|fail name
local want=$1 name=$2 rc=0
bash "$check" "$r" >/dev/null 2>&1 || rc=$?
if [ "$want" = pass ] && [ $rc -ne 0 ]; then echo "FAIL: $name: refused"; bash "$check" "$r" || true; exit 1; fi
if [ "$want" = fail ] && [ $rc -eq 0 ]; then echo "FAIL: $name: passed"; exit 1; fi
}
repo; expect pass "the real recipes, unchanged"
repo; printf '// %s\npackage x\n' "$tag" > "$r/core/x/x.go"; gadd; expect fail "the tag outside the allowlist"
repo; printf '// swblock_v11_format
package x
' > "$r/core/x/x.go"; gadd; expect fail "the format tag outside the allowlist"
repo; edit "$sw" "s#go build -o /out/blockvolume#go build -tags swblock_v11_format -o /out/blockvolume#"; expect fail "the format tag in a real recipe's build"
repo; edit "$sw" "s#go build -o /out/blockvolume#go build -tags $tag -o /out/blockvolume#"; expect fail "the tag in a real recipe's build"
repo; edit "$sw" '/^RUN bash scripts\/refuse-lab-binary.sh/d'; expect fail "the real recipe's RUN guard deleted, its comment kept"
repo; edit "$csi" '/^RUN bash scripts\/refuse-lab-binary.sh/d'; expect fail "the CSI recipe's RUN guard deleted, its comment kept"
repo; edit "$sw" 's#^RUN bash scripts/refuse-lab-binary.sh#\# RUN bash scripts/refuse-lab-binary.sh#'; expect fail "the RUN guard commented out"
repo; edit "$sw" 's#^\(RUN bash scripts/refuse-lab-binary.sh.*\) /out/sw-block#\1#'; expect fail "a built binary left out of the refusal"
repo; edit "$sw" 's#/out/blockvolume ./cmd/blockvolume#/out/blockvolume ./cmd/blockvolume \&\& \\n CGO_ENABLED=0 go build -o /out/extra ./cmd/extra#'; expect fail "a new binary built and not refused"
repo; guard=$(grep '^RUN bash scripts/refuse-lab-binary.sh' "$r/$sw"); edit "$sw" '/^RUN bash scripts\/refuse-lab-binary.sh/d'; sed -i "s#^RUN CGO_ENABLED=0 go build#$guard\nRUN CGO_ENABLED=0 go build#" "$r/$sw"; gadd; expect fail "the refusal before the build"
repo; printf ' - run: go build ./...\n' >> "$r/$pub"; gadd; expect fail "a go build in the publish workflow"
repo; edit "$pub" "s#file: $csi#file: Dockerfile.root#"; printf 'RUN go build -o /out/b ./cmd/b\n' > "$r/Dockerfile.root"; gadd; expect fail "publishing from a Dockerfile outside deploy/"
repo; rm -f "$r/$pub"; gadd; expect fail "no readable publish workflow"
repo; ln -s missing-target "$r/deploy/k8s/g15b/Dockerfile.dangling" 2>/dev/null || true
if [ -L "$r/deploy/k8s/g15b/Dockerfile.dangling" ]; then gadd; expect fail "an image Dockerfile that cannot be read"; else echo "note: no symlinks here; the unreadable-recipe control runs on Linux"; fi
r="$t/missing"; expect fail "a missing repository"
r="$t/notgit"; mkdir -p "$r"; expect fail "a directory the scan cannot read as a repository"
b="$t/bin"; mkdir -p "$b"
printf '#!/bin/sh\necho "b revision=1 modified=false"\n' > "$b/release"
printf '#!/bin/sh\necho "b revision=1 modified=false LAB BUILD(%s)"\n' "$tag" > "$b/lab"
printf '#!/bin/sh
echo "b revision=1 modified=false LAB BUILD(swblock_v11_format)"
' > "$b/draft"
printf '#!/bin/sh\nexit 3\n' > "$b/broken"
printf '#!/bin/sh\nexit 0\n' > "$b/silent"
chmod +x "$b"/*
bash "$refuse" "$b/release" >/dev/null || { echo "FAIL: refuse-lab-binary refused a release binary"; exit 1; }
for x in lab draft broken silent; do
if bash "$refuse" "$b/release" "$b/$x" >/dev/null 2>&1; then echo "FAIL: refuse-lab-binary passed a $x binary"; exit 1; fi
done
if bash "$refuse" >/dev/null 2>&1; then echo "FAIL: refuse-lab-binary passed with no binary"; exit 1; fi
echo "lab-tag-check controls: OK ($n repositories, 5 binaries)"
-90
View File
@@ -1,90 +0,0 @@
#!/usr/bin/env bash
# The lab-only build tags must never reach an image or a release build:
# swblock_lab_bigvol lifts the 256 GiB create cap and the local headroom
# refusal for scale rehearsals; swblock_v11_format turns on the draft v1.1
# store format. Two checks, both failing closed:
# 1. Allowlist: only the files below may name either tag (git grep over the
# tracked tree; a scan that cannot run is a failure, never "clean").
# 2. Wiring: every image Dockerfile under deploy/ that runs go build also runs
# scripts/refuse-lab-binary.sh after its last go build, and the publish
# workflow builds images only from such Dockerfiles, with no go build of
# its own.
# Usage: lab-tag-check.sh [REPO_ROOT] Exit 0: clean. Exit 1: a finding or an
# unreadable input (printed).
set -euo pipefail
root=${1:-.}
tags='swblock_lab_bigvol swblock_v11_format'
allowed='.github/scripts/lab-tag-check-test.sh
.github/scripts/lab-tag-check.sh
.github/workflows/test.yml
core/host/volume/status_heap_lab.go
core/host/volume/status_heap_lab_test.go
core/host/volume/status_heap_release.go
core/host/volume/status_heap_release_test.go
core/storage/chunk_v11_format_draft.go
core/storage/chunk_v11_format_release.go
core/storage/chunk_v11_format_tag_test.go
core/frontend/durable/headroom.go
core/frontend/durable/headroom_lab_test.go
core/geometry/volume_size.go
core/geometry/volume_size_lab.go
core/geometry/volume_size_lab_test.go
core/geometry/volume_size_release.go
core/geometry/volume_size_release_test.go
docs/design/invariants.md
docs/lab-heap-profiles.md
internal/buildinfo/buildinfo.go
internal/buildinfo/v11_format_draft.go
internal/buildinfo/v11_format_release.go
scripts/refuse-lab-binary.sh'
fail() { echo "lab-tag: $*" >&2; exit 1; }
[ -d "$root" ] || fail "no repository at $root"
for tag in $tags; do
set +e
hits=$(git -C "$root" grep -l -- "$tag")
rc=$?
set -e
case $rc in
0) ;;
1) hits="" ;;
*) fail "git grep failed (rc=$rc): the scan did not run" ;;
esac
bad=""
while IFS= read -r f; do
[ -n "$f" ] || continue
printf '%s\n' "$allowed" | grep -qxF -- "$f" || bad="$bad $f"
done <<< "$hits"
[ -z "$bad" ] || fail "$tag named outside the allowlist:$bad"
done
# read FILE: its whole content, once; a read that fails is a failure, never
# "no match".
read_file() { local c; c=$(cat -- "$root/$1") || fail "cannot read $1"; printf '%s\n' "$c"; }
dockerfiles=$(cd "$root" && find deploy \( -type f -o -type l \) -name 'Dockerfile*' | sort) || fail "cannot list deploy/"
[ -n "$dockerfiles" ] || fail "no image Dockerfile under deploy/"
for d in $dockerfiles; do
body=$(read_file "$d") || exit 1
# The binaries it builds (go build ... -o /out/NAME), and the line of its
# last build. A recipe that builds nothing needs no refusal.
built=$(printf '%s\n' "$body" | grep -oE 'go build[^&\]*-o /out/[A-Za-z0-9_.-]+' | grep -oE '/out/[A-Za-z0-9_.-]+$' | sort -u) || true
[ -n "$built" ] || continue
last=$(printf '%s\n' "$body" | grep -nE 'go build' | tail -1 | cut -d: -f1)
# The refusal must be an executed RUN line (not a comment) after the last
# build, naming every binary the recipe builds.
refuse=$(printf '%s\n' "$body" | grep -nE '^RUN bash scripts/refuse-lab-binary\.sh( |$)' | tail -1) || fail "$d builds ${built//$'\n'/ } without a RUN of scripts/refuse-lab-binary.sh"
at=${refuse%%:*}
[ "$at" -gt "$last" ] || fail "$d runs the refusal before its last build"
for b in $built; do
case " ${refuse#*:} " in *" $b "*) ;; *) fail "$d does not refuse $b, which it builds" ;; esac
done
done
pub=.github/workflows/publish-alpha-images.yml
pubbody=$(read_file "$pub") || exit 1
case "$pubbody" in *"go build"*) fail "the publish workflow runs its own go build" ;; esac
files=$(printf '%s\n' "$pubbody" | grep -E '^[[:space:]]*file:' | sed -E 's/^[[:space:]]*file:[[:space:]]*//') || fail "the publish workflow names no Dockerfile"
for f in $files; do
printf '%s\n' "$dockerfiles" | grep -qxF -- "$f" || fail "the publish workflow builds from $f, not an image Dockerfile under deploy/"
fbody=$(read_file "$f") || exit 1
printf '%s\n' "$fbody" | grep -qE '^RUN bash scripts/refuse-lab-binary\.sh ' || fail "the publish workflow builds from $f, which does not run the refusal"
done
echo "lab-tag: clean"
-120
View File
@@ -1,120 +0,0 @@
"""Check that every code and test anchor of the invariants ledger exists at a git ref.
usage: python -I ledger_check.py <repo-dir> <git-ref> [<ledger path in repo>]
A ledger row is a table line whose first cell holds `INV-...`. In its cells, a
backticked token that ends in .go is a FILE; a backticked identifier (or
Type.Method) is a SYMBOL of the nearest file named before it in the same cell,
or, in the test cell, of any file named in that cell. A file must exist at the
ref; a symbol must occur in its file as a whole word (for a test: `func Name(`).
A symbol with no file in its cell is looked up in the whole tree. A file may
be a glob (`volume_lock*.go`). A lower-case token with an underscore (a build
tag, a JSON key, a reason string) is not a Go symbol and is not checked.
Prints one line per missing anchor and a summary. It reads; it changes nothing.
Exit: 0 when every anchor exists; 1 when one is missing; 2 when git fails or no
row or anchor was found (an error is never read as a pass).
"""
import re
import subprocess
import sys
def git(repo, *args):
"""git's output. A git failure ends the check with exit 2: an error must
never read as "no anchors". `git grep` finding nothing (exit 1) is not one."""
r = subprocess.run(["git", "-C", repo] + list(args), capture_output=True, text=True,
encoding="utf-8", errors="replace")
if r.returncode != 0 and not (args and args[0] == "grep" and r.returncode == 1):
print("ledger_check: git %s failed (exit %d): %s" % (" ".join(args[:2]), r.returncode, r.stderr.strip()[:300]),
file=sys.stderr)
sys.exit(2)
return r.stdout
def main():
repo, ref = sys.argv[1], sys.argv[2]
ledger = sys.argv[3] if len(sys.argv) > 3 else "docs/design/invariants.md"
text = git(repo, "show", "%s:%s" % (ref, ledger))
files = set(git(repo, "ls-tree", "-r", "--name-only", ref).split("\n"))
cache = {}
def body(path):
if path not in cache:
cache[path] = git(repo, "show", "%s:%s" % (ref, path))
return cache[path]
def resolve(tok):
"""A file token may be a full path or a bare file name."""
if tok in files:
return [tok]
if "*" in tok:
rx = re.compile("^(.*/)?" + "[^/]*".join(re.escape(x) for x in tok.split("*")) + "$")
return [f for f in files if rx.match(f)]
if "/" not in tok:
return [f for f in files if f.endswith("/" + tok)]
# a path with a directory matches whole path components only
return [f for f in files if f.endswith("/" + tok)]
ident = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)?(\(\))?$")
go_all = None
rows = missing = anchors = 0
for n, line in enumerate(text.split("\n"), 1):
if not line.startswith("|"):
continue
cells = [c.strip() for c in line.strip().strip("|").split("|")]
m = re.match(r"`(INV-[A-Z0-9-]+)`", cells[0]) if cells else None
if not m or len(cells) < 6:
continue
rows += 1
inv, status = m.group(1), cells[-1]
if "ARCHIVED" in status:
continue
for ci, kind in ((3, "code"), (4, "test")):
toks = re.findall(r"`([^`]+)`", cells[ci])
cell_files = []
for t in toks:
if t.endswith(".go"):
cell_files.append(t)
cur = None
for t in toks:
if t.endswith(".go"):
cur = t
anchors += 1
if not resolve(t):
missing += 1
print("%s (line %d, %s, %s): file %s does not exist" % (inv, n, kind, status, t))
continue
if not ident.match(t):
continue
sym = t.rstrip("()").split(".")[-1]
if sym in ("nil", "true", "false") or sym.isupper() or len(sym) < 3:
continue
if "_" in sym and sym == sym.lower():
# a build tag, a JSON key or a reason string: not a Go symbol
continue
scope = [cur] if (cur and kind == "code") else cell_files
paths = [p for f in scope for p in resolve(f)]
anchors += 1
if kind == "test" and sym.startswith(("Test", "Fuzz", "Benchmark")):
pat = re.compile(r"func %s\(" % re.escape(sym))
else:
pat = re.compile(r"\b%s\b" % re.escape(sym))
if paths:
ok = any(pat.search(body(p)) for p in paths)
else:
if go_all is None:
go_all = git(repo, "grep", "-h", "-E", r"^(func|type|var|const|\s+[A-Za-z_]+\s)", ref, "--", "*.go")
ok = bool(pat.search(go_all))
if not ok:
missing += 1
where = ", ".join(scope) if scope else "the tree"
print("%s (line %d, %s, %s): %s not found in %s" % (inv, n, kind, status, t, where))
print("%d rows, %d anchors, %d missing at %s" % (rows, anchors, missing, ref))
if rows == 0 or anchors == 0:
print("ledger_check: no ledger rows or anchors found: refusing to pass", file=sys.stderr)
sys.exit(2)
sys.exit(1 if missing else 0)
if __name__ == "__main__":
main()
Loaded 100 of 5244 files, more files were not shown because too many files have changed in this diff. Show more