121 Commits
Author SHA1 Message Date
tomer doronandGitHub 944e16495a Swift 5.3 is released, use if for CI (#170) 0.3.0 2020-09-18 12:59:02 -07:00
tomer doronandGitHub f175b5452f switch to 5.3 nightly now that it is published (#164)
motivation: stable 5.3 ci

changes: pin 5.3 ci jobs to 5.3 nightlies instead of master
2020-08-19 11:18:56 -07:00
tomer doronandGitHub 8986809d8e simplify date formatting (#159)
motivation: use consistent date formatting across platforms

changes: use manually configured DateFormatter instead of ISO8601DateFormatter
2020-08-14 14:24:29 -07:00
tomer doronandGitHub f731664c4d remove requirment on macOS 10.13 (#156)
motivation: simplify downstream libraries

changes: precondition out debugging uses cases on macOS < 10.13
2020-08-10 10:02:12 -07:00
tomer doronandGitHub f3c68d66c4 better error message when invoking local lambda server with incorrect http method (#157)
motivation: nicer error messages

changes: return 405 when using wrong http method on the lambda invocatoin endpoint (local debug server)
2020-08-06 14:39:32 -07:00
tomer doronandGitHub 9ebc9dda20 give better error when lambda fails to start (#155)
motivation: in error cases where lamnda fails to start the process fails silently and exists with code 0

changes: change the blocking API to check on the result and fatalError if lambda cannot be started / run
2020-08-06 14:08:25 -07:00
2067f4aea1 JSONEncoder/JSONDecoder and String convenience methods (#144)
Co-authored-by: Konrad `ktoso` Malawski <konrad.malawski@project13.pl>
2020-08-03 21:04:13 +02:00
07a11c4c0f Correct project URL in CONTRIBUTING.md (#154)
Co-authored-by: Michal A <michal@pokryfka.net>
2020-08-03 08:38:56 +02:00
pokryfkaandGitHub 1b594cad62 Generate trace ID in correct format (#139)
motivation: more correct Xray TraceID

changes:
* add AmazonHeaders::generateXRayTraceID
* Generate correct trace ID in LocalLambda Server
* Generate correct trace ID in LambdaRuntimeClientTest
2020-07-07 18:53:25 -07:00
tomer doronandGitHub b8834b21c2 improve LocalDebugging readme (#137)
motivation: clearer guidelines for using the example

changes: fix a few typos, fix incorrect scheme name and add a bit more prose
2020-07-02 11:18:23 -07:00
Adam FowlerandGitHub 5130278087 SES time zone (#135)
motivation: Sometimes common header date comes with an alphabetical timezone in brackets after the numeric timezone

changes:
* Support common header date format with brackets
* Update readme with SES Event link
2020-06-27 13:16:52 -07:00
tomer doronandGitHub b9224e2fb6 examples deployment scripts refresh (#133)
motivation: make sure examples are up tp date

changes:
* use swift:5.2 images instead of nighlies
* compute dependencies to make zipfile as small as possible
* make scripts more consistent
2020-06-25 13:38:25 -07:00
tomer doronandGitHub 2bac89639f add syncShutdown to LambdaHandler (#132)
motivation: make shutdown easier to use

changes:
* override shutdown to use the offloadQueue to perform syncShutdown
* add empty syncShutdown that can be implmented by the concrete Lambda function
0.2.0
2020-06-18 12:48:13 -07:00
Andrea ScuderiandGitHub 0535cb72eb Fix SAM Examples after directory change (#124) 2020-06-17 13:37:51 -07:00
tomer doronandGitHub 034afa1a9b update contributors list (#131)
motivation: give credit where credit due

changes: update CONTRIBUTORS.txt with recent contributions
2020-06-17 11:33:31 -07:00
Adam FowlerandGitHub d2f5c1c324 Added SES Event type (#130)
motivation: support event triggers from SES

changes: Added SES Event type
2020-06-17 09:53:53 -07:00
Fabian FettandGitHub 437a60d7a0 Added shutdown() -> EventLoopFuture<Void> to the ByteBufferLambdaHandler (#122)
* Added `syncShutdown() throws` to the `ByteBufferLambdaHandler`

* Updated to use a `ShutdownContext`

* Review comments addressed.
2020-06-17 07:34:01 -07:00
Ro-MandGitHub 77280662e3 Added header when reporting failing invocations or initializations #116 (#128)
* allow the users of client to provide headers
* add initialization error header
* add error header to failed invocations
* fix external setting of ip and port via config
* add tests
2020-06-17 06:55:05 -07:00
tomer doronandGitHub d1a927650a add initialization context (#126)
motivation: in more complex initialization scearios you may want access to a logger or other utilities

changes:
* introduce new InitializationContext type that could be extended in the future without breaking the API in semantic-major way
* instead of passing in EventLoop to the handler factory, pass in a context that includes a Logger, an EventLoop and a ByteBufferAllocator
* fix a bug where we dont hop back to the event loop when coming back from the handler
* adjust tests to the new signature
2020-06-16 11:08:00 -07:00
tomer doronandGitHub 246088e340 Add GitHub issue and PR templates (#127)
motivation: capture issue/PR info consistently

changes: add .github directory with relevant PR and issue templates
2020-06-15 10:16:01 +02:00
Andrea ScuderiandGitHub c683b41545 Add example scripts and docs for Serverless Framework (#113)
* Add example scripts and docs for Serverless Framework
* Refactor Examples folder and scripts
- Add a common config.sh script
- Move SAM templates to scripts/SAM
- Add Serverless templates to scripts/serverless
- Update the scripts to work with new folder structure and config.sh
2020-06-12 12:14:37 -07:00
Fabian FettandGitHub a5e2fd0f10 Readme: Making Request and Response types explicit in Lambda.run callback (#111) 2020-06-07 08:06:15 -07:00
Fabian FettandGitHub 0008e59bab Rename payload to event (#115) 2020-06-07 07:47:05 -07:00
Eneko AlonsoandGitHub 71587eab10 Document configuration variables in deploy.sh (#97) 2020-06-06 18:21:35 -07:00
tomer doronandGitHub aa6468b360 add docker-compose setup for amazon linux (#114)
motivation: swift 5.2.4 now supportes AL2

changes:
* add docker-compose file for al2 5.2.4
* correct 5.3 docker-file to say al2 instead of 18.04
2020-06-05 20:23:08 -07:00
Brendan KirchnerandGitHub 5e546a1a9e Added jq requirement to examples readme (#106)
* Added jq requirement to readme
2020-06-03 10:44:28 -07:00
Christoph WalcherandGitHub c562cb8d0f Fix Typo in readme.md (#110) 2020-06-03 17:26:55 +02:00
tomer doronandGitHub 3b29513652 handle lambda errors correctly in mock server (#104)
motivation: better mock server

changes:
* add handler for :requestID/error
* return .accepted to lambda
* return .internalServerError to client + error json
* small refactoring of response code in mock server to make it DRYer
2020-06-01 13:15:30 -07:00
tomer doronandGitHub e2ac820289 add an option to start the local debugging server based on an env variable (#87)
motivation: make using the local debugging server easier to turn off/on without the need to change code when oyu are preparing to deploy

changes:
* add code to lambda so that in debug mode only, if the LOCAL_LAMBDA_SERVER_ENABLED env variable is set the local debugging server is started
* make withLocalServer internal
* update example code
2020-06-01 12:38:06 -07:00
Johannes WeissandGitHub cc345ba7ce link Fabian's great getting started guide (#103) 2020-06-01 06:41:32 -07:00
Colton SchlosserandGitHub 7d646b49b2 Readme typo (#101) 2020-05-31 09:28:49 -07:00
Bryan MoffattandGitHub eaa6fb6338 Add a User-Agent when using the Lambda Runtime API (#98)
* Add a User-Agent when using the Lambda Runtime API
2020-05-30 10:39:34 -07:00
pmarrufoandGitHub f1ce84f70b Fix typo in ErrorHandling Example (#93)
* Fix typo
2020-05-29 13:42:44 -07:00
Zhibin CaiandGitHub f35f87c9e5 fix typo in readme.md (#95)
* fix typo in readme.md
2020-05-29 13:40:19 -07:00
Max DesiatovandGitHub cac8e72c85 Fix typo in readme.md (#94) 2020-05-29 13:32:29 -07:00
Bryan BartowandGitHub 03e5d7ed95 Fix typo (#92) 2020-05-29 12:24:26 -07:00
75d05ca954 docs cleanup (#91)
motivation: cleanup docs for oss

changes:
* add useful information in readme, with pointers to examples
* update ci setup and example to use latest tools
* update contributors list

Co-authored-by: Yim Lee <yim_lee@apple.com>
0.1.0
2020-05-28 12:19:19 -07:00
tomer doronandGitHub 3cb9330832 fix example correctness (#90)
motivation: make example more correct

changes: update response in DispatchQueue.main
2020-05-28 09:59:56 -07:00
tomer doronandGitHub 8c24cffd97 fix context members to follow swift APi guidelines (#88)
motivation: nicer API

changes:
* requestID -> requestID
* traceId -> traceID
* invokedFunctionArn -> invokedFunctionARN
* adjust examples
2020-05-27 11:46:31 -07:00
Fabian FettandGitHub fe60959b99 fix race condition when shutting down server
motivation: fix a race condition that can lead to crash and failing tests

changes: close channel when canceling
2020-05-21 09:11:29 -07:00
d956b89dbc improve debugging example (#84)
motivation: clearer examples as we prepare to open source

changes:
* rename debugging example to make the name more accurate
* add more information in the local debugging example
* add a Shared module to show how to share code between client and server
* make example more useful - use JSON for registration like flow
* add docker-compose task to test examples

Co-authored-by: Yim Lee <yim_lee@apple.com>
2020-05-21 09:07:38 -07:00
tomer doronandGitHub e907bd5edf fix small typo (#80) 2020-05-20 10:04:00 -07:00
53930fef38 add debug functionality to test with mock server (#73)
motivation: allow end to end testing locally

changes:
* add a Lambda+LocalServer which exposes Lambda.withLocalServer available only in DEBUG mode
* local server can receive POST requests with payloads on a configurable endpoint and and send them to the Lambda
* move Lifecycle completely into EventLoop
* remove all locks since running in one EventLoop
* Use UUID for requestId

Co-authored-by: tom doron <tomer@apple.com>
2020-05-15 16:56:17 -07:00
tomer doronandGitHub 64ee5a215c small fixes to the perf script (#78)
motivation: keep script up to date

changes:
* use 5.3 nightly
* better support for perf symlink as the location is a moving target
* info about cold/warm start
2020-05-12 16:04:30 -07:00
ab3ce640aa Use NIO in Single Threaded Mode (#68)
motivation: better performance 

changes:  employ SwiftNIO's new Single Threaded Mode

Co-authored-by: tomer doron <tomerd@apple.com>
2020-05-12 13:41:10 -07:00
Fabian FettandGitHub d3b75176dd Update APIGateway example to use AWSLambdaEvents (#76)
motivation: example of how to use the API Gateway model

changes: Update APIGateway example to use AWSLambdaEvents
2020-05-12 12:41:01 -07:00
76b2332477 update readme (#75)
motivation: better and more up-to-date information 

changes: rewrite readme to reflect APIs and architecture

Co-authored-by: Konrad `ktoso` Malawski <konrad.malawski@project13.pl>
Co-authored-by: Fabian Fett <fabianfett@mac.com>
2020-05-11 10:39:19 -07:00
Fabian FettandGitHub b7462b8081 Make Lambda.env() -> String? public (#61) 2020-05-08 12:35:55 -07:00
tomer doronandGitHub 9310ad8f65 Merge pull request #72 from swift-server/move-samples
move samples into a subdirectory
2020-05-07 09:47:16 -07:00
tomer doronandGitHub e97f05e7cb Merge branch 'master' into move-samples 2020-05-07 09:47:01 -07:00