Skip to content

Commit a5eacc7

Browse files
docs(cli): refresh managed-index-controller JSDoc for offline mode
The previous JSDoc still referenced `trigger deploy --build-only` / `--register-only` (CLI flags that were removed) and described offline mode as writing files "for the host-side CLI to read." That isn't what happens any more: in offline mode the indexer writes the artifacts into the working directory, the multi-stage Containerfile copies them into the final image, and downstream tooling reads them out of the runtime image (in our case via a Helm Job init container). Update the comment to match the actual flow and reference `trigger.dev/internal`'s buildImage({ offlineIndex: true }) as the intended consumer in self-hosted setups. Also drop the now-meaningless "behaves exactly as it did before two-phase deploy was added" line. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 40072bf commit a5eacc7

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

packages/cli-v3/src/entryPoints/managed-index-controller.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,18 @@ import { writeJSONFile } from "../utilities/fileSystem.js";
2222
* - Reports indexing failures via `failDeployment`.
2323
*
2424
* 2. **Offline mode (opt-in via `TRIGGER_INDEX_OFFLINE=1` build arg)**:
25-
* - Skips the API entirely; no env vars are fetched and no
26-
* BackgroundWorker is registered from inside the container.
27-
* - Writes `index-metadata.json` (and `index-error.json` on failure) to
28-
* disk for the host-side CLI to read after the build.
29-
* - Used by `trigger deploy --build-only` followed by
30-
* `trigger deploy --register-only` to support build-and-register
31-
* workflows where the build container has no network access to the API.
25+
* - Skips the API entirely; no env vars are fetched, no
26+
* BackgroundWorker is registered, no failures are reported.
27+
* - Writes `index-metadata.json` (or `index-error.json` on failure)
28+
* to the working directory inside the build container. The multi-stage
29+
* Containerfile copies them into the final image so downstream tooling
30+
* can read them out of the runtime image (and on failure the indexer
31+
* process exits non-zero, failing the build).
32+
* - Intended for self-hosted setups that drive the build via
33+
* `trigger.dev/internal`'s `buildImage({ offlineIndex: true })`
34+
* without API credentials in the build environment.
3235
*
33-
* Mode is selected by the `TRIGGER_INDEX_OFFLINE=1` env var. If unset, the
34-
* controller behaves exactly as it did before two-phase deploy was added.
36+
* Mode is selected by the `TRIGGER_INDEX_OFFLINE=1` env var.
3537
*/
3638

3739
async function loadBuildManifest() {

0 commit comments

Comments
 (0)