-
Notifications
You must be signed in to change notification settings - Fork 376
Set env_config value and add Serialize/Deserialize for Context #308
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
Conversation
We are having a similar issue using the v0.3.0 version of the runtime in a local or non AWS lambda environment. I can confirm without these changes (or setting the environment variables in docker-compose), when running the We planned to open a similar merge request in the near future, but will hold off until the maintainers have a chance to respond to this MR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good. I think we might want to add some automated tests to prevent a regression like this in the future. I'll open an issue and look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* reorg * Replace `genawaiter` with `async-stream` (#240) * don't depend on serde_derive directly * Add Cargo.lock to gitignore; whoops. * Cleanup docs; handle panics in lambda functions correctly. * Create a reusable runtime struct + builder * Log handler errors in runtime. Issue #241 * Added basic.rs example, comments to other examples * Tidied up examples readme. * Fixed headers in examples readme. * Formatting fix in error-handling.rs. * Fixed comment in lib.rs * Corrected handler_fn interface misconception in basic.rs Co-authored-by: Veetaha <[email protected]> * Upper-cased and edited examples/readme.md * Add log and tracing examples; fix `tracing` dependency features. * disable time on `tracing_subscriber` * Removed unused refs from basic.rs * Added error handling for #241, interim, broken. * Added err logging to lib.rs, consolidated examples * Log panic as Debug+Display, improved examples * client.rs formatting fix * Fixed "Process exited" error in lib.rs. * Added some tracing!() to lib.rs. * Enforced Send+Sync for http Handler impl. * Added docs and missing _vars to reduce warnings * Removed unnecessary + Sync on handler's future * All tests passing * Remove deprecated simple_logger calls * Remove Cargo.lock * cargo fmt changes Co-authored-by: David Barsky <[email protected]> Co-authored-by: Lucio Franco <[email protected]> Co-authored-by: Ubuntu <[email protected]> Co-authored-by: rimutaka <[email protected]> Co-authored-by: Veetaha <[email protected]>
Closes #260
Description of changes:
Context::env_config
which was declared in master many commits ago, but was never set to anything#[derive(Serialize, Deserialize)]
toContext
andConfig
structssuccessful_end_to_end_run
test functionConfig::from_env
0.3.1
This change enables proxy-ing lambda requests via transports like AWS SQS for local debugging.
Adding Ser/Deser does not affect the binary size unless those features actually used, so there is no point making it an optional feature.
Backward compatibility: full
See issue #260 for background discussion and https://github.com/rimutaka/lambda-debug-proxy for a proxy example using this feature.
By submitting this pull request