mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-26 23:10:44 +01:00
GitHub is retiring ubuntu-22.04; move all 94 runs-on pins across 40 workflows to ubuntu-24.04. rust_binaries_release: the arm64 cross step was jammy-era — noble keeps apt sources in deb822 ubuntu.sources (the sources.list edit was a silent no-op that left amd64 repos open to arm64 and 404'd) and ports suites must say noble. Pin deb822 stanzas to amd64 and add noble ports entries.
112 lines
3.5 KiB
YAML
112 lines
3.5 KiB
YAML
name: "S3 SDK V2 Route Disambiguation Tests"
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'weed/s3api/**'
|
|
- 'test/s3/sdk_v2_routing/**'
|
|
- '.github/workflows/s3-sdk-v2-routing-tests.yml'
|
|
pull_request:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'weed/s3api/**'
|
|
- 'test/s3/sdk_v2_routing/**'
|
|
- '.github/workflows/s3-sdk-v2-routing-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-sdk-v2-routing-tests:
|
|
name: S3 SDK V2 Routing Tests
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 10
|
|
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: Install SeaweedFS
|
|
run: |
|
|
cd weed && go install -buildvcs=false
|
|
|
|
- name: Start weed mini (S3 on :8333)
|
|
# Pins the regression for issue #9559: AWS SDK V2 / Hadoop s3a
|
|
# listing a bucket literally named "buckets" must get an XML
|
|
# ListObjectsV2 response, not the JSON ListTableBuckets body
|
|
# served by the S3 Tables REST endpoint on the same path.
|
|
run: |
|
|
mkdir -p /tmp/seaweedfs-sdk-v2-routing
|
|
cat > /tmp/seaweedfs-sdk-v2-routing-s3.json <<'JSON'
|
|
{
|
|
"identities": [
|
|
{
|
|
"name": "admin",
|
|
"credentials": [
|
|
{"accessKey": "some_access_key1", "secretKey": "some_secret_key1"}
|
|
],
|
|
"actions": ["Admin", "Read", "Write"]
|
|
}
|
|
]
|
|
}
|
|
JSON
|
|
AWS_ACCESS_KEY_ID=some_access_key1 \
|
|
AWS_SECRET_ACCESS_KEY=some_secret_key1 \
|
|
weed mini \
|
|
-dir=/tmp/seaweedfs-sdk-v2-routing \
|
|
-s3.port=8333 \
|
|
-s3.config=/tmp/seaweedfs-sdk-v2-routing-s3.json \
|
|
-ip=127.0.0.1 \
|
|
> /tmp/weed-mini.log 2>&1 &
|
|
echo $! > /tmp/weed-mini.pid
|
|
|
|
for i in $(seq 1 30); do
|
|
if curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8333/ | grep -qE "^(200|403)$"; then
|
|
echo "weed mini is ready"
|
|
exit 0
|
|
fi
|
|
sleep 1
|
|
done
|
|
echo "weed mini failed to start within 30s"
|
|
tail -50 /tmp/weed-mini.log
|
|
exit 1
|
|
|
|
- name: Run SDK V2 routing tests
|
|
env:
|
|
S3_ENDPOINT: http://127.0.0.1:8333
|
|
AWS_ACCESS_KEY_ID: some_access_key1
|
|
AWS_SECRET_ACCESS_KEY: some_secret_key1
|
|
AWS_REGION: us-east-1
|
|
run: go test -v -timeout=5m ./test/s3/sdk_v2_routing/...
|
|
|
|
- name: Stop weed mini
|
|
if: always()
|
|
run: |
|
|
if [ -f /tmp/weed-mini.pid ]; then
|
|
kill "$(cat /tmp/weed-mini.pid)" 2>/dev/null || true
|
|
fi
|
|
|
|
- name: Show server log on failure
|
|
if: failure()
|
|
run: |
|
|
echo "=== weed mini log (last 200 lines) ==="
|
|
tail -n 200 /tmp/weed-mini.log 2>/dev/null || echo "no log available"
|
|
|
|
- name: Archive log
|
|
if: failure()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: s3-sdk-v2-routing-server-log
|
|
path: /tmp/weed-mini.log
|
|
retention-days: 3
|