fix(one-click): remove configurable install root#649
Conversation
Review of #649 -- Remove configurable install rootOverall: This is a well-structured refactoring that cleanly removes the configurable install root knobs. The test coverage for the migration path is good, and most of the changes are mechanical and correct. Below are the findings worth addressing. High priority1. 2. Medium priority3. Missing 4. Unquoted legacy 5. No three-way merge test for legacy migration Low / Informational
|
Fix one-click to use the fixed cubetoolbox install root consistently and migrate legacy env defaults that depended on removed path variables. Signed-off-by: jinlong <jinlong@tencent.com>
1811b51 to
eb1615d
Compare
Make CUBE_SANDBOX_INSTALL_ROOT readonly so it cannot be overridden by an env file or subshell. Add assert_safe_install_prefix call in install.sh before rm -rf to guard against destructive installs. Add test_install_root_readonly to verify the readonly enforcement. Signed-off-by: jinlong <jinlong@tencent.com>
eb1615d to
72b16ca
Compare
Summary
/usr/local/services/cubetoolboxthe single fixed install root.cubebox_os_image,cube-snapshot, andcube-vsprotected by continuing to delete only packaged artifact directories during reinstall/upgrade.CUBE_PROXY_CERT_DIRdefaults that referenced the removed install prefix variable and update docs/tests accordingly.Why
The configurable install root was not actually supported end to end: Cubelet/cubebox and the shim/kernel paths already assume
/usr/local/services/cubetoolboxfor runtime artifacts andcube-kernel-scf/vmlinux. KeepingONE_CLICK_INSTALL_PREFIX/ONE_CLICK_TOOLBOX_ROOTexposed made the installer look configurable while producing deployments that could not run correctly.Test plan
bash deploy/one-click/tests/test_env_merge.shbash deploy/one-click/tests/test_runtime_file_safety.shbash deploy/one-click/tests/test_install_mode.shbash deploy/one-click/tests/test_cidr_preflight.shbash deploy/one-click/tests/test_version_compare.shbash deploy/one-click/tests/test_release_manifest_contract.shAssisted-by: Cursor:GPT-5.5
Made with Cursor