-
Notifications
You must be signed in to change notification settings - Fork 236
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
Feature: Run sls dynamodb start
in detached mode
#106
Comments
Using the serverless-offline plugin, I was able to have use |
This is heavily blocking proper CI/CD & DevOps usage of the whole tool tbh. Nobody in their right mind can go into a pipeline and say: "run all this, then do your test, oh and then press ctrl+c when you're done". Ideally I wish to be able to dive into my npm script, start the database detached, run my tests, kill the database. |
@erauer - could you specify what you used in the "test" section of your package.json (basically the command which is being run with |
rynop/dynamodb-local#19 As such, this should be possible for the serverless plugin to work in this way. Ideally I want to run in my DevOps pipeline: which would just start the whole database (potentially writing the child object, or child pid) to a temp file. |
I have this problem too, I have to run this command, but the If I run the command like this the first time will work But the second time I run this command this problem will occur on serverless-dynamodb-local |
I use |
For CI testing, one would need to run
sls dynamodb start
asynchronously, because the command blocks the current shell.Workaround 1:
sls dynamodb start &
This runs it in the background, but does not wait until the db is set up properly.
Workaround 2:
sls dynamodb start & sleep 5
This works, but might introduce race conditions.
Suggestion:
How about:
sls dynamodb start --detached
which runs synchronously until all work is done, exits the process (the shell command is finished), but continues serving the database in the background.The text was updated successfully, but these errors were encountered: