mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-11-04 14:23:43 -05:00
* Default the replication block in core.status so a newer CLI reads an older daemon A10dbc18CLI asking a pre-#3109 daemon for status over --device failed with 'missing field replication'. ReplicationStatus now derives Default and the field carries serde(default); a unit test deserializes the pre-#3109 payload shape. ts-client types regenerated. Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com> * Expose replication.paused through sd config get, set and show The pause switch was only readable through sd status; config get reported an unknown key. get reads it from the daemon config, set calls the existing mounts.replication_set_paused action, show lists it, and the help text names every key get and set accept. Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com> * Answer sync traffic for an absent library once per connection, with an Error reply A member that deleted its copy of a library stays in the other members' device table, so every catch-up they ran logged an ERROR on the receiver and timed out on the sender. The multiplexer now logs one WARN per connection (keyed on the peer's connected_at) and debug after that, answers requests with the existing SyncMessage::Error variant, and the backfill request helpers turn that reply into a failure with the peer's reason so the catch-up loop backs off instead of marking the peer caught up. No wire change. Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com> * Read paired and connected counts in core.status from the network registry core.status hardcoded both to zero, so sd status said Paired 0 while sd network status said Paired 1. Both now read the device registry, addresses come from the endpoint, and the rows are labelled 'Paired devices' and 'Connected devices'. Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com> * Resumable, logged sd update with sd update status Downloads land in <data>/updates/<asset>.<build>.part and resume with a Range request on the next attempt; a transfer that moves no bytes for 60 s is abandoned for that run with the part kept; the sha256 is checked on the complete part before either binary is replaced. Every attempt appends a line with its result and reason to logs/update.log and writes update-state.json; sd update status prints the running build, the sd-version.txt marker, the last attempt, any part waiting to resume and the timer state. After an install the build commit (or release tag) is written to sd-version.txt beside the binaries, the same marker the local rebuild script writes. The launchd agent already had RunAtLoad; the docs now say so. Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com> * Ask launchd for 65536 file descriptors in the daemon agent The plist set 8192 and the core warned about it at every boot. Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com> * List jobs without loading each job's persisted state blob jobs.list read full job rows, including the serialized job state; an indexer over millions of files keeps its seen-path set there, so a hundred rows took 45 s over a remote link and not much less locally. The listing and the running-job fallback now select only the columns the row needs through a partial model. The payload is unchanged. Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com> * Drop maximize-build-space from the Blacksmith release and server jobs The action leaves a Blacksmith runner with about 100 MB of root disk. Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com> * Register the housekeeping row in PROJECT_STATUS.md Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com> * Make main the branch of record: nightly and core tests trigger on main main was fast-forwarded to sources at10dbc18. nightly.yml and core_tests.yml now trigger on main, with sources kept in the lists for one release so a stray push there still builds; the nightly docs and the PROJECT_STATUS.md register row name main. Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com> * Bound every updater HTTP read with the idle timeout The checksum and release fetches awaited their bodies with no timeout, so a stalled proxy could hang a timer run before anything was logged. Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>
121 lines
3.7 KiB
YAML
121 lines
3.7 KiB
YAML
name: Server release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-server:
|
|
name: Build a docker image for spacedrive server
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Homebrew
|
|
id: set-up-homebrew
|
|
uses: Homebrew/actions/setup-homebrew@master
|
|
|
|
- name: Update Podman & crun
|
|
run: |
|
|
sudo apt-get remove crun podman
|
|
brew install crun podman
|
|
|
|
- name: Update buildah
|
|
shell: bash
|
|
run: |
|
|
set -euxo pipefail
|
|
wget -O- 'https://github.com/HeavenVolkoff/buildah-static/releases/latest/download/buildah-amd64.tar.gz' \
|
|
| sudo tar -xzf- -C /usr/local/bin
|
|
|
|
- name: Install netavark
|
|
shell: bash
|
|
run: |
|
|
set -euxo pipefail
|
|
sudo mkdir -p /usr/local/lib/podman
|
|
sudo wget -O- 'https://github.com/containers/netavark/releases/latest/download/netavark.gz' \
|
|
| gunzip | sudo dd status=none of=/usr/local/lib/podman/netavark
|
|
sudo chmod +x /usr/local/lib/podman/netavark
|
|
|
|
- name: Install passt
|
|
shell: bash
|
|
working-directory: /tmp
|
|
run: |
|
|
set -euxo pipefail
|
|
|
|
deb="$(
|
|
curl -SsL https://passt.top/builds/latest/x86_64 \
|
|
| grep -oP 'passt[^\.<>'\''"]+\.deb' | sort -u | head -n1
|
|
)"
|
|
|
|
curl -SsJLO "https://passt.top/builds/latest/x86_64/${deb}"
|
|
sudo dpkg -i "${deb}"
|
|
|
|
- name: Basic sanity check
|
|
run: |
|
|
crun --version
|
|
podman version
|
|
buildah --version
|
|
|
|
- name: Determine image name & tag
|
|
id: image_info
|
|
shell: bash
|
|
run: |
|
|
set -euxo pipefail
|
|
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
|
|
IMAGE_TAG="${GITHUB_REF##*/}"
|
|
# Only tag as "latest" for stable releases (no alpha/beta/rc suffix)
|
|
if [[ "$IMAGE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
EXTRA_TAG="latest"
|
|
else
|
|
EXTRA_TAG=""
|
|
fi
|
|
else
|
|
IMAGE_TAG="$(git rev-parse --short "$GITHUB_SHA")"
|
|
EXTRA_TAG="staging"
|
|
fi
|
|
IMAGE_TAG="${IMAGE_TAG,,}"
|
|
IMAGE_NAME="${GITHUB_REPOSITORY,,}/server"
|
|
|
|
echo "Building ${IMAGE_NAME}:${IMAGE_TAG}"
|
|
|
|
echo "tag=${IMAGE_TAG}" >> "$GITHUB_OUTPUT"
|
|
echo "extra_tag=${EXTRA_TAG}" >> "$GITHUB_OUTPUT"
|
|
echo "name=${IMAGE_NAME}" >> "$GITHUB_OUTPUT"
|
|
echo "repo=${GITHUB_REPOSITORY}" >> "$GITHUB_OUTPUT"
|
|
echo "repo_ref=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
with:
|
|
platforms: 'arm64'
|
|
|
|
- name: Build image
|
|
id: build-image
|
|
uses: redhat-actions/buildah-build@v2
|
|
with:
|
|
tags: ${{ steps.image_info.outputs.extra_tag && format('{0} {1}', steps.image_info.outputs.tag, steps.image_info.outputs.extra_tag) || steps.image_info.outputs.tag }}
|
|
archs: amd64, arm64
|
|
image: ${{ steps.image_info.outputs.name }}
|
|
layers: 'false'
|
|
context: .
|
|
build-args: |
|
|
REPO=${{ steps.image_info.outputs.repo }}
|
|
REPO_REF=${{ steps.image_info.outputs.repo_ref }}
|
|
containerfiles: |
|
|
./apps/server/Dockerfile
|
|
|
|
- name: Push image to ghcr.io
|
|
uses: redhat-actions/push-to-registry@v2
|
|
with:
|
|
tags: ${{ steps.build-image.outputs.tags }}
|
|
image: ${{ steps.build-image.outputs.image }}
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|