Skip to content

Autoupdate wipes manually-installed optional warehouse drivers (snowflake-sdk) from ~/.altimate/bin/node_modules #1075

Description

@altimateanas

Problem

altimate serve performs a one-shot self-upgrade on startup when autoupdate is unset (the default). This self-upgrade appears to reset ~/.altimate/bin/ (or at least ~/.altimate/bin/package.json / node_modules) back to the shipped base dependency set.

The shipped ~/.altimate/bin/package.json only declares:

{
  "dependencies": {
    "mssql": "^12.5.5"
  }
}

Optional warehouse drivers like snowflake-sdk, pg, oracledb, etc. are treated as optionalDependencies by @altimateai/altimate-code (confirmed in its own package.json: "snowflake-sdk": { "optional": true }), and the runtime error message even instructs the user to self-heal via:

Error: Snowflake driver not installed. Run: npm install snowflake-sdk

So the intended workflow is: user runs cd ~/.altimate/bin && npm install snowflake-sdk to add Snowflake support. This works — until the next autoupdate cycle runs (silently, on every serve startup, since autoupdate defaults to unset/enabled), at which point the driver installation is lost and every Snowflake warehouse connection starts failing again with "Snowflake driver not installed."

Repro

  1. Have a Snowflake warehouse connection configured (connections.json).
  2. cd ~/.altimate/bin && npm install snowflake-sdk — confirms works, warehouse_test succeeds.
  3. Let time pass / restart sessions so altimate serve processes cycle and self-update (autoupdate is enabled by default per the CLI's own changelog: "Headless serve now checks for and applies updates on startup... When autoupdate is unset (the default)... performs a one-shot, best-effort self-upgrade shortly after start").
  4. warehouse_test on the same Snowflake connection now fails again with "Snowflake driver not installed. Run: npm install snowflake-sdk" — even though nothing was manually uninstalled.

Impact

Any user relying on optional warehouse drivers (Snowflake, Postgres, Oracle, etc. — anything not bundled by default) silently loses connectivity after an autoupdate cycle, with no notification that an update even happened. This is confusing because the fix ("npm install X") appears to work, then mysteriously stops working later, making it look like a flaky driver rather than an autoupdate side effect.

Suggested fixes (any of)

  1. Bundle commonly-used optional warehouse drivers (snowflake-sdk, pg) in the base install so they survive autoupdate, or
  2. Preserve/reinstall previously-installed optional deps as part of the self-upgrade routine instead of overwriting package.json/node_modules from the release artifact, or
  3. Emit a visible log/notification when the self-upgrade runs and when it detects previously-installed optional deps are now missing, prompting the user to reinstall, or
  4. Document this behavior clearly in the "Snowflake driver not installed" error message itself (e.g., "if this previously worked, an autoupdate may have reset it — see docs on disabling autoupdate or persisting optional drivers").

Environment

  • altimate binary at ~/.altimate/bin/altimate, installed via curl/install script (not homebrew/npm global)
  • macOS (darwin)
  • @altimateai/altimate-code@0.9.0-beta.2 (homebrew global install, separate from the ~/.altimate/bin/altimate binary that actually runs serve)
  • Confirmed via strings on the binary: autoupdate default is unset/enabled, self-upgrade happens shortly after serve starts, per embedded changelog text (issue fix: trigger auto-update check on headless serve startup #940 reference)

Metadata

Field Value
CLI Version 0.9.4
Platform darwin
Architecture arm64
OS Release 24.3.0
Category bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfrom-cliFeedback submitted via CLIuser-feedbackFeedback submitted by users

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions