惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
B
Blog
Stack Overflow Blog
Stack Overflow Blog
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
Recent Announcements
Recent Announcements
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
D
DataBreaches.Net
Microsoft Azure Blog
Microsoft Azure Blog
G
Google Developers Blog
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
罗磊的独立博客
L
LangChain Blog
V
Visual Studio Blog
雷峰网
雷峰网
aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(e2e): avoid Linux snapshot apt races · openclaw/openc...
vincentkoc · 2026-06-16 · via Recent Commits to openclaw:main

@@ -53,9 +53,9 @@ import {

53535454

// Older published baselines predate this warning, but still need update coverage.

5555

const BAD_PLUGIN_DIAGNOSTIC_MIN_VERSION = "2026.5.7";

56-

// Restored Ubuntu snapshots may immediately run unattended-upgrades. Let that

57-

// legitimate maintenance finish instead of racing or disabling the OS service.

58-

const APT_LOCK_TIMEOUT_SECONDS = 900;

56+

// Restored Ubuntu snapshots may immediately run package maintenance for hours.

57+

// Reuse an existing downloader before touching apt, then bound the fallback.

58+

const APT_LOCK_RETRY_SECONDS = 900;

5959

const BOOTSTRAP_TIMEOUT_SECONDS = 1200;

60606161

function parseOpenClawPackageVersion(value: string): string | null {

@@ -445,27 +445,44 @@ printf 'preflight.npmRoot=%s\n' "$(npm root -g 2>/dev/null || true)"`);

445445

this.guestExec(["hwclock", "--systohc"], { check: false });

446446

this.guestExec(["timedatectl", "set-ntp", "true"], { check: false });

447447

this.guestExec(["systemctl", "restart", "systemd-timesyncd"], { check: false });

448-

this.guestExec([

449-

"apt-get",

450-

"-o",

451-

"Acquire::Check-Date=false",

452-

"-o",

453-

`DPkg::Lock::Timeout=${APT_LOCK_TIMEOUT_SECONDS}`,

454-

"update",

455-

]);

456-

this.guestExec([

457-

"apt-get",

458-

"-o",

459-

`DPkg::Lock::Timeout=${APT_LOCK_TIMEOUT_SECONDS}`,

460-

"install",

461-

"-y",

462-

"curl",

463-

"ca-certificates",

464-

]);

448+

this.guest.bash(`

449+

set -e

450+

if command -v curl >/dev/null 2>&1 || command -v wget >/dev/null 2>&1; then

451+

exit 0

452+

fi

453+

deadline=$((SECONDS + ${APT_LOCK_RETRY_SECONDS}))

454+

run_apt_with_lock_retry() {

455+

local output status

456+

while true; do

457+

if output="$("$@" 2>&1)"; then

458+

status=0

459+

else

460+

status=$?

461+

fi

462+

printf '%s\n' "$output"

463+

if [ "$status" -eq 0 ]; then

464+

return 0

465+

fi

466+

case "$output" in

467+

*"Could not get lock"*|*"Unable to acquire the dpkg frontend lock"*|*"Unable to lock directory"*)

468+

if [ "$SECONDS" -ge "$deadline" ]; then

469+

printf 'Timed out waiting for Ubuntu package maintenance locks\n' >&2

470+

return "$status"

471+

fi

472+

sleep 5

473+

;;

474+

*)

475+

return "$status"

476+

;;

477+

esac

478+

done

479+

}

480+

run_apt_with_lock_retry apt-get -o Acquire::Check-Date=false -o DPkg::Lock::Timeout=30 update

481+

run_apt_with_lock_retry apt-get -o DPkg::Lock::Timeout=30 install -y curl ca-certificates`);

465482

}

466483467484

private installLatestRelease(): void {

468-

this.guestExec(["curl", "-fsSL", this.options.installUrl, "-o", "/tmp/openclaw-install.sh"]);

485+

this.downloadGuestFile(this.options.installUrl, "/tmp/openclaw-install.sh");

469486

if (this.options.installVersion) {

470487

this.guestExec([

471488

"/usr/bin/env",

@@ -488,12 +505,22 @@ printf 'preflight.npmRoot=%s\n' "$(npm root -g 2>/dev/null || true)"`);

488505

this.guestExec(["openclaw", "--version"]);

489506

}

490507508+

private downloadGuestFile(url: string, outputPath: string): void {

509+

this.guest.bash(`

510+

set -e

511+

if command -v curl >/dev/null 2>&1; then

512+

curl -fsSL ${shellQuote(url)} -o ${shellQuote(outputPath)}

513+

else

514+

wget -q -O ${shellQuote(outputPath)} ${shellQuote(url)}

515+

fi`);

516+

}

517+491518

private installMainTgz(tempName: string): void {

492519

if (!this.artifact || !this.server) {

493520

die("package artifact/server missing");

494521

}

495522

const tgzUrl = this.server.urlFor(this.artifact.path);

496-

this.guestExec(["curl", "-fsSL", tgzUrl, "-o", `/tmp/${tempName}`]);

523+

this.downloadGuestFile(tgzUrl, `/tmp/${tempName}`);

497524

this.guestExec(["npm", "install", "-g", `/tmp/${tempName}`, "--no-fund", "--no-audit"]);

498525

this.guestExec(["openclaw", "--version"]);

499526

}