mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-23 22:40:39 +02:00
* ci: cancel superseded workflow runs on PR pushes
PR-triggered workflows without a concurrency group keep running (and
holding runner slots) after a force-push or quick follow-up commit
supersedes them. Add the same group/cancel-in-progress block the go
workflow already uses, keyed on head_ref, to the remaining PR workflows.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* ci: key concurrency groups on PR number or ref, not head_ref
github.head_ref is empty on tag pushes and manual runs (every run then
shares one group and cancels the last) and collides across forks when
two PRs share a branch name. pull_request.number is unique per PR;
github.ref covers push/tag/dispatch. Applied to all workflows using the
pattern, including pre-existing ones.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* ci: restrict cancel-in-progress to PR and branch-push runs
* ci: serialize container_latest manual runs by destination tag
Two workflow_dispatch runs sharing an image_tag could otherwise build
concurrently: their per-arch images publish to the same platform tags,
so one run's create-manifest job can combine platforms from different
source refs. Group dispatch runs by the destination tag (with
cancel-in-progress already disabled for non-PR/non-branch events) so
same-tag publishes queue instead of interleaving.
* ci: serialize manual publish runs by destination tag in remaining container workflows
* ci: group foundationdb release dispatch runs by release tag
A manual run now shares the tag-push concurrency group for the same
release, so a re-publish of a tag queues behind (or ahead of) the push
run instead of racing it on the same image tag.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* ci: serialize foundationdb_version dispatch runs by destination tag
Two manual runs resolving to the same docker tag now share a concurrency
group (explicit image_tag, else the computed
foundationdb_<fdb>_seaweedfs_<ref> default), so they queue instead of
racing pushes to the same tag.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* ci: drop unsupported toLower() from foundationdb_version concurrency group
* ci: key rocksdb_version dispatch group on its published tag
* ci: queue publish runs via turnstyle instead of cancel-free shared groups
* Revert "ci: queue publish runs via turnstyle instead of cancel-free shared groups"
This reverts commit 039148f8d5.
* ci: queue same-tag publish runs instead of replacing the pending one
Dispatch/tag-only workflows can never cancel in progress, so opt their
concurrency groups into queue: max — up to 100 same-tag publishes wait
in line rather than each new dispatch cancelling the pending one.
---------
Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
149 lines
4.7 KiB
YAML
149 lines
4.7 KiB
YAML
name: "S3 Mutation Regression Tests"
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'weed/s3api/**'
|
|
- 'test/s3/delete/**'
|
|
- 'test/s3/distributed_lock/**'
|
|
- 'test/s3/versioning/**'
|
|
- 'test/volume_server/framework/**'
|
|
- 'docker/compose/s3.json'
|
|
- '.github/workflows/s3-mutation-regression-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-versioning-regressions:
|
|
name: S3 Versioning Regression Tests
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 25
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Run S3 versioning regression tests
|
|
timeout-minutes: 20
|
|
working-directory: test/s3/versioning
|
|
run: |
|
|
set -x
|
|
# Run every versioning test, so a regression test lands covered instead
|
|
# of waiting for someone to remember this file. Name a test in EXCLUDE,
|
|
# with the reason, to keep it out.
|
|
#
|
|
# TestVersioningPagination*: opt-in stress tests that build 1500+
|
|
# versions. They self-skip without ENABLE_STRESS_TESTS and have their
|
|
# own make target, so this gate should not carry them.
|
|
EXCLUDE='TestVersioningPagination.*'
|
|
tests=$(go test . -list '.*' | grep '^Test' | sort -u)
|
|
# An empty list would make -run match nothing and pass this job vacuously.
|
|
[ -n "$tests" ] || { echo "listed no versioning tests"; exit 1; }
|
|
selected=$(echo "$tests" | grep -vE "^($EXCLUDE)$")
|
|
[ -n "$selected" ] || { echo "EXCLUDE matched every test"; exit 1; }
|
|
echo "running $(echo "$selected" | wc -l) of $(echo "$tests" | wc -l) versioning tests"
|
|
# make swallows a lone trailing $, taking the anchor with it, so escape it.
|
|
make test-with-server TEST_PATTERN="^($(echo "$selected" | paste -sd'|' -))"'$$'
|
|
|
|
- name: Show server logs on failure
|
|
if: failure()
|
|
working-directory: test/s3/versioning
|
|
run: |
|
|
echo "=== Server Logs ==="
|
|
if [ -f weed-test.log ]; then
|
|
tail -100 weed-test.log
|
|
fi
|
|
|
|
- name: Upload versioning logs on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: s3-versioning-regression-logs
|
|
path: test/s3/versioning/weed-test*.log
|
|
retention-days: 3
|
|
|
|
s3-delete-regressions:
|
|
name: S3 Delete Regression Tests
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 20
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Run S3 delete regression tests
|
|
timeout-minutes: 15
|
|
working-directory: test/s3/delete
|
|
run: |
|
|
set -x
|
|
make test-with-server
|
|
|
|
- name: Show server logs on failure
|
|
if: failure()
|
|
working-directory: test/s3/delete
|
|
run: |
|
|
echo "=== Server Logs ==="
|
|
if [ -f weed-test.log ]; then
|
|
tail -100 weed-test.log
|
|
fi
|
|
|
|
- name: Upload delete logs on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: s3-delete-regression-logs
|
|
path: test/s3/delete/weed-test*.log
|
|
retention-days: 3
|
|
|
|
s3-distributed-lock-regressions:
|
|
name: S3 Distributed Lock Regression Tests
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Build SeaweedFS
|
|
run: |
|
|
go build -o weed/weed -buildvcs=false ./weed
|
|
|
|
- name: Run distributed lock regressions
|
|
timeout-minutes: 25
|
|
env:
|
|
TMPDIR: ${{ github.workspace }}/test/s3/distributed_lock/tmp
|
|
S3_DISTRIBUTED_LOCK_KEEP_LOGS: "1"
|
|
WEED_BINARY: ${{ github.workspace }}/weed/weed
|
|
run: |
|
|
set -x
|
|
mkdir -p "$TMPDIR"
|
|
go test -v -count=1 -timeout=20m ./test/s3/distributed_lock
|
|
|
|
- name: Upload distributed lock logs on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: s3-distributed-lock-regression-logs
|
|
path: test/s3/distributed_lock/tmp/seaweedfs_s3_distributed_lock_*
|
|
retention-days: 3
|