Coder Social home page Coder Social logo

aws-util-firecloud's People

Contributors

andreineculau avatar iansavchenko avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-util-firecloud's Issues

feat: log if event loop is not empty when the lambda responds

we had an instance where the lambda logged a response to AWS, but then it was waiting for the event loop to become empty, which never happened, thus the lambda timed out (and the initial response was ignored)

it would be good to at least log that "hey we are now replying to AWS. but this lambda is configured to wait until the event loop is empty, and there's smth on the event loop right now" - even better if we can report some useful info about what is actually on the event loop

currently there are only some undocumented nodejs APIs - process._getActiveRequests() and process._getActiveHandles() - and even those don't work as expected. I tried in a node REPL to run a simple async function that sleeps for 10 seconds then console.log-s smth and process._getActiveRequests() remained empty, while I was expecting it to report the async function somehow.

simplify src/cfn/lambda.js : add

no config should be needed, no assumptions about storage resources etc

basically we need to get it down to "give me the Code and the Environment.Variables"

PS: breaking change, bump minor

maybe simplify access to e, ctx, ctx.log

rather than passing e.g. ctx around, just to able to call ctx.log.error, given the lambda's serial execution flow (one event at a time), maybe we could do

import {e, ctx, log} from 'aws-util-firecloud/lib/lambda';

log.error(...)

wdyt @IanSavchenko ?

note: native async code has short stacktraces

apparently proper stack traces only come in node 12, and under a flag (at least that's the current state)

maybe the babel-config-firecloud should go back to transforming (generators or bluebird) at least for node :(

remove cors() from lambda express, maybe reexport cors module

We discussed that it should be up to the API lambda itself to setup CORS, so need to remove it here, mark the change as breaking and update lambdas.

Regarding reexporting CORS: I wouldn't do it, because clients get to decide which version to use and type-inference will probably work better (if we decide to use TS in lambda at some point).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.