You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
update-stack seems to deploy but does not actually update the JSON data in the API. Note: running locally works perfectly. Swagger shows proper data locally but not on AWS version after update-stack. Maybe worth noting that the db.json in the deployment folder has been updated. Just seems that it's not being uploaded/deployed. As a work-around, I am having to create a brand new Lambda stack every time I edit the JSON (can't keep doing)
To Reproduce
Deploy a JSON jsonsls create-stack ../DB/db.all--.json
Make a change to the JSON shape.
Run local: jsonsls run ../DB/db.all--.json
[Works great]
Update the deploy with the exact same DB: jsonsls update-stack ../DB/db.all--.json
...passes all the tests and "deploys", but the deployment is the old JSON data
Have done this several times. Does not update the API. Swagger still shows old fields and old results (using the new link that the script generates)
please delete the file in the s3 bucket after you executed the stack update.
After that the first request will recreate the file in the s3 bucket with the new content.
Thanks again for this super useful tooling. Appreciate it a lot.
I figured it out by trial & error… (for anyone coming along later), You
have to run command:
`aws s3 rm s3://jsonsls-<api_name>/db.json`
after the update-stack deploys and it will copy the newly deployed db.json
into that bucket when you hit the API next
You may want to make note of this in the docs and maybe even the command
line output after the update-stack completes. Would be even better if the
CLI would ask you if you want to invoke that command, since it knows the
URLs already, and it can do it for you if you say `Y`.
Anyway, this is super helpful. Thanks again!
On Fri, Sep 17, 2021 at 1:14 PM, Florian Fuß ***@***.***> wrote:
Hey David,
please delete the file in the s3 bucket after you executed the stack
update.
After that the first request will recreate the file in the s3 bucket with
the new content.
You can chain this together as well...
1. sls update-stack
2. aws s3 rm
3. curl api-url
Hope this helps.
br,
pharindoko
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#829 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACEI6VA7QF46ONSJGSFOOFDUCOOTRANCNFSM5EIHPGYA>
.
dwertheimer
changed the title
update-stack not updating data even though JSON has been changed
update-stack not updating data even though JSON has been changed (now more of a feature request to tell people how to update the db.json on AWS)
Sep 18, 2021
But you`re right - when you wrote this I thought the same.
Would be nice to make this easier and give the user the choice to update the file immediately.
Additionally the versioning for the bucket can be set. So no data loss but direct updates.
Describe the bug
update-stack seems to deploy but does not actually update the JSON data in the API. Note: running locally works perfectly. Swagger shows proper data locally but not on AWS version after
update-stack
. Maybe worth noting that the db.json in the deployment folder has been updated. Just seems that it's not being uploaded/deployed. As a work-around, I am having to create a brand new Lambda stack every time I edit the JSON (can't keep doing)To Reproduce
Deploy a JSON
jsonsls create-stack ../DB/db.all--.json
Make a change to the JSON shape.
Run local:
jsonsls run ../DB/db.all--.json
[Works great]
Update the deploy with the exact same DB:
jsonsls update-stack ../DB/db.all--.json
...passes all the tests and "deploys", but the deployment is the old JSON data
Have done this several times. Does not update the API. Swagger still shows old fields and old results (using the new link that the script generates)
Check swagger (using the new link provided in the terminal after deploy). See nothing has changed
Expected behavior
jsonsls would update the swagger and API with the new JSON data
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: