mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-08-16 04:06:44 +00:00
* filer: keep the existing peer subscription on a repeated add A cluster node add for a peer that is already followed restarted the subscription, dropping the metadata events between the two runs. * master: tell a connecting client the current cluster membership Cluster node updates are only broadcast to the clients connected at that moment. A filer that lost its master stream while a peer came back never learned about the peer, and stopped replicating its metadata for good. * test: a filer joining the master learns about the filers already there * test: a filer resubscribes to a peer that registered while it was disconnected Runs the reported sequence against real processes: filer2 leaves, filer1 is paused and its master stream is broken, filer2 registers again, and filer1 has to replicate from it after reconnecting.
94 lines
2.8 KiB
YAML
94 lines
2.8 KiB
YAML
name: "Metadata Subscribe Integration Tests"
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'weed/filer/**'
|
|
- 'weed/pb/filer_pb/**'
|
|
- 'weed/util/log_buffer/**'
|
|
- 'weed/server/filer_grpc_server_sub_meta.go'
|
|
- 'weed/server/master_grpc_server.go'
|
|
- 'weed/command/filer_backup.go'
|
|
- 'test/metadata_subscribe/**'
|
|
- '.github/workflows/metadata-subscribe-tests.yml'
|
|
pull_request:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'weed/filer/**'
|
|
- 'weed/pb/filer_pb/**'
|
|
- 'weed/util/log_buffer/**'
|
|
- 'weed/server/filer_grpc_server_sub_meta.go'
|
|
- 'weed/server/master_grpc_server.go'
|
|
- 'weed/command/filer_backup.go'
|
|
- 'test/metadata_subscribe/**'
|
|
- '.github/workflows/metadata-subscribe-tests.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.head_ref }}/metadata-subscribe-tests
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
TEST_TIMEOUT: '10m'
|
|
|
|
jobs:
|
|
metadata-subscribe-integration:
|
|
name: Metadata Subscribe Integration Tests
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 20
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Build SeaweedFS
|
|
run: |
|
|
cd weed
|
|
go build -o weed .
|
|
chmod +x weed
|
|
./weed version
|
|
|
|
- name: Run Metadata Subscribe Integration Tests
|
|
run: |
|
|
cd test/metadata_subscribe
|
|
|
|
echo "Running Metadata Subscribe integration tests..."
|
|
echo "============================================"
|
|
|
|
# Run tests with verbose output
|
|
go test -v -timeout=${{ env.TEST_TIMEOUT }} ./...
|
|
|
|
echo "============================================"
|
|
echo "Metadata Subscribe integration tests completed"
|
|
|
|
- name: Archive logs on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: metadata-subscribe-test-logs
|
|
path: |
|
|
/tmp/seaweedfs_*
|
|
retention-days: 7
|
|
|
|
- name: Test Summary
|
|
if: always()
|
|
run: |
|
|
echo "## Metadata Subscribe Integration Test Summary" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "### Test Coverage" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Basic Subscription**: Subscribe to metadata changes and receive events" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Single-Filer No Stall**: Regression test for issue #4977" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Resume from Disk**: Verify subscription can resume from persisted logs" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "### Related Issues" >> $GITHUB_STEP_SUMMARY
|
|
echo "- [#4977](https://github.com/seaweedfs/seaweedfs/issues/4977): filer.backup synchronisation stall" >> $GITHUB_STEP_SUMMARY
|
|
|