把 Admin 最新已提交版本以固定提交 e784806df90014f252abae13de1d632393c5b883 构建并发布到生产服务器,确保工作区未提交文件不进入产物,并完成服务与公网健康检查。
e784806df90014f252abae13de1d632393c5b883
-AllowSchemaMigration
admin/deploy/deploy-admin.ps1 -Commit e784806df90014f252abae13de1d632393c5b883
-WhatIf
cmautobuy-admin
https://buy.833729.com
无长期文档影响:部署入口、服务器参数、运维步骤和回退方式均未改变,本次仅按现有文档发布固定提交。
root@185.216.248.75:21638
test
build
vet
3077ce452dd7ddb032667048de59e3a256115e2723523dd01b39bd3a61a3c887
ai_match_batches.chk_ai_match_batch_total
total_count
CHECK (total_count BETWEEN 1 AND 200)
cmautobuy-admin=active
nginx=active
/login
用户已明确确认:“允许执行生产数据库 v30 → v31 迁移并继续部署 e784806”。恢复实施,使用固定提交 e784806df90014f252abae13de1d632393c5b883 和显式 -AllowSchemaMigration,不得扩大到其他数据库或业务数据操作。
runuser: failed to execute ./cmautobuy-admin: Permission denied
/opt/cmautobuy/releases/e784806
0700 root:root
0750 cmautobuy:cmautobuy
umask 077
mkdir -p
root:cmautobuy 0750
e784806
cmautobuy
0750 root:cmautobuy
398b1da
go test ./...
go build ./...
go vet ./...
bash -n admin/deploy/deploy-admin-remote.sh
git diff --check
python dev_scripts/harness.py check --strict
/opt/cmautobuy/backups/autobuy-before-e784806-20260828T033537Z-notablespaces.sql.gz
gzip -t
chk_ai_match_batch_total
total_count BETWEEN 1 AND 200
/opt/cmautobuy/releases/e784806/cmautobuy-admin
/
https://buy.833729.com/login
No dependencies set.
The note is not visible to the blocked user.
基本信息
目标
把 Admin 最新已提交版本以固定提交
e784806df90014f252abae13de1d632393c5b883构建并发布到生产服务器,确保工作区未提交文件不进入产物,并完成服务与公网健康检查。非目标
-AllowSchemaMigration。已确认方案
admin/deploy/deploy-admin.ps1 -Commit e784806df90014f252abae13de1d632393c5b883唯一入口。-WhatIf确认目标;正式部署由脚本完成固定提交归档、Go 1.23 验证、Linux amd64 构建和校验。cmautobuy-admin。https://buy.833729.com公网入口;失败时由脚本恢复切换前稳定版本。风险与回退
验收标准
e784806df90014f252abae13de1d632393c5b883。https://buy.833729.com可访问,Admin 服务运行正常。文档影响
无长期文档影响:部署入口、服务器参数、运维步骤和回退方式均未改变,本次仅按现有文档发布固定提交。
2026-08-28 首次部署门禁结果
-WhatIf通过:目标root@185.216.248.75:21638,固定提交e784806df90014f252abae13de1d632393c5b883,禁止 schema 升级。test、build、vet成功;Linux amd64 发布物 schema v31,SHA-256 为3077ce452dd7ddb032667048de59e3a256115e2723523dd01b39bd3a61a3c887。-AllowSchemaMigration。ai_match_batches.chk_ai_match_batch_total的total_count上限从 100 放宽到 200;实现会删除旧 CHECK 并创建CHECK (total_count BETWEEN 1 AND 200),随后自检并记录 v31。cmautobuy-admin=active、nginx=active、公网/login返回 200。2026-08-28 迁移授权
用户已明确确认:“允许执行生产数据库 v30 → v31 迁移并继续部署 e784806”。恢复实施,使用固定提交
e784806df90014f252abae13de1d632393c5b883和显式-AllowSchemaMigration,不得扩大到其他数据库或业务数据操作。2026-08-28 预检权限故障与最小修复
runuser: failed to execute ./cmautobuy-admin: Permission denied。/opt/cmautobuy/releases/e784806为0700 root:root,二进制虽为0750 cmautobuy:cmautobuy,但运行账号无法遍历 release 目录。umask 077后用普通mkdir -p创建 release 目录,却只调整了二进制权限,遗漏目录的组执行权限。root:cmautobuy 0750明确创建/修正 releases 根目录和单个 release 目录,备份目录继续保持 root 私有;补自动化测试后提交。随后仍以固定提交e784806重新部署。2026-08-28 最终实施证据
最终差异
umask 077下把 release 目录建为0700 root:root、导致cmautobuy无法执行预检二进制的问题。0750 root:cmautobuy;数据库备份目录仍保持 root 私有。398b1da。该提交只改部署工具和测试,不进入本次 Admin 运行时二进制。e784806df90014f252abae13de1d632393c5b883。测试与部署结果
go test ./...、go build ./...、go vet ./...全部通过。bash -n admin/deploy/deploy-admin-remote.sh、git diff --check通过。python dev_scripts/harness.py check --strict通过。3077ce452dd7ddb032667048de59e3a256115e2723523dd01b39bd3a61a3c887;线上二进制哈希一致。/opt/cmautobuy/backups/autobuy-before-e784806-20260828T033537Z-notablespaces.sql.gz,34 张表,脚本已执行gzip -t和 SHA 校验。chk_ai_match_batch_total为total_count BETWEEN 1 AND 200。/opt/cmautobuy/releases/e784806/cmautobuy-admin。cmautobuy-admin=active,nginx=active;本机/=303、/login=200;公网https://buy.833729.com/login=200。未验证与文档影响