153 Commits
Author SHA1 Message Date
nanxun 746979bdd5 fix: restore multi-arch api builds 2026-09-19 13:21:42 +08:00
nanxun 8960b68ac8 fix: harden auto uploads and table layouts 2026-09-19 10:25:10 +08:00
nanxun f0fb4db755 ci: bypass proxy for daocloud image layers 2026-09-16 23:40:56 +08:00
nanxun c056a3e741 fix: prevent database circuit failure storm 2026-09-02 20:41:51 +08:00
nanxun 60d1930447 test: make storage guard capacity deterministic 2026-08-18 00:52:42 +08:00
nanxun 4eb2c0724e fix: remove short fragment recovery scan 2026-08-18 00:30:01 +08:00
nanxun 90a67bdf72 fix: harden recording recovery and dashboard metrics 2026-08-14 19:20:24 +08:00
nanxun 506dca898e ci: make release artifacts selectable 2026-08-14 13:31:15 +08:00
nanxun 51e4c41ee2 fix: recover merged uploads and rotate logs 2026-08-14 13:09:49 +08:00
nanxun 7a33b2c6e3 feat: accelerate ffmpeg encoding with intel gpu 2026-08-14 01:46:08 +08:00
nanxun 83b5ea042d fix: keep buildx driver options scalar 2026-08-14 00:49:45 +08:00
nanxun d38c9490ba ci: route remaining package downloads to mirrors 2026-08-13 23:37:21 +08:00
nanxun 96ed3396d9 ci: use domestic mirrors and persistent caches 2026-08-13 23:15:48 +08:00
nanxun fdab9978bf fix: refresh uploads and remember login 2026-08-13 22:25:00 +08:00
nanxun e0bd001541 fix: restore native FLV reconnect with curl fallback 2026-08-12 12:14:43 +08:00
nanxun e6068d93e0 ci: harden registry proxy credentials 2026-08-12 00:01:50 +08:00
nanxun 534f8030c1 fix: keep BuildKit no-proxy driver option scalar 2026-08-11 23:32:44 +08:00
nanxun dc9ab046c5 ci: route BuildKit registry traffic through proxy 2026-08-11 23:04:52 +08:00
nanxun 0eb47e9918 ci: increment fnOS package version per build 2026-08-11 18:03:57 +08:00
nanxun 5e2e0530f1 ci: recover sudo-owned build metadata 2026-08-11 14:26:12 +08:00
nanxun 40acd35ad7 ci: reduce Docker build disk usage 2026-08-11 14:22:44 +08:00
nanxun df75ab272f ci: use ASCII workspace for Buildx sessions 2026-08-11 14:07:42 +08:00
nanxun 713e0111a6 ci: isolate sudo authentication from Buildx stdin 2026-08-11 14:01:18 +08:00
nanxun c3abb1f792 ci: scope Docker privilege to Jenkins credential 2026-08-11 13:54:24 +08:00
nanxun fd552ce2cc ci: expose local build tools to Jenkins agent 2026-08-11 13:43:25 +08:00
nanxun f2e55e46c4 ci: add Jenkins multi-architecture release pipeline 2026-08-11 13:34:58 +08:00
nanxun 19d358b312 feat: improve recording recovery and upload workflow 2026-08-10 11:14:34 +08:00
nanxun e0d3969e46 refactor: move PostgreSQL shared service to dedicated repository 2026-08-03 23:59:25 +08:00
nanxun ecc737f0bd feat: harden recording lifecycle and refresh fnOS UI 2026-08-03 23:45:26 +08:00
nanxun e5b50ea85c feat: add shared PostgreSQL fnOS service and refresh UI 2026-08-02 20:14:39 +08:00
nanxun de9f5ae110 fix: rebuild native fnOS package with fnpack 2026-08-02 17:18:02 +08:00
nanxun e8772a39b5 feat: add native fnOS package 2026-08-02 14:43:37 +08:00
nanxun e62dfd2de1 fix: create OpenList target directories before verification 2026-08-01 23:27:02 +08:00
nanxun 9091c1abc7 feat: add reliable OpenList segment uploads 2026-08-01 19:27:56 +08:00
nanxun 12ba62e2a0 fix: skip reconnect options when using curl pipe input
Reconnect options (-reconnect, -reconnect_streamed, etc.) only apply to
network inputs and cause 'Option reconnect not found' errors when the
input is pipe:0. Curl already handles connection resilience.
2026-07-09 12:30:11 +08:00
nanxun ad86c080e3 fix: use curl pipe to bypass FFmpeg HTTP header buffer limit
The previous -max_alloc approach does not fix the 'overlong headers' error
because FFmpeg 5.1 (Debian bookworm) uses a compile-time stack-allocated
buffer (MAX_URL_SIZE=4096) for HTTP response headers, which -max_alloc
cannot change.

Instead, when the stream URL is HTTP/HTTPS, launch curl to handle the
HTTP connection and pipe its stdout to FFmpeg via stdin (pipe:0). Curl
does not have the 4096-byte header limit, so it handles oversized CDN
response headers from Douyin without error.

Additional changes:
- RequestStopAsync kills curl first (instead of sending 'q' to FFmpeg),
  causing the pipe to close and FFmpeg to exit gracefully on EOF.
- SessionProcessRuntime tracks the curl process for cleanup.
2026-07-09 12:19:34 +08:00
nanxun 8a079b4698 fix: add max_alloc to prevent overlong headers error and throttle startup failure notifications
- Add -max_alloc 100000000 to FFmpeg arguments for HTTP inputs to avoid
  'overlong headers' error when CDN (e.g. Douyin) returns oversized HTTP
  response headers exceeding FFmpeg's default 4096-byte buffer.

- Add exponential backoff for repeated startup failures (30s → 15min cap)
  to break the tight fail→retry→re-poll loop that floods notifications.

- Throttle startup failure notifications to at most one per 30 minutes per
  room to prevent email/webhook storms during persistent failures.

- Reset backoff counter when a session successfully opens its first segment.
2026-07-09 11:51:52 +08:00
nanxun 48da49ac72 fix: invert reversed storage guard condition in MP4 finalization
The ternary in GetLowStoragePauseMessageAsync had its branches swapped:
when storage was healthy it returned the pause error, and when storage
was critically low it returned null (allowing finalization to proceed).
This caused MP4 finalization to always pause with a misleading 'storage
is Red' warning even when storage protection was disabled.
2026-07-05 18:10:49 +08:00
nanxunandClaude Opus 4.8 cdea5e8732 fix: switch docker-compose from local build to pre-built Harbor images
API and nginx services now pull from reg.nxsir.cn/live_recorder
instead of building locally. The 'build' sections referenced the old
Dockerfiles with WSL-specific binfmt/proxy workarounds; the CI pipeline
in Jenkinsfile now handles multi-arch builds and pushes.

Uses patchable REGISTRY_URL env var (defaults to reg.nxsir.cn).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 18:11:52 +08:00
nanxunandClaude Opus 4.8 5d57dff482 fix: declare proxy ARGs in frontend Dockerfile for npm ci
The frontend Dockerfile was missing HTTP_PROXY/HTTPS_PROXY ARG declarations
in the build stage, so npm ci could not reach the npm registry through the
builder's proxy. Same fix pattern as the API Dockerfile.

This explains why the Web image has never been successfully built — the
pipeline always skips 'Build Web' after 'Build API' fails, but once API
build succeeds, Web build would hit the same npm registry issue.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 18:04:53 +08:00
nanxunandClaude Opus 4.8 68ab2c773a fix: merge restore+publish+RID into one RUN so shell var persists
The case statement that sets RID based on TARGETARCH runs in a /bin/sh
subshell. When it was in a separate RUN from dotnet restore/publish,
the RID variable was not available to the publish command.

Merge the case dispatch, dotnet restore, and dotnet publish into a
single RUN so the RID shell variable stays in scope. Also restores
the COPY . . directive that was accidentally dropped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 17:22:48 +08:00
nanxunandClaude Opus 4.8 05efe5e125 fix: correct case statement syntax in TARGETARCH -> RID mapping
The previous inline case statement was missing proper variable assignment.
Use 'case' to set DOTNET_RID directly instead of trying to capture output
of a command substitution that contained a multi-branch case.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 17:19:53 +08:00
nanxunandClaude Opus 4.8 7a12b929dd fix: use docker TARGETARCH for runtime-specific dotnet publish
Removing RuntimeIdentifier from the csproj caused dotnet publish to produce
ALL platform runtimes (20+) in the output, making runtime loading ambiguous
and causing FileLoadException at startup.

Instead of hardcoding the RID in the csproj, use Docker's built-in TARGETARCH
ARG (injected automatically by buildx for multi-platform builds):
  amd64 -> -r linux-x64
  arm64 -> -r linux-arm64

This ensures native deps (SQLitePCLRaw, EF Core) resolve to exactly one
architecture per image, while keeping the csproj clean for local dev.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 17:17:38 +08:00
nanxunandClaude Opus 4.8 cee591b729 ci: use default docker builder instead of creating new one
docker driver only supports a single instance. Creating another fails with
'additional instances of driver docker cannot be created'. Just use the
default builder that ships with the docker daemon.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 16:14:36 +08:00
nanxunandClaude Opus 4.8 4312f23f85 ci: switch buildx back to docker driver to avoid pulling moby/buildkit from Docker Hub
The docker-container driver requires moby/buildkit:buildx-stable-1 from
Docker Hub, which is unreachable from the build network (EOF / timeout).
The docker driver runs buildkit inside the host daemon without needing
a separate container image.

Also explicitly rm + recreate the builder each run so stale
docker-container instances don't linger as the default.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 16:13:01 +08:00
nanxunandClaude Opus 4.8 83f16757e7 ci: add --no-cache to bypass stale build cache causing FileLoadException
Removing <RuntimeIdentifier> from the csproj changed the publish layout,
but the old registry build cache still contains the RID-poisoned layers.
Subsequent builds cached at the COPY/RUN layer boundary reuse those stale
layers, causing FileLoadException at runtime.

Add --no-cache to both API and Web buildx invocations so every build
produces fresh layers. Once the pipeline stabilizes, we can re-enable
cache-from with the updated cache tag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 16:08:41 +08:00
nanxunandClaude Opus 4.8 bcba0d752b fix: add --amend to docker manifest create for :latest tags, remove debug
:latest manifests already exist from the first successful run (build 123),
so subsequent docker manifest create without --amend fails with
'refusing to amend an existing manifest list'. Add --amend so every
pipeline run can update the :latest tag.

Also remove DEBUG config.json prints now that the auth path is verified.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 14:55:47 +08:00
nanxunandClaude Opus 4.8 1c700f67bc fix: remove hardcoded RuntimeIdentifier from csproj causing FileLoadException
The csproj had <RuntimeIdentifier>linux-arm64</RuntimeIdentifier> baked in,
which forced dotnet publish to produce linux-arm64 native output on EVERY
platform (including amd64). On amd64 containers the runtime could not load
the entry assembly, causing FileLoadException crash loops.

RID is unnecessary for framework-dependent builds (--p:UseAppHost=false
is already in the Dockerfile). Removing it lets each platform produce
its natural runtime output — the base dotnet/aspnet image already has
the correct architecture's runtime.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 14:29:30 +08:00
nanxunandClaude Opus 4.8 af7a3d1276 fix: declare proxy ARGs in build stage so dotnet restore reaches nuget.org
nuget.org is only reachable through the 7890 proxy from the build network
(direct hits return a 302 redirect loop; proxied requests return 200,
verified 8/8). The pipeline passes --build-arg HTTP_PROXY/HTTPS_PROXY, but
Dockerfile did not declare these ARGs in the build stage, so buildkit did
not inject them into the RUN environment and 'dotnet restore' tried nuget.org
directly -> NU1301 'Unable to load the service index'.

Declare HTTP_PROXY/HTTPS_PROXY/NO_PROXY (upper+lower case) as build-stage
ARGs and promote them to ENV so dotnet's HttpClient uses the proxy. Also add
two restore retries (--disable-parallel) to smooth over transient proxy
blips.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 13:39:15 +08:00
nanxunandClaude Opus 4.8 4c6e730a08 fix: correct Harbor project path liverecorder -> live_recorder
The Harbor project is named 'live_recorder' (with underscore), matching
the robot account robot$live_recorder+live. The pipeline was pushing to
'liverecorder' (no underscore) — a different/nonexistent project path —
so the robot's push permission did not apply and every push got 401
despite 'Login Succeeded'.

This was THE root cause of the persistent 401s, not buildx auth
forwarding or token expiry (those were all red herrings).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 13:24:36 +08:00