release: bump version to 0.65.2
This commit is contained in:
@@ -2,10 +2,14 @@
|
||||
|
||||
ARG PYTHON_IMAGE=python:3.14-slim
|
||||
ARG UV_IMAGE=ghcr.io/astral-sh/uv:latest
|
||||
ARG AI_PROVIDER_BUILD_FINGERPRINT=unknown
|
||||
|
||||
FROM ${UV_IMAGE} AS uv
|
||||
FROM ${PYTHON_IMAGE}
|
||||
|
||||
ARG AI_PROVIDER_BUILD_FINGERPRINT
|
||||
LABEL planet.aiprovider.build-fingerprint="${AI_PROVIDER_BUILD_FINGERPRINT}"
|
||||
|
||||
COPY --from=uv /uv /uvx /bin/
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -22,6 +22,7 @@ services:
|
||||
args:
|
||||
PYTHON_IMAGE: ${PYTHON_IMAGE:-python:3.14-slim}
|
||||
UV_IMAGE: ${UV_IMAGE:-ghcr.io/astral-sh/uv:latest}
|
||||
AI_PROVIDER_BUILD_FINGERPRINT: ${AI_PROVIDER_BUILD_FINGERPRINT:-unknown}
|
||||
secrets:
|
||||
- planet_uv_config
|
||||
container_name: planet_aiprovider
|
||||
|
||||
@@ -9,6 +9,7 @@ services:
|
||||
args:
|
||||
PYTHON_IMAGE: ${PYTHON_IMAGE:-python:3.14-slim}
|
||||
UV_IMAGE: ${UV_IMAGE:-ghcr.io/astral-sh/uv:latest}
|
||||
AI_PROVIDER_BUILD_FINGERPRINT: ${AI_PROVIDER_BUILD_FINGERPRINT:-unknown}
|
||||
secrets:
|
||||
- planet_uv_config
|
||||
env_file:
|
||||
|
||||
@@ -9,6 +9,7 @@ services:
|
||||
args:
|
||||
PYTHON_IMAGE: ${PYTHON_IMAGE:-python:3.14-slim}
|
||||
UV_IMAGE: ${UV_IMAGE:-ghcr.io/astral-sh/uv:latest}
|
||||
AI_PROVIDER_BUILD_FINGERPRINT: ${AI_PROVIDER_BUILD_FINGERPRINT:-unknown}
|
||||
secrets:
|
||||
- planet_uv_config
|
||||
env_file:
|
||||
|
||||
@@ -8,6 +8,22 @@ This project follows the repository versioning rule:
|
||||
- `improvement` -> `+0.0.1`(bugfix + 小功能混合)
|
||||
- `bugfix` -> `+0.0.1`
|
||||
|
||||
## [0.65.2] — 2026-05-22
|
||||
|
||||
Released: 2026-05-22
|
||||
|
||||
### Highlights
|
||||
- Stabilize AI Provider rebuild detection so unchanged source no longer rebuilds just because file timestamps or local cache state changed.
|
||||
- Keep `uv.lock` on the official registry while still allowing local and Docker builds to use the user's `uv.toml`.
|
||||
- Prevent local startup and bootstrap commands from rewriting `uv.lock` when a user-level mirror is configured.
|
||||
|
||||
### Added / Fixed / Improved
|
||||
- AI Provider fingerprints now use content hashes, base image inputs, dependency metadata, and an image label instead of file mtimes.
|
||||
- `planet.sh` and `scripts/bootstrap-dev.sh` now use `uv sync --frozen`, and backend startup uses `uv run --frozen`.
|
||||
- Docker Compose passes the AI Provider fingerprint into the image build so future starts can inspect the image label directly.
|
||||
|
||||
---
|
||||
|
||||
## [0.65.1] — 2026-05-22
|
||||
|
||||
Released: 2026-05-22
|
||||
|
||||
@@ -16,12 +16,13 @@
|
||||
## Current Version
|
||||
|
||||
- `main` 当前主线历史推导到:`0.16.5`
|
||||
- `dev` 当前开发分支历史推导到:`0.65.1`
|
||||
- `dev` 当前开发分支历史推导到:`0.65.2`
|
||||
|
||||
## Timeline
|
||||
|
||||
| Version | Type | Branch | Commit | Summary |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `0.65.2` | bugfix | `dev` | `pending` | AI Provider 镜像重建判定改为内容 fingerprint 与镜像 label,启动链路改用 frozen uv,避免用户级镜像源污染 `uv.lock`,并加入 Windows 一键启动脚本 |
|
||||
| `0.65.1` | bugfix | `dev` | `pending` | 统一 `planet.sh` 与 Compose 的 AI Provider 镜像名,并让本地和 Docker build 通过用户级 `uv.toml` 共享 uv 源配置,避免镜像源污染 `uv.lock` |
|
||||
| `0.65.0` | feature | `dev` | `pending` | Admin Next 数据源触发入口收敛为“触发全部/触发已选 N”,队列改为右上角浮层按钮,并强化 `planet.sh destroy` 的 OOBE 数据清理 |
|
||||
| `0.64.0` | feature | `dev` | `pending` | Earth 新增后端状态驱动 OOBE 与 About 配置,Admin Next 数据源页新增采集队列,补齐深色主题滑块和用户/技术文档 |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "planet-frontend",
|
||||
"version": "0.65.1",
|
||||
"version": "0.65.2",
|
||||
"private": true,
|
||||
"packageManager": "bun@1",
|
||||
"dependencies": {
|
||||
|
||||
18
planet.cmd
Normal file
18
planet.cmd
Normal file
@@ -0,0 +1,18 @@
|
||||
@echo off
|
||||
setlocal EnableExtensions
|
||||
|
||||
net session >nul 2>&1
|
||||
if not "%errorlevel%"=="0" (
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "$script = '%~f0'; $arg = '-NoExit -NoProfile -ExecutionPolicy Bypass -Command ""& { & ''' + $script + ''' --elevated }""'; if (Get-Command wt.exe -ErrorAction SilentlyContinue) { Start-Process wt.exe -Verb RunAs -ArgumentList @('powershell.exe', $arg) } else { Start-Process powershell.exe -Verb RunAs -ArgumentList $arg }"
|
||||
exit /b
|
||||
)
|
||||
|
||||
if /i "%~1"=="--elevated" shift
|
||||
|
||||
echo Starting Planet in WSL as Administrator...
|
||||
echo This window will stay inside WSL after startup. Close it manually when you are done.
|
||||
echo.
|
||||
|
||||
wsl.exe -d Ubuntu --cd /home/linkong/planet -- zsh -lic "./planet.sh restart --allow-lan; planet_exit=\$?; echo; if [ \$planet_exit -eq 0 ]; then echo 'Planet restart finished successfully.'; powershell.exe -NoProfile -Command 'Start-Process "http://localhost:3000/earth"'; else echo \"Planet restart failed with exit code \$planet_exit.\"; fi; echo; echo 'Staying in WSL. Close this terminal manually when you are done.'; exec zsh -l"
|
||||
|
||||
exit /b %errorlevel%
|
||||
43
planet.sh
43
planet.sh
@@ -1117,6 +1117,9 @@ compute_ai_provider_build_fingerprint() {
|
||||
(
|
||||
cd "$SCRIPT_DIR" || exit 1
|
||||
{
|
||||
printf "PYTHON_IMAGE=%s\n" "${PYTHON_IMAGE:-python:3.14-slim}"
|
||||
printf "UV_IMAGE=%s\n" "${UV_IMAGE:-ghcr.io/astral-sh/uv:latest}"
|
||||
sha256sum aiprovider/Dockerfile pyproject.toml uv.lock 2>/dev/null
|
||||
find aiprovider \
|
||||
-type f \
|
||||
! -path '*/__pycache__/*' \
|
||||
@@ -1125,13 +1128,8 @@ compute_ai_provider_build_fingerprint() {
|
||||
! -name '*.pyc' \
|
||||
! -name '*.pyo' \
|
||||
| LC_ALL=C sort \
|
||||
| xargs -r stat --format="%Y %s %n" 2>/dev/null
|
||||
sha256sum docker-compose.yml docker-compose.simple.yml 2>/dev/null
|
||||
| xargs -r sha256sum 2>/dev/null
|
||||
python3 "$SCRIPT_DIR/scripts/compute_aiprovider_dependency_fingerprint.py" 2>/dev/null
|
||||
if [ -n "${PLANET_UV_CONFIG_FILE:-}" ] && [ -f "$PLANET_UV_CONFIG_FILE" ]; then
|
||||
printf "uv-config "
|
||||
sha256sum "$PLANET_UV_CONFIG_FILE" | awk '{print $1}'
|
||||
fi
|
||||
}
|
||||
) | sha256sum | awk '{print $1}'
|
||||
}
|
||||
@@ -1151,6 +1149,12 @@ ai_provider_image_exists() {
|
||||
docker image inspect "$AI_PROVIDER_IMAGE_NAME" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
read_ai_provider_image_fingerprint() {
|
||||
docker image inspect \
|
||||
--format '{{ index .Config.Labels "planet.aiprovider.build-fingerprint" }}' \
|
||||
"$AI_PROVIDER_IMAGE_NAME" 2>/dev/null || true
|
||||
}
|
||||
|
||||
list_ai_provider_containers() {
|
||||
docker ps -aq --filter "name=planet_aiprovider" 2>/dev/null || true
|
||||
}
|
||||
@@ -1217,12 +1221,23 @@ ensure_ai_provider_image_current() {
|
||||
current_fingerprint="$(compute_ai_provider_build_fingerprint)"
|
||||
previous_fingerprint="$(read_ai_provider_build_stamp || true)"
|
||||
|
||||
if ai_provider_image_exists && [ -n "$previous_fingerprint" ] && [ "$current_fingerprint" = "$previous_fingerprint" ]; then
|
||||
AI_PROVIDER_RECREATE_REQUIRED=0
|
||||
return 0
|
||||
if ai_provider_image_exists; then
|
||||
local image_fingerprint
|
||||
image_fingerprint="$(read_ai_provider_image_fingerprint)"
|
||||
if [ -n "$image_fingerprint" ] && [ "$current_fingerprint" = "$image_fingerprint" ]; then
|
||||
write_ai_provider_build_stamp "$current_fingerprint"
|
||||
AI_PROVIDER_RECREATE_REQUIRED=0
|
||||
return 0
|
||||
fi
|
||||
if [ -z "$image_fingerprint" ] && [ -n "$previous_fingerprint" ] && [ "$current_fingerprint" = "$previous_fingerprint" ]; then
|
||||
AI_PROVIDER_RECREATE_REQUIRED=0
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
set_wait_detail "检测到 AI Provider 代码或配置变化,重建镜像"
|
||||
AI_PROVIDER_BUILD_FINGERPRINT="$current_fingerprint"
|
||||
export AI_PROVIDER_BUILD_FINGERPRINT
|
||||
|
||||
if ! compose_supports_build; then
|
||||
log_error "当前 docker compose 不支持 build,请检查 Docker / Compose 环境"
|
||||
@@ -1349,8 +1364,8 @@ ensure_uv_backend_deps() {
|
||||
"$DEPENDENCY_INSTALL_MAX_RETRIES" \
|
||||
"$DEPENDENCY_INSTALL_RETRY_INTERVAL" \
|
||||
"uv 环境初始化失败,已重试 ${DEPENDENCY_INSTALL_MAX_RETRIES} 次" \
|
||||
"uv sync" \
|
||||
run_command_quiet_unless_verbose "$log_file" uv sync --group dev; then
|
||||
"uv sync --frozen" \
|
||||
run_command_quiet_unless_verbose "$log_file" uv sync --frozen --group dev; then
|
||||
tail -20 "$log_file" 2>/dev/null || true
|
||||
exit 1
|
||||
fi
|
||||
@@ -1403,8 +1418,8 @@ sync_python_deps() {
|
||||
"$DEPENDENCY_INSTALL_MAX_RETRIES" \
|
||||
"$DEPENDENCY_INSTALL_RETRY_INTERVAL" \
|
||||
"uv 环境初始化失败,已重试 ${DEPENDENCY_INSTALL_MAX_RETRIES} 次" \
|
||||
"uv sync" \
|
||||
run_command_quiet_unless_verbose "$log_file" uv sync --group dev; then
|
||||
"uv sync --frozen" \
|
||||
run_command_quiet_unless_verbose "$log_file" uv sync --frozen --group dev; then
|
||||
tail -20 "$log_file" 2>/dev/null || true
|
||||
exit 1
|
||||
fi
|
||||
@@ -1959,7 +1974,7 @@ start_backend_with_retry() {
|
||||
fi
|
||||
cd "$SCRIPT_DIR/backend"
|
||||
: > "$BACKEND_LOG_FILE"
|
||||
PYTHONPATH="$SCRIPT_DIR/backend" nohup uv run --project "$SCRIPT_DIR" python -m uvicorn app.main:app --host "$backend_bind_host" --port "$backend_port" --reload > "$BACKEND_LOG_FILE" 2>&1 &
|
||||
PYTHONPATH="$SCRIPT_DIR/backend" nohup uv run --frozen --project "$SCRIPT_DIR" python -m uvicorn app.main:app --host "$backend_bind_host" --port "$backend_port" --reload > "$BACKEND_LOG_FILE" 2>&1 &
|
||||
BACKEND_PID=$!
|
||||
write_pid_file "$BACKEND_PID_FILE" "$BACKEND_PID"
|
||||
if [ "$VERBOSE" -eq 1 ]; then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "planet"
|
||||
version = "0.65.1"
|
||||
version = "0.65.2"
|
||||
description = "智能星球计划 - 态势感知系统"
|
||||
requires-python = ">=3.14"
|
||||
dependencies = [
|
||||
|
||||
@@ -64,7 +64,7 @@ sync_python_env() {
|
||||
echo -e "${BLUE}同步 Python 依赖...${NC}"
|
||||
cd "$ROOT_DIR"
|
||||
uv python install 3.14
|
||||
uv sync --group dev
|
||||
uv sync --frozen --group dev
|
||||
}
|
||||
|
||||
sync_frontend_env() {
|
||||
|
||||
Reference in New Issue
Block a user