Skip to content

Add a dedicated lambda bin#218

Merged
jonhoo merged 16 commits into
jonhoo:mainfrom
rustworthy:release-not-special
Feb 9, 2025
Merged

Add a dedicated lambda bin#218
jonhoo merged 16 commits into
jonhoo:mainfrom
rustworthy:release-not-special

Conversation

@rustworthy
Copy link
Copy Markdown
Contributor

@rustworthy rustworthy commented Jan 19, 2025

This is the first iteration on #202

I have not found a way to provide flags/args to the lambda runtime, they just taking a bootstrap binary from us and that's it.

So what I am suggesting instead, is to locate the core logic in the lib and have numerous binaries - two for now. The default bin will be binding to a socket, while the --bin lambda will produce a lambda-layered app ready for AWS Lambda runtime. This has a benefit of only including the code we need to the default binary and not adding lambda runtime specific stuff.

We will still need logic for parsing command line args for the default binary (to accomplish the testing aspect of #202), but I think we could address it in a dedicated PR.

P.S.: I am suggesting to put auxiliary functions to the utils module

Comment thread server/src/list.rs
Comment thread server/src/utils.rs
@rustworthy rustworthy changed the title [WIP] Make --release not special [WIP] Add a dedicated lambda bin Jan 19, 2025
Comment thread README.md Outdated
@rustworthy rustworthy changed the title [WIP] Add a dedicated lambda bin Add a dedicated lambda bin Jan 19, 2025
Copy link
Copy Markdown
Owner

@jonhoo jonhoo left a comment

Choose a reason for hiding this comment

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

I love this change! Just a few nits and then we can land it 🎉

Comment thread README.md Outdated
Comment thread .github/workflows/terraform-apply.yml Outdated
Comment thread server/src/lib.rs Outdated
Comment thread server/src/lib.rs Outdated
@rustworthy rustworthy requested a review from jonhoo February 9, 2025 12:19
Comment thread server/CargoLambda.toml
@jonhoo jonhoo merged commit f08963a into jonhoo:main Feb 9, 2025
@jonhoo
Copy link
Copy Markdown
Owner

jonhoo commented Feb 9, 2025

I'm not quite sure why the Terraform plan job complains about TF_API_PLAN_TOKEN not being set, when the variable is definitely set as a non-secret in the repo configuration 🤔

@rustworthy
Copy link
Copy Markdown
Contributor Author

I'm not quite sure why the Terraform plan job complains about TF_API_PLAN_TOKEN not being set, when the variable is definitely set as a non-secret in the repo configuration 🤔

The runner may be picking up my repo's config, since I got workflows enabled for my fork

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.

2 participants