Skip to content

bug(deploy): three more shell scripts build the SLM frontend with the wrong npm target #15718

Open

Description

@mrveiss

Found while widening the #15650/#15689/#15659 shell-publish guard to sweep every *.sh file in the tree for the same defect class (wrong npm build target / non-atomic publish into a served path).

What

Three more shell entry points build the SLM frontend (autobot-slm-frontend) with a plain npm run build instead of build:slm (the script that bakes VITE_API_URL=/slm in -- #9563, #9710, #10435):

  • run_agent.sh:316 -- cd "$PROJECT_ROOT/autobot-slm-frontend" && npm install --force && npm run build && npm run dev &
  • autobot-infrastructure/shared/scripts/bulletproof-frontend/zero-downtime-update.sh:84 -- npm run build
  • autobot-infrastructure/shared/scripts/bulletproof-frontend/deploy-bulletproof-frontend.sh:74 -- VITE_BUILD_TIMESTAMP=$(date +%s) npm run build

The two bulletproof-frontend/ scripts also publish through an entirely separate mechanism from the one #15557/#15610 established: a primary/staging symlink swap under /opt/autobot/src/autobot-slm-frontend{,-primary,-staging}, not autobot-slm-frontend/current -- the path nginx (roles/slm_manager/templates, autobot-infrastructure/autobot-slm-frontend/templates/autobot-slm.conf) and every other publisher (build_publish_slm_frontend.yml, services/slm_frontend_build.py, and the shell helper added in #15650/#15689/#15659, autobot-infrastructure/autobot-slm-frontend/templates/build-publish-slm-frontend.sh) actually serve. Whether that swap is even atomic is a separate question from the build-target defect.

Why this is filed rather than fixed here

Out of scope for #15650/#15689/#15659, which named bootstrap-slm.sh and sync-frontend.sh specifically. The never-delete rule applies here too: bulletproof-frontend/ is referenced only by its own README (no other caller found), so establishing whether the ansible/bootstrap path already supersedes it -- rather than assuming -- is exactly the #15659-style question that needs answering before deciding to fix it in place or retire it.

Acceptance criteria

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions