← Back to library

升级前先 dry-run:用 `openclaw update --dry-run` 预检更新路径再上生产

问题/场景:生产环境直接升级容易在 channel/tag/重启策略上踩坑。前置条件:OpenClaw 版本包含 2026.2.22-beta.1 的 update dry-run 能力。实施步骤:先跑 dry-run 核对目标版本与重启动作,再安排维护窗口执行正式更新。关键命令:`openclaw update --dry-run`、`openclaw gateway status`。验证:dry-run 输出的 channel/tag/target/restart 与预期一致,正式更新后服务可用。风险与边界:dry-run 只做预检,不会替你验证业务侧插件兼容。来源:openclaw 2026.2.22-beta.1 release notes。

GITHUBDiscovered 2026-02-23Author openclaw
Prerequisites
  • You can run OpenClaw CLI with permissions to inspect/update gateway runtime.
  • A maintenance window and rollback plan are documented for production updates.
Steps
  1. Run `openclaw update --dry-run` to preview planned channel/tag/target/restart actions.
  2. Compare dry-run output with your intended release policy (stable/beta, restart timing).
  3. If output is expected, execute the real update in your maintenance window and monitor restart.
  4. Post-update, run gateway health and one end-to-end messaging/tool-call smoke test.
Commands
openclaw update --dry-run
openclaw gateway status
openclaw status
Verify

Dry-run report matches expected target, and after real update the gateway stays healthy with successful smoke tests.

Caveats
  • Dry-run validates update plan, not downstream plugin/business workflow compatibility.
  • `update.auto.*` rollout behavior is configurable and environment-dependent; verify before enabling in production(需验证).
Source attribution

This tip is aggregated from community/public sources and preserved with attribution.

Open original source ↗
Visit original post