As a technical reviewer of the book related to this repo, I took some time to run through all of the example code to ensure that it is functional. Here is my review of the code. I've set the items as check boxes so that they can be checked off when addressed. When possible, the links to files include the relevant line number. I also hard-coded the commit hash in master that all these comments are currently referring to.
Thank you for creating this! What an awesome resource this will be to me in the future when I write serverless code. As a whole I am impressed with all the thought put into this codebase. Please note that most of these items are my opinions and that I understand that they may not be the direction you want to with this repo.
Current Status
This is the current status of the major items.
General Notes
env file example
A basic env example file per chapter that a user can copy, then fill in to get going.
Individual Chapter README.md files.
Right now each chapter either is missing a README.md or has a basic README.md that was generated with the serverless cookie cutter. It would be good to have succinct instructions for how to get started with each chapter example code.
Libs Issue
make libs
fails on most chapters when ran a second time due to the line find $(LIBS_DIR) -name '*.pyc' | xargs rm
in most Makefiles. The issue is due to a reinstall not creating any *.pyc
files. Adding a -f
flag to rm
would fix this (e.g. find $(LIBS_DIR) -name '*.pyc' | xargs rm -f
).
Database Port Collision
Both ch2 and ch3 postgres containers use the same port which makes it difficult to run both at the same time.
Database Instances Required
ch2 and ch3 are required for make shell
even if you don't want to run tests (i.e. shell to deploy). Fixing the port collision will make this less of an issue.
Postgres Alpine Image
The alpine variants of the postgres docker images are considerably smaller. It would be nice to not use as much disk space for tests.
make clean
It would be nice to have a make clean
command that cleans up libs, database containers, etc.jjjj
deploy dependent on libs
I forgot to run make libs
before deploying a few times. It would be nice to either require libs to run for each deploy in the Makefile or have some form of a check to ensure libs have been installed before a deploy.
Chapter Specific Notes
ch2
You addressed most of my notes in #12. There are a few notes on that PR.
ch3
ch5
ch6
ch7
ch8
ch9