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>
125 lines
4.7 KiB
YAML
125 lines
4.7 KiB
YAML
name: "mount: windows conformance"
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'weed/mount/**'
|
|
- 'weed/command/mount*.go'
|
|
- 'weed/storage/volume_vacuum*.go'
|
|
- 'weed/storage/volume_loading.go'
|
|
- 'weed/storage/disk_location.go'
|
|
- 'test/winfsp-conformance/**'
|
|
- '.github/workflows/mount-windows-conformance.yml'
|
|
# No base branch filter: this is the only thing that runs the Windows mount,
|
|
# so it should cover a pull request stacked on another one too.
|
|
pull_request:
|
|
paths:
|
|
- 'weed/mount/**'
|
|
- 'weed/command/mount*.go'
|
|
- 'weed/storage/volume_vacuum*.go'
|
|
- 'weed/storage/volume_loading.go'
|
|
- 'weed/storage/disk_location.go'
|
|
- 'test/winfsp-conformance/**'
|
|
- '.github/workflows/mount-windows-conformance.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:
|
|
conformance:
|
|
name: WinFsp conformance
|
|
runs-on: windows-latest
|
|
timeout-minutes: 60
|
|
env:
|
|
# The runner ships MinGW, so cgo is on by default and cgofuse picks its
|
|
# cgo variant, which wants WinFsp's headers. The nocgo variant loads
|
|
# winfsp-x64.dll at run time instead, which is how weed.exe is released.
|
|
CGO_ENABLED: 0
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
# cgofuse loads winfsp-x64.dll at run time, so WinFsp is needed here but
|
|
# not to build.
|
|
- name: Install WinFsp
|
|
run: choco install winfsp -y --no-progress
|
|
|
|
- name: Build weed.exe
|
|
run: go build -o weed.exe ./weed
|
|
|
|
# The runner tears down a step's process tree when its shell exits, so a
|
|
# cluster started in one step is gone by the next. Everything that needs
|
|
# the cluster and the mount alive has to share a step.
|
|
- name: Mount and run winfsp-tests
|
|
shell: pwsh
|
|
run: |
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
function Test-Port($port) {
|
|
# A plain connect, because Test-NetConnection has reported success
|
|
# here for a port nothing was listening on.
|
|
$client = New-Object System.Net.Sockets.TcpClient
|
|
try { $client.Connect('127.0.0.1', $port); return $client.Connected }
|
|
catch { return $false }
|
|
finally { $client.Dispose() }
|
|
}
|
|
|
|
function Start-Mount($log) {
|
|
Start-Process -FilePath .\weed.exe `
|
|
-ArgumentList '-logtostderr','mount','-filer=127.0.0.1:8888','-dir=S:' `
|
|
-RedirectStandardOutput "C:\$log.log" -RedirectStandardError "C:\$log.err.log"
|
|
$deadline = (Get-Date).AddMinutes(2)
|
|
while ((Get-Date) -lt $deadline) {
|
|
if (Test-Path S:\) { Write-Host "S: is mounted"; return }
|
|
Start-Sleep -Seconds 2
|
|
}
|
|
Get-Content "C:\$log.log", "C:\$log.err.log" -ErrorAction SilentlyContinue
|
|
throw "S: never appeared"
|
|
}
|
|
|
|
New-Item -ItemType Directory -Force -Path C:\seaweed-data | Out-Null
|
|
# -ip pins the cluster to loopback; it otherwise advertises and binds
|
|
# the runner's LAN address, which 127.0.0.1 cannot reach.
|
|
Start-Process -FilePath .\weed.exe `
|
|
-ArgumentList '-logtostderr','mini','-dir=C:\seaweed-data','-ip=127.0.0.1' `
|
|
-RedirectStandardOutput C:\seaweed-mini.log -RedirectStandardError C:\seaweed-mini.err.log
|
|
|
|
$deadline = (Get-Date).AddMinutes(3)
|
|
while ((Get-Date) -lt $deadline) {
|
|
# The mount dials grpc, not http, so both ports have to answer.
|
|
if ((Test-Port 8888) -and (Test-Port 18888)) { break }
|
|
Start-Sleep -Seconds 3
|
|
}
|
|
if (-not ((Test-Port 8888) -and (Test-Port 18888))) {
|
|
Get-Content C:\seaweed-mini.log, C:\seaweed-mini.err.log -ErrorAction SilentlyContinue
|
|
throw "filer never came up"
|
|
}
|
|
Write-Host "filer is up on http 8888 and grpc 18888"
|
|
|
|
Start-Mount 'seaweed-mount'
|
|
|
|
Write-Host "::group::winfsp-tests"
|
|
& pwsh -File test/winfsp-conformance/run.ps1 -MountPoint S:\
|
|
$code = $LASTEXITCODE
|
|
Write-Host "::endgroup::"
|
|
if ($code -ne 0) { throw "winfsp-tests failed with exit $code" }
|
|
|
|
- name: Logs
|
|
if: always()
|
|
shell: pwsh
|
|
run: |
|
|
foreach ($f in 'C:\seaweed-mount.log','C:\seaweed-mount.err.log','C:\seaweed-mini.log','C:\seaweed-mini.err.log') {
|
|
if (Test-Path $f) { Write-Host "===== $f"; Get-Content $f -Tail 200 }
|
|
}
|