Skip to content

fix(lambda): start Node.js and Python functions in the code directory - #1968

Merged
Nahuel990 merged 2 commits into
ministackorg:mainfrom
drakeo338:claude/1965-fix
Oct 3, 2026
Merged

Nahuel990 merged 2 commits into
ministackorg:mainfrom
drakeo338:claude/1965-fix

Conversation

@drakeo338

Copy link
Copy Markdown
Contributor

Fixes #1965.

The warm Lambda worker (and the one-shot invoke path) spawned node/python without a cwd, so process.cwd() was MiniStack's own directory rather than the extracted code, unlike AWS where it is LAMBDA_TASK_ROOT. Libraries such as node-config that read files relative to the cwd missed the function's config. Both spawns now pass cwd=code_dir.

New tests test_node_worker_cwd_is_code_dir and test_python_worker_cwd_is_code_dir fail without the change (cwd is the repo dir) and pass with it. The one-shot path is not covered by a test.

  • tests/test_lambda_runtime_worker.py passes (19 passed)
  • ruff check ministack/ passes
  • Full pytest tests/ not run (needs a running server)
  • Entry added to CHANGELOG.md

The warm worker and the one-shot invoke path spawned the runtime without a cwd, so process.cwd() was MiniStack's own directory. AWS starts the function in LAMBDA_TASK_ROOT.
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Docker image for this PR has been published: ministackorg/ministack-preview-build:pr-1968-c83c7834

Plugin donor used by the regular variant: ghcr.io/ministackorg/ministack:full

@Nahuel990
Nahuel990 merged commit aafe4ac into ministackorg:main Oct 3, 2026
10 checks passed
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.

Lambda: node current working directory isn't root of code like in aws

2 participants