Repository navigation
docs: add an AstrBot upgrade guide - #11625
Conversation
There was a problem hiding this comment.
Hey - I've found 4 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/en/deploy/update.md" line_range="85" />
<code_context>
+
+Stop AstrBot, then run `git pull --ff-only` in the original checkout to update its tracked branch. If you deploy from a release tag, run `git fetch --tags` and then `git switch --detach <version-tag>` to select the target version. Save and handle any local code changes before updating.
+
+Sync dependencies from the updated source directory and start AstrBot as usual. For a source checkout managed by uv, run `uv sync` followed by `uv run main.py`. For a Python virtual environment, run `python -m pip install -r requirements.txt` in that environment, followed by `python main.py`. [Source deployment](./astrbot/cli.md)
+
+If you run AstrBot directly from release source code, you can also open **⋮ → Update AstrBot** in the upper right of the browser WebUI and click **Switch** next to the target release. Wait for AstrBot to restart.
</code_context>
<issue_to_address>
**Plugin dependencies disappear after updates**
When a uv-managed source deployment has installed plugins, especially when their dependencies are outside AstrBot’s lockfile, `uv sync` removes those dependencies as extraneous, and `uv run main.py` synchronizes again by default; plugins then lack dependencies and fail to load, or the repeated reinstall fails.
Use `uv sync --inexact` to preserve extraneous plugin dependencies, then start with `uv run --no-sync main.py` to avoid synchronizing again.
Also at `docs/zh/deploy/update.md:85`.
</issue_to_address>
### Comment 2
<location path="docs/en/deploy/update.md" line_range="49" />
<code_context>
+From the original Compose project directory, pull the image and recreate the AstrBot service. These commands use `astrbot`, the service name in the official Compose file.
+
+```bash
+docker compose pull astrbot
+docker compose up -d astrbot
+```
</code_context>
<issue_to_address>
**Docker updates fail without elevated access**
When the Linux user cannot access the Docker daemon without sudo, `docker compose pull astrbot` and `docker compose up -d astrbot` fail with a daemon permission error, so the AstrBot container remains on its old version.
Prefix both Compose commands with `sudo` in the Linux instructions.
Also at `docs/en/deploy/update.md:63-65`, `docs/zh/deploy/update.md:49-50`, `docs/zh/deploy/update.md:63-65`.
</issue_to_address>
### Comment 3
<location path="docs/en/deploy/update.md" line_range="17" />
<code_context>
+
+In AstrBot Launcher, click **可更新** (Update available) in the **版本** (Version) column and confirm the instance upgrade. To choose a specific version, stop the instance, open its **设置** (Settings), select a version, and save. After updating, verify that the instance is running the new version. [AstrBot Launcher](https://github.com/AstrBotDevs/astrbot-launcher)
+
+## Official install scripts, uv, and pip {#package}
+
+Installations managed by the official install scripts, uv, or pip require a terminal upgrade. Stop the running AstrBot process before updating. [Official install scripts](./astrbot/package.md)
</code_context>
<issue_to_address>
**AUR upgrades are undocumented**
When astrBot was installed from the AUR, the listed uv and pip commands do not upgrade the AUR package, so Arch users cannot follow this guide to update AstrBot installed as `astrbot-git`.
Add the appropriate AUR package upgrade steps, including any required service restart.
Also at `docs/zh/deploy/update.md:17`.
</issue_to_address>
### Comment 4
<location path="docs/en/deploy/update.md" line_range="3" />
<code_context>
+# Update AstrBot
+
+Follow the recommended upgrade steps for your installation method.
+
+## Desktop client {#desktop}
</code_context>
<issue_to_address>
**Panel deployments lack upgrade steps**
When a user installed AstrBot from the 1Panel or BT Panel app store, the guide gives no upgrade procedure for users who installed AstrBot through 1Panel or the BT Panel app store, so those users cannot follow the recommended steps for their installation method.
Add upgrade instructions for the panel app-store deployments, or explain how users of those panels should apply the Docker upgrade procedure.
Also at `docs/zh/deploy/update.md:3`.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 4 findings to address first, and the docker run upgrade steps tell users to stop and remove the old container; if they proceed without a working host mount for /AstrBot/data, container-local data is deleted and recreating the container will not restore it. The guide warns users to verify the mount, but a mistaken or incomplete verification can still leave data unrecoverable after the container is removed.
Blocking findings: docs/en/deploy/update.md:85, docs/en/deploy/update.md:49, docs/en/deploy/update.md:17, docs/en/deploy/update.md:3
|
|
||
| Stop AstrBot, then run `git pull --ff-only` in the original checkout to update its tracked branch. If you deploy from a release tag, run `git fetch --tags` and then `git switch --detach <version-tag>` to select the target version. Save and handle any local code changes before updating. | ||
|
|
||
| Sync dependencies from the updated source directory and start AstrBot as usual. For a source checkout managed by uv, run `uv sync` followed by `uv run main.py`. For a Python virtual environment, run `python -m pip install -r requirements.txt` in that environment, followed by `python main.py`. [Source deployment](./astrbot/cli.md) |
There was a problem hiding this comment.
🟡 Medium · Plugin dependencies disappear after updates
When a uv-managed source deployment has installed plugins, especially when their dependencies are outside AstrBot’s lockfile, uv sync removes those dependencies as extraneous, and uv run main.py synchronizes again by default; plugins then lack dependencies and fail to load, or the repeated reinstall fails.
Use uv sync --inexact to preserve extraneous plugin dependencies, then start with uv run --no-sync main.py to avoid synchronizing again.
Also at docs/zh/deploy/update.md:85.
Prompt for AI agents
In `docs/en/deploy/update.md` at line 85:
**Plugin dependencies disappear after updates**
When a uv-managed source deployment has installed plugins, especially when their dependencies are outside AstrBot’s lockfile, `uv sync` removes those dependencies as extraneous, and `uv run main.py` synchronizes again by default; plugins then lack dependencies and fail to load, or the repeated reinstall fails.
Use `uv sync --inexact` to preserve extraneous plugin dependencies, then start with `uv run --no-sync main.py` to avoid synchronizing again.
Also at `docs/zh/deploy/update.md:85`.| From the original Compose project directory, pull the image and recreate the AstrBot service. These commands use `astrbot`, the service name in the official Compose file. | ||
|
|
||
| ```bash | ||
| docker compose pull astrbot |
There was a problem hiding this comment.
🟡 Medium · Docker updates fail without elevated access
When the Linux user cannot access the Docker daemon without sudo, docker compose pull astrbot and docker compose up -d astrbot fail with a daemon permission error, so the AstrBot container remains on its old version.
Prefix both Compose commands with sudo in the Linux instructions.
Also at docs/en/deploy/update.md:63-65, docs/zh/deploy/update.md:49-50, docs/zh/deploy/update.md:63-65.
Prompt for AI agents
In `docs/en/deploy/update.md` at line 49:
**Docker updates fail without elevated access**
When the Linux user cannot access the Docker daemon without sudo, `docker compose pull astrbot` and `docker compose up -d astrbot` fail with a daemon permission error, so the AstrBot container remains on its old version.
Prefix both Compose commands with `sudo` in the Linux instructions.
Also at `docs/en/deploy/update.md:63-65`, `docs/zh/deploy/update.md:49-50`, `docs/zh/deploy/update.md:63-65`.|
|
||
| In AstrBot Launcher, click **可更新** (Update available) in the **版本** (Version) column and confirm the instance upgrade. To choose a specific version, stop the instance, open its **设置** (Settings), select a version, and save. After updating, verify that the instance is running the new version. [AstrBot Launcher](https://github.com/AstrBotDevs/astrbot-launcher) | ||
|
|
||
| ## Official install scripts, uv, and pip {#package} |
There was a problem hiding this comment.
🟡 Medium · AUR upgrades are undocumented
When astrBot was installed from the AUR, the listed uv and pip commands do not upgrade the AUR package, so Arch users cannot follow this guide to update AstrBot installed as astrbot-git.
Add the appropriate AUR package upgrade steps, including any required service restart.
Also at docs/zh/deploy/update.md:17.
Prompt for AI agents
In `docs/en/deploy/update.md` at line 17:
**AUR upgrades are undocumented**
When astrBot was installed from the AUR, the listed uv and pip commands do not upgrade the AUR package, so Arch users cannot follow this guide to update AstrBot installed as `astrbot-git`.
Add the appropriate AUR package upgrade steps, including any required service restart.
Also at `docs/zh/deploy/update.md:17`.| @@ -0,0 +1,95 @@ | |||
| # Update AstrBot | |||
|
|
|||
| Follow the recommended upgrade steps for your installation method. | |||
There was a problem hiding this comment.
🟡 Medium · Panel deployments lack upgrade steps
When a user installed AstrBot from the 1Panel or BT Panel app store, the guide gives no upgrade procedure for users who installed AstrBot through 1Panel or the BT Panel app store, so those users cannot follow the recommended steps for their installation method.
Add upgrade instructions for the panel app-store deployments, or explain how users of those panels should apply the Docker upgrade procedure.
Also at docs/zh/deploy/update.md:3.
Prompt for AI agents
In `docs/en/deploy/update.md` at line 3:
**Panel deployments lack upgrade steps**
When a user installed AstrBot from the 1Panel or BT Panel app store, the guide gives no upgrade procedure for users who installed AstrBot through 1Panel or the BT Panel app store, so those users cannot follow the recommended steps for their installation method.
Add upgrade instructions for the panel app-store deployments, or explain how users of those panels should apply the Docker upgrade procedure.
Also at `docs/zh/deploy/update.md:3`.
Summary
Validation
Summary by Sourcery
Document recommended AstrBot upgrade procedures for each supported installation method.
Documentation: