mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-24 15:00:43 +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>
132 lines
4.3 KiB
YAML
132 lines
4.3 KiB
YAML
name: "test s3 over https using aws-cli"
|
|
|
|
on:
|
|
push:
|
|
branches: [master, test-https-s3-awscli]
|
|
paths:
|
|
- 'weed/s3api/**'
|
|
- 'weed/server/**'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- '.github/workflows/test-s3-over-https-using-awscli.yml'
|
|
pull_request:
|
|
branches: [master, test-https-s3-awscli]
|
|
paths:
|
|
- 'weed/s3api/**'
|
|
- 'weed/server/**'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- '.github/workflows/test-s3-over-https-using-awscli.yml'
|
|
|
|
env:
|
|
AWS_ACCESS_KEY_ID: some_access_key1
|
|
AWS_SECRET_ACCESS_KEY: some_secret_key1
|
|
AWS_ENDPOINT_URL: https://localhost:8443
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: weed
|
|
|
|
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/')) }}
|
|
|
|
jobs:
|
|
awscli-tests:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version: ^1.26
|
|
|
|
- name: Build SeaweedFS
|
|
run: |
|
|
go build
|
|
|
|
- name: Start SeaweedFS
|
|
run: |
|
|
set -e
|
|
mkdir -p /tmp/data
|
|
./weed -v=3 server -s3 -dir=/tmp/data -s3.config=../docker/compose/s3.json -master.peers=none > weed.log 2>&1 &
|
|
until curl -s http://localhost:8333/healthz > /dev/null; do sleep 1; done
|
|
|
|
- name: Setup Caddy
|
|
run: |
|
|
curl -fsSL "https://caddyserver.com/api/download?os=linux&arch=amd64" -o caddy
|
|
chmod +x caddy
|
|
./caddy version
|
|
echo "{
|
|
auto_https disable_redirects
|
|
local_certs
|
|
}
|
|
localhost:8443 {
|
|
tls internal
|
|
reverse_proxy localhost:8333
|
|
}" > Caddyfile
|
|
|
|
- name: Start Caddy
|
|
run: |
|
|
./caddy start
|
|
until curl -fsS --insecure https://localhost:8443/healthz > /dev/null; do sleep 1; done
|
|
|
|
- name: Create Bucket
|
|
run: |
|
|
aws --no-verify-ssl s3api create-bucket --bucket bucket
|
|
|
|
- name: Test PutObject
|
|
run: |
|
|
set -e
|
|
dd if=/dev/urandom of=generated bs=1M count=2
|
|
aws --no-verify-ssl s3api put-object --bucket bucket --key test-putobject --body generated
|
|
aws --no-verify-ssl s3api get-object --bucket bucket --key test-putobject downloaded
|
|
diff -q generated downloaded
|
|
rm -f generated downloaded
|
|
|
|
- name: Test Multi-part Upload
|
|
run: |
|
|
set -e
|
|
dd if=/dev/urandom of=generated bs=1M count=32
|
|
aws --no-verify-ssl s3 cp --no-progress generated s3://bucket/test-multipart
|
|
for i in 1 2 3 4 5; do
|
|
aws --no-verify-ssl s3 cp --no-progress s3://bucket/test-multipart downloaded && break
|
|
if [ "$i" -eq 5 ]; then exit 1; fi
|
|
sleep 2
|
|
done
|
|
diff -q generated downloaded
|
|
rm -f generated downloaded
|
|
|
|
- name: Test GetObject with If-Match
|
|
run: |
|
|
set -e
|
|
dd if=/dev/urandom of=generated bs=1M count=32
|
|
ETAG=$(aws --no-verify-ssl s3api put-object --bucket bucket --key test-get-obj --body generated | jq -r .ETag)
|
|
# jq -r already removes quotes, so use ETAG directly (handles both simple and multipart ETags)
|
|
aws --no-verify-ssl s3api get-object --bucket bucket --key test-get-obj --if-match "$ETAG" downloaded
|
|
diff -q generated downloaded
|
|
rm -f generated downloaded
|
|
|
|
- name: Show server logs on failure
|
|
if: failure()
|
|
run: |
|
|
echo "========================================="
|
|
echo "SeaweedFS Server Logs"
|
|
echo "========================================="
|
|
# Note: weed.log is relative to working-directory (weed/)
|
|
if [ -f weed.log ]; then
|
|
cat weed.log
|
|
else
|
|
echo "No weed.log file found"
|
|
fi
|
|
|
|
- name: Upload server logs on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: seaweedfs-logs
|
|
# Note: actions don't use defaults.run.working-directory, so path is relative to workspace root
|
|
path: weed/weed.log
|
|
retention-days: 3
|