mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-24 06:50:40 +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>
146 lines
4.9 KiB
YAML
146 lines
4.9 KiB
YAML
name: "Kafka Quick Test (Load Test with Schema Registry)"
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'weed/mq/**'
|
|
- 'weed/pb/mq_pb/**'
|
|
- 'weed/pb/schema_pb/**'
|
|
- 'test/kafka/**'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- '.github/workflows/kafka-quicktest.yml'
|
|
pull_request:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'weed/mq/**'
|
|
- 'weed/pb/mq_pb/**'
|
|
- 'weed/pb/schema_pb/**'
|
|
- 'test/kafka/**'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
- '.github/workflows/kafka-quicktest.yml'
|
|
workflow_dispatch: # Allow manual trigger
|
|
|
|
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:
|
|
kafka-client-quicktest:
|
|
name: Kafka Client Load Test (Quick)
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version: ^1.26
|
|
cache: true
|
|
cache-dependency-path: |
|
|
**/go.sum
|
|
id: go
|
|
|
|
- name: Configure Docker Hub mirror
|
|
run: |
|
|
echo '{"registry-mirrors": ["https://mirror.gcr.io"]}' | sudo tee /etc/docker/daemon.json
|
|
sudo systemctl restart docker
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
# Ensure make is available
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y make
|
|
|
|
- name: Validate test setup
|
|
working-directory: test/kafka/kafka-client-loadtest
|
|
run: |
|
|
make validate-setup
|
|
|
|
- name: Run quick-test
|
|
working-directory: test/kafka/kafka-client-loadtest
|
|
run: |
|
|
# Run the quick-test target which includes:
|
|
# 1. Building the gateway
|
|
# 2. Starting all services (SeaweedFS, MQ broker, Schema Registry)
|
|
# 3. Registering Avro schemas
|
|
# 4. Running a 1-minute load test with Avro messages
|
|
# Override GOARCH to build for AMD64 (GitHub Actions runners are x86_64)
|
|
GOARCH=amd64 make quick-test
|
|
env:
|
|
# Docker Compose settings
|
|
COMPOSE_HTTP_TIMEOUT: 300
|
|
DOCKER_CLIENT_TIMEOUT: 300
|
|
# Test parameters (set by quick-test, but can override)
|
|
TEST_DURATION: 60s
|
|
PRODUCER_COUNT: 1
|
|
CONSUMER_COUNT: 1
|
|
MESSAGE_RATE: 10
|
|
VALUE_TYPE: avro
|
|
|
|
- name: Show test results
|
|
if: always()
|
|
working-directory: test/kafka/kafka-client-loadtest
|
|
run: |
|
|
echo "========================================="
|
|
echo "Test Results"
|
|
echo "========================================="
|
|
make show-results || echo "Could not retrieve results"
|
|
|
|
- name: Show service logs on failure
|
|
if: failure()
|
|
working-directory: test/kafka/kafka-client-loadtest
|
|
run: |
|
|
echo "========================================="
|
|
echo "Service Logs"
|
|
echo "========================================="
|
|
|
|
echo "Checking running containers..."
|
|
docker compose ps || true
|
|
|
|
echo "========================================="
|
|
echo "Master Logs"
|
|
echo "========================================="
|
|
docker compose logs --tail=100 seaweedfs-master 2>&1 || echo "No master logs available"
|
|
|
|
echo "========================================="
|
|
echo "MQ Broker Logs (Last 100 lines)"
|
|
echo "========================================="
|
|
docker compose logs --tail=100 seaweedfs-mq-broker 2>&1 || echo "No broker logs available"
|
|
|
|
echo "========================================="
|
|
echo "Kafka Gateway Logs (FULL - Critical for debugging)"
|
|
echo "========================================="
|
|
docker compose logs kafka-gateway 2>&1 || echo "ERROR: Could not retrieve kafka-gateway logs"
|
|
|
|
echo "========================================="
|
|
echo "Schema Registry Logs (FULL)"
|
|
echo "========================================="
|
|
docker compose logs schema-registry 2>&1 || echo "ERROR: Could not retrieve schema-registry logs"
|
|
|
|
echo "========================================="
|
|
echo "Load Test Logs"
|
|
echo "========================================="
|
|
docker compose logs --tail=100 kafka-client-loadtest 2>&1 || echo "No loadtest logs available"
|
|
|
|
- name: Cleanup
|
|
if: always()
|
|
working-directory: test/kafka/kafka-client-loadtest
|
|
run: |
|
|
# Stop containers first
|
|
docker compose --profile loadtest --profile monitoring down -v --remove-orphans || true
|
|
# Clean up data with sudo to handle Docker root-owned files
|
|
sudo rm -rf data/* || true
|
|
# Clean up binary
|
|
rm -f weed-linux-* || true
|