Skip to content

chore: fix release publishing OOM#71

Merged
alongubkin merged 1 commit into
mainfrom
fix/alien-188-release-publishing-oom
Jun 11, 2026
Merged

chore: fix release publishing OOM#71
alongubkin merged 1 commit into
mainfrom
fix/alien-188-release-publishing-oom

Conversation

@alongubkin

Copy link
Copy Markdown
Member

Linear: ALIEN-188

Summary

  • raise Node heap to 8192 MB for platform SDK release/generation builds
  • keep Cargo.lock workspace package versions aligned with 1.6.0
  • add JSON output for deployment list/get and constrain log search to body.message

Root cause

The release workflow failed while building @alienplatform/platform-api because tsc exhausted Node's default heap around 4 GB. ../platform already builds the same SDK with --max-old-space-size=8192.

Validation

  • NODE_OPTIONS=--max-old-space-size=8192 pnpm -C ./client-sdks/platform/typescript build
  • cargo fmt --check
  • cargo check -p alien-cli
  • cargo test -p alien-cli

@alongubkin alongubkin changed the title [codex] fix release publishing OOM chore: fix release publishing OOM Jun 11, 2026
@alongubkin alongubkin marked this pull request as ready for review June 11, 2026 14:22
@alongubkin alongubkin merged commit 810159a into main Jun 11, 2026
12 of 14 checks passed
@alongubkin alongubkin deleted the fix/alien-188-release-publishing-oom branch June 11, 2026 14:22
@greptile-apps

greptile-apps Bot commented Jun 11, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes a Node.js OOM crash in the release workflow by raising the heap limit to 8192 MB for TypeScript SDK builds, bumps all Cargo workspace packages to 1.6.0, adds --json output flags to alien deployments ls/get, and constrains Deepstore log text search to body.message.

  • Workflow/heap fix: NODE_OPTIONS=--max-old-space-size=8192 is added to the publish-npm build step and the platform SDK step in publish-client-sdks; the manager SDK step in the same job and the generate:manager-api local script are not updated consistently.
  • CLI JSON output: deployments ls and get gain a --json flag, and resolve_manager_client now accepts allow_bootstrap so interactive prompts are suppressed in non-TTY/scripting contexts.
  • Log search scoping: fetch_logs now passes search_fields: ["body.message"] to Deepstore, tightening full-text search to the message field for both one-shot and follow modes.

Confidence Score: 4/5

Safe to merge; all changed code paths are additive or targeted bug fixes with no regressions to existing behavior.

The OOM fix, Cargo lock alignment, and Rust CLI additions are all correct and low-risk. The only gaps are that the manager SDK step in publish-client-sdks and the generate:manager-api local script were not given the same heap bump, leaving them vulnerable to the same class of failure if those SDKs grow.

.github/workflows/release.yml — the Build and publish manager API SDK step at line 254 and package.json's generate:manager-api script both lack the new NODE_OPTIONS set for their platform SDK counterparts.

Important Files Changed

Filename Overview
.github/workflows/release.yml Raises heap limit in publish-npm and publish-client-sdks platform step; manager SDK step in publish-client-sdks is missing the same limit.
package.json Adds NODE_OPTIONS to generate:platform-api script; generate:manager-api is not updated consistently.
Cargo.lock Workspace package versions bumped from 1.5.1 to 1.6.0 across all alien-* crates; no logic changes.
crates/alien-cli/src/commands/deployments.rs Adds --json flag to ls and get, threads allow_bootstrap through resolve_manager_client to suppress interactive prompts in non-TTY/JSON mode.
crates/alien-cli/src/commands/logs.rs Constrains Deepstore text search to body.message only via DEFAULT_LOG_SEARCH_FIELDS; applied consistently to both fetch and follow paths.
crates/alien-cli/src/commands/releases.rs Updated call-site for resolve_manager_client to pass allow_bootstrap=true; no behavioral change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[alien deployments ls/get] --> B{--json flag?}
    B -- Yes --> C[allow_bootstrap = false\nno interactive prompts]
    B -- No --> D[allow_bootstrap = true\nprompt for project if needed]
    C --> E[resolve_manager_client]
    D --> E
    E --> F[Fetch from manager API]
    F --> G{json mode?}
    G -- Yes --> H[print_json output]
    G -- No --> I[Render human-readable table/detail]

    J[alien logs --query TEXT] --> K[fetch_logs / follow_logs]
    K --> L[SearchParams\nsearch_fields: body.message]
    L --> M[Deepstore search\nscoped to body.message only]
Loading

Comments Outside Diff (1)

  1. .github/workflows/release.yml, line 254-261 (link)

    P2 Manager SDK build missing memory limit

    The publish-client-sdks job now sets NODE_OPTIONS: "--max-old-space-size=8192" for the platform SDK step, but the immediately following "Build and publish manager API SDK" step has no corresponding NODE_OPTIONS. If the manager SDK reaches similar complexity, it will hit the same default 4 GB heap limit and fail at publish time with no indication of why.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: .github/workflows/release.yml
    Line: 254-261
    
    Comment:
    **Manager SDK build missing memory limit**
    
    The `publish-client-sdks` job now sets `NODE_OPTIONS: "--max-old-space-size=8192"` for the platform SDK step, but the immediately following "Build and publish manager API SDK" step has no corresponding `NODE_OPTIONS`. If the manager SDK reaches similar complexity, it will hit the same default 4 GB heap limit and fail at publish time with no indication of why.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
.github/workflows/release.yml:254-261
**Manager SDK build missing memory limit**

The `publish-client-sdks` job now sets `NODE_OPTIONS: "--max-old-space-size=8192"` for the platform SDK step, but the immediately following "Build and publish manager API SDK" step has no corresponding `NODE_OPTIONS`. If the manager SDK reaches similar complexity, it will hit the same default 4 GB heap limit and fail at publish time with no indication of why.

### Issue 2 of 2
package.json:16
**`generate:manager-api` not updated to match**

`generate:platform-api` now runs with `NODE_OPTIONS=--max-old-space-size=8192`, but the adjacent `generate:manager-api` script does not. Developers running either script locally will get different memory limits for what are structurally identical codegen pipelines.

Reviews (1): Last reviewed commit: "fix: stabilize release publishing" | Re-trigger Greptile

Comment thread package.json
"build:images": "echo 'Use GitHub Actions workflows (.github/workflows/images*.yml) for canonical image builds'",
"generate": "turbo run generate",
"generate:platform-api": "speakeasy generate sdk --lang typescript --schema ./client-sdks/platform/openapi.json --out client-sdks/platform/typescript && pnpm -C ./client-sdks/platform/typescript build",
"generate:platform-api": "speakeasy generate sdk --lang typescript --schema ./client-sdks/platform/openapi.json --out client-sdks/platform/typescript && NODE_OPTIONS=--max-old-space-size=8192 pnpm -C ./client-sdks/platform/typescript build",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 generate:manager-api not updated to match

generate:platform-api now runs with NODE_OPTIONS=--max-old-space-size=8192, but the adjacent generate:manager-api script does not. Developers running either script locally will get different memory limits for what are structurally identical codegen pipelines.

Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 16

Comment:
**`generate:manager-api` not updated to match**

`generate:platform-api` now runs with `NODE_OPTIONS=--max-old-space-size=8192`, but the adjacent `generate:manager-api` script does not. Developers running either script locally will get different memory limits for what are structurally identical codegen pipelines.

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant