Can We Deploy Yet?
summary
A concise production checklist with concrete fixes: stop catching BaseException and use raise ... from to preserve root errors; replace print-silenced except blocks with actionable handlers and custom exceptions; switch to structlog JSON logs with bound key/value context and processors so logs are machine-parsable; run CI (example uses GitHub Actions) without continue-on-error—demo shows a hidden failing pytest step when continued; secure Docker by pinning images, avoiding ADD, not running as root and running hadolint Docker linter on CI; add Sphinx/readthedocs docs.
AI-written summary · about
chapters (20)
- 0:00Start
- 1:44What Does Production Mean to You
- 2:18Production and Non-Production Environment
- 3:23How To Actually Check if Your Code Is Ready for Production
- 4:31Exception Handling
- 9:13How To Handle Exceptions
- 12:01Logging
- 16:36Improve the Logging
- 18:57Demo
- 20:29Define a Custom Log Level
- 21:11Json Format
- 21:50Questions
- 24:57Effective Ci Cd Pipelines Continuous Integration
- 28:19Set Up a New Workflow
- 28:44Documentation Coverage
- 29:30Fail on Error
- 30:59Docker Images and How To Secure
- 33:09Which User Are You Using for Your Production Docker Images
- 34:41Check the Authenticity of the Image
- 38:41How To Start with Python
