-
-
Notifications
You must be signed in to change notification settings - Fork 796
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
"serverless-offline" v6 alpha feedback #768
Comments
@dnalborczyk I’m thinking of:
|
@computerpunc awesome!
just do a PR against
sure, go for it! it would be great if you could also add some tests, similar to: https://github.com/dherault/serverless-offline/tree/master/src/__tests__/integration/handler I also want to move everything non-unit test out of the "__tests__" folders, as those should be only used for unit tests. I'm also planning an additional (optional) test script to automatically deploy to AWS and run the same tests against the deployment and expect the same results. that would be most likely done only locally by any developers or users, unless we have or get an AWS test account. regarding #678 I introduced a
that would be great! btw, I wanna look at the |
Python integration test fails.
|
hey @computerpunc thank you! just fixed it. seems like it was only failing on |
I'm running on OSX. Now both Ruby and Python fail. This is latest plain vanilla
|
you probably have to run |
It didn't fully help. Python still fails. Below is the errors generated:
|
me too. plus the tests on travis are passing: https://travis-ci.org/dherault/serverless-offline/builds/570274311 I believe I'm not a could you run: also, could you run the following: and then run: |
Ruby test runs OK. Python doesn't but I checked on another Mac it runs OK.
On the problematic Mac
Same error as before (on the problematic Mac). |
In addition, |
ah, ok. thanks for checking! just noticed:
I guess it can't find |
@computerpunc should be fixed now |
I still cannot push any update because the push is rejected (from a Mac that runs the tests without any error). Github Desktop says that both python2 and python3 tests fail. |
it's just a git hook, you can run:
to get around it. not always recommended, but in this case a shortcut until we figure out what's wrong.
local only |
@computerpunc I can also add an ENV flag and/or npm script to skip 'flaky' tests - if that helps? |
I managed to push. I didn't need to use --no-verify because from the CLI the tests don't fail only with Github Desktop. |
Hello guys, it seems like the Readme has an incorrect
it should probably be
|
thank you @lightningboss ! Fixed. |
I see that for testing #781, you added another folder ( That's going to be very messy if for each
In #732 and #778 ( I hope this helps. |
yeah, you are right. that was just a quick drop-in without thinking about the folder structure. that needs a proper rethinking and reorg for sure.
yeah, thanks for the tip! I tried to use I might have to go back and have another look at it. |
EDIT: Created an issue instead of posting the whole thing here: #787 Sorry about that! |
While working on #788, I found that Python 3 tests fail on AWS.
Output:
|
thanks for the info @computerpunc ! gonna check it out! |
@computerpunc It seems the npm endpoint stuff wasn't defined in that file. I fixed it. a57cc6d |
Hi @dherault, I can see alpha.68 has just been released, thank you. Apologies if i'm wrong, but I think it was accidentally released to public? i.e |
Nice catch, it does not matter since v6.0.0 will be released today! |
v6.0.0 🎉 |
@dnalborczyk I don't know if you are still thinking about it but I did some digging and I don't thing it will be possible to implement because there's no way for My solution is always to run |
Can we please get a migration plan for the |
@lee-reinhardt just started #937 to bring in the httpApi configs. Feel free to fill in any specific use cases over there and I'll see what I can do. Would love to get it in sooner rather then later so we can start using it for local dev and deploying out to httpApi |
Removing comments regarding the process.env.IS_OFFLINE variable as it has been removed by the plugin in the v6 alpha changes. See dherault#768 (comment) for more details.
Removing comments regarding the process.env.IS_OFFLINE variable as it has been removed by the plugin in the v6 alpha changes. See dherault#768 (comment) for more details.
Hi, I've been trying out the Docker feature but it seems like changes made to my code are not taken into account by the running I have to stop Is that the expected behavior or am I missing something? Thanks! |
For my team's setup we use To make things easy you can add a script to "api": "nodemon --ext js,py,json,yml --exec ./node_modules/.bin/serverless offline" then you can simply call |
@Jordan-Eckowitz thanks, so I should take it that it's the normal behavior? Restarting serverless offline as well as the docker container on every code change is not really practical, I had a look through the code and it seems like the code is mounted (so should refresh), but maybe it's mounted from a copy of the codebase. I'm not sure if it would make sense to mount the actual code base (thus enabling immediate refresh). |
@mnapoli you should be starting your docker container using |
@Jordan-Eckowitz wait are we talking about the same thing? Is this possible? I'm talking about running |
@mnapoli apologies, I thought you were asking for general guidance on using Docker with |
Would you be able to share any code repo that demostrate this type of setup? Im new to using docker and constantly starting/stopping containers when I make a simple code change |
Thank you for giving
serverless-offline
v6 alpha a try! 🎉In this issue thread you can provide feedback regarding ongoing work for v6.
The current v6 releases are mainly marked as an alpha version to signal that stuff might be breaking, due to major code refactoring, reasons listed below (breaking changes), as well as the current lack of tests (which hopefully will improve over time). If you encounter any bugs please open a new issue stating the alpha version you are using.
Installation
Latest release
v6.0.0 alpha.66
New features
(initial) OpenAPI/swagger support [alpha.10
]alpha.13
]alpha.16
]Python
andRuby
users should be able to usewebsocket
events now [alpha.22
]alpha.47
]docker
support [alpha.54
] (thanks to @frozenbonito)Planned new features
Maybe new features
runtime: provided
see Warning: found unsupported runtime 'provided' #570, Allowing provided runtime to work. #648custom layers
see Can Lambda layers be used in offline mode? #630Java 8
supportDotnet core
supportImprovements
Python
handler execution Runs very slowly with AWS Python Lambda functions #742 [alpha.15
]Ruby
handler execution [alpha.17
]alpha.15
]Billed Duration
was added to the console log [alpha.23
]duration
andbilled duration
[alpha.27
]alpha.28
]rollup build (chunked) [subsequently removed in [alpha.28
]alpha.42
]Breaking changes (see below for a migration path)
alpha.32
]--binPath
option [alpha.6
]--exec
option [alpha.9
]--location
option [alpha.4
]--noEnvironment
option [alpha.9
]--showDuration
option,lambda execution time
will be displayed by default [alpha.1
]--providedRuntime
option [alpha.8
]--region
option [alpha.14
]--stage
option [alpha.14
]--prefix
option [alpha.29
]--preserveTrailingSlash
option [alpha.29
]useSeparateProcesses
was renamed touseChildProcesses
[alpha.32
]--skipCacheInvalidation
[alpha.32
]--cacheInvalidationRegex
[alpha.32
]event.isOffline=true
[alpha.9
]process.env.IS_OFFLINE=true
[alpha.25
]Temporary Breaking changes
timeout
feature has been removed temporarily to ease refactoring, (will be reimplemented soon) [alpha.0
]Bugfixes
alpha.0
]alpha.0
]alpha.1
]alpha.1
]alpha.2
]alpha.5
]memoryLimit
when it was not specified (missing default) [alpha.5
]serverless
executable: "Proxy Handler could not detect JSON" plugin should consider path toserverless
executable: "Proxy Handler could not detect JSON" #774 [alpha.6
]alpha.9
]env
merging and handler passing (process.env, provider.env, function.env) [alpha.9
]alpha.11
]alpha.13
] (thanks to @cmuto09)alpha.15
]alpha.27
]go-lang
support (withdocker support) [
alpha.54`]Performance
alpha.4
]alpha.8
]alpha.12
]alpha.12
]Other
WebSocket
support [alpha.9
]alpha.6
]alpha.6
]Go
supportJava 8
supportDotnet Core
supportpython
tests onwindows
(not a blocker)Migration Paths
--binPath
option has been removedwe're not invoking
serverless invoke local
anymore, instead we moved the (lightly modified) code into the plugin and calling it ourselves. this is also way faster: ~ 25 times (on a mac, with python)--exec
option has been removedjust call your script as part of a shell script, npm script, javascript etc.
why was this option removed?
--location
option has been removedif your handler file has different locations depending on the environment.
instead, use custom variables!
e.g.
why was this option removed?
serverless
doesn't know about--location
and thereforelocal invokes
(and possibly other things) would be brokenserverless
might add this (or a similar) functionality to the main framework, which would complicate things even more--noEnvironment
option has been removedwhy was this option removed?
serverless
, asserverless invoke local
should also cause problems--showDuration
option has been removednothing needs to be done, it just works
why was this option removed?
--providedRuntime
option has been removedinstead, use custom variables!
at provider level, e.g.:
or at function level, e.g.:
why was this option removed?
--providedRuntime
support falls apart when someone wants to use multiple different provided runtimes at function level. this is not possible with (one)--providedRuntime
option. see Function specific runtimes #750runtime: provided
see Warning: found unsupported runtime 'provided' #570, Allowing provided runtime to work. #648--region
option has been removedcoming soon
--stage
option has been removedcoming soon
--prefix
option has been removedcoming soon
--preserverTrailingSlash
option has been removedcoming soon
event.isOffline=true
has been removedprocess.env.YOUR_OWN_VARIABLE
instead (see below)process.env.IS_OFFLINE=true
has been removedserverless.yml
:why was this option removed?
remove functionality shared with https://github.com/svdgraaf/serverless-plugin-stage-variables
coming soon
This list will be updated with each alpha release.
The text was updated successfully, but these errors were encountered: