template.apply: subprocess env missing, debug-profile builds, no nutools fallback #27
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_codescalers#27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
provisioning.template.applyenqueueslab flow template buildas a daemon-side hero_proc job, but several env requirements arent satisfied so every template build fails fast.Symptoms
PATH_ROOTnot set — lab shells out into hero_lib code that callspath_root().expect("PATH_ROOT"), panicking the build subprocess immediately. The daemon runs under hero_proc with a minimal env so the var is simply absent.lab flow template builddefaults to a debug build. Template rollouts ship the resulting~/hero/bin/to every managed user, so debug binaries are an order of magnitude larger than necessary and slower at runtime.HERO_NUTOOLS_DIRnot set — labs nu-modules installer falls back to$PATH_ROOT/code/hero_skills/nutoolswhich is empty on herodev (/root/hero/code/hero_skills/exists but doesnt containnutools/). Without it lab errors out at the nu-install step.Fix
Daemon-side patch in
crates/hero_codescalers_server/src/provisioning.rs:PATH_ROOT=/root/herobefore invoking lab.--releasetolab flow template build.nutools/checkout (env var →/root/hero/code/...→/home/*/hero/code/hero_skills/nutools) and exportHERO_NUTOOLS_DIRwhen found.HERO_MIN_BIN_BYTES=0to defeat the size guard.provisioning.common.apply(also invokes lab).Lab-side cleanups (separate issues to follow) should make
nutoolsportable and relax the 512KB guard so the daemon doesnt need workarounds.87bcc2a$HOME/hero/code/hero_skills/nutoolson every user — none have it #29