Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(type-safe-api): missing runtime modules in Lambda deployment #815

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

jstrunk
Copy link
Contributor

@jstrunk jstrunk commented Jul 19, 2024

Fixes the issue where generated runtime modules were not packaged in the Lambda deployment, causing ImportModuleError when executing Python handlers.

The fix modifies the packaging task in GeneratedPythonHandlersBaseProject to strip the '-e' flag from exported requirements.txt. This ensures runtime modules are installed as regular packages instead of editable installations.

Changes:

  • Update 'poetry export' command to pipe output through 'sed' and remove '-e' prefix.
  • Update corresponding snapshot tests for new package task command.

Fixes #791

Fixes the issue where generated runtime modules were not packaged
in the Lambda deployment, causing ImportModuleError when executing
Python handlers.

The fix modifies the packaging task in GeneratedPythonHandlersBaseProject
to strip the '-e' flag from exported requirements.txt. This ensures runtime
modules are installed as regular packages instead of editable installations.

Changes:
- Update 'poetry export' command to pipe output through 'sed' and remove
  '-e' prefix.
- Update corresponding snapshot tests for new package task command.

Fixes aws#791
Copy link

nx-cloud bot commented Jul 25, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 2750cc2. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@agdimech agdimech merged commit 883e782 into aws:mainline Jul 25, 2024
4 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.

[BUG] Python Lambda handlers in type-safe-api can't import runtime module
2 participants