Commit Graph

84 Commits

Author SHA1 Message Date
0407dba4d1 Updated CHANGELOG.md 2024-11-01 17:46:56 -05:00
52df0c571f Fix IPv4 interface bind in production, fix reloader enabled in production 2024-11-01 17:45:37 -05:00
65701b7178 Improve entrypoint documentation & debug logs 2024-11-01 17:45:07 -05:00
53bf74dcd7 Merge pull request #7 from Xevion/0.2-fix
### Changed

- Mildly reformatted `README.md`
- A development mode check for the `app.state.ip_pool`'s initialization (caused application failure in production only)

### Fixed

- Improper formatting of blockquote Alerts in `README.md`
v0.2.1
2024-11-01 17:11:49 -05:00
e61b2a7f60 Bump project version to 0.2.1 2024-11-01 17:11:01 -05:00
185b2f5589 Fixed blockquote alerts in README, mild reformatting 2024-11-01 16:58:55 -05:00
7a27175423 Remove development mode check for ip_pool generation
I just wanna see it run on the production serve once, I'll remove all of
this later.
2024-11-01 16:57:37 -05:00
2b1886acd9 Merge pull request #6 from Xevion/0.2
### Added

- This `CHANGELOG.md` file.
- Structured logging with `structlog`
  - Readable `ConsoleRenderer` for local development
  - `JSONRenderer` for production logging
- Request-Id Middleware with `asgi-correlation-id`
- Expanded README.md with more comprehensive instructions for installation & usage
  - Repository-wide improved documentation details, comments
- CodeSpell exceptions in VSCode workspace settings

### Changed

- Switched from `hypercorn` to `uvicorn` for ASGI runtime
- Switched to direct module 'serve' command in `backend/run.sh` & `backend/railway.json`
- Relocated `.tool-versions` to project root
- Massively overhauled run.sh scripts, mostly for backend service
- Improved environment variable access in logging setup
- Root logger now adheres to the same format as the rest of the application
- Hide IP list when error occurs on client
- `run.sh` passes through all arguments, e.g. bpython REPL via `./run.sh repl`
- Use UTC timezone for timestamps, localize human readable strings, fixing 4 hour offset issue
- `is_development` available globally from `utilities` module

### Removed

- Deprecated `startup` and `shutdown` events
- Development-only randomized IP address pool for testing
v0.2.0
2024-11-01 16:44:24 -05:00
a894dd83c1 Add CHANGELOG.md 2024-11-01 16:40:17 -05:00
e1bbeedaf2 Remove 'ms' suffix from 'duration' log key, re-enable X-Process-Time header in development mode 2024-11-01 16:38:20 -05:00
441ab00da3 Move is_development into utilities.py 2024-11-01 16:37:39 -05:00
40669b8f08 Fix human_readable not handling UTC dates properly, add types-pytz 2024-11-01 16:36:47 -05:00
daf9254596 Passthrough arguments for backend/run.sh 2024-11-01 16:23:23 -05:00
40385c9739 Hide, don't clear seenIps upon error 2024-11-01 16:15:35 -05:00
10b93d41d6 Reformat all python files, remove unused imports 2024-11-01 16:13:01 -05:00
4b85153065 Clear client's seen IPs list upon error 2024-11-01 16:12:37 -05:00
57aa841871 Use datetime.utcnow instead, eliminate timezone consideration 2024-11-01 16:12:16 -05:00
8b85fe7040 Add VSCode Spellcheck manual exceptions 2024-11-01 16:10:19 -05:00
796c28d72d Switch railway.json startCommand to module serve, use PORT variable 2024-11-01 16:02:40 -05:00
267abfe792 Remove old hypercorn command with unused logging.toml 2024-11-01 16:01:58 -05:00
6fe1a8b60f Use logger not logging, use keyword arguments for structured logging 2024-11-01 15:47:28 -05:00
9336fb5506 Set access logs to debug, millisecond process time, pluralize word option
I'm unsure if it's good to use string notation in the duration, maybe duration_ms to imply the unit would be better?
2024-11-01 15:47:28 -05:00
bcb1441251 Switch main app loggers to structlog, fix improper structlogs 2024-11-01 15:47:28 -05:00
f93df47b67 Disable X-Process-Time response header 2024-11-01 15:47:28 -05:00
3232e89d0a Bump project version to 0.2.0 2024-11-01 15:47:28 -05:00
a873c4785d Access environment variables directly in setup_logging 2024-11-01 15:47:28 -05:00
1741739310 Disable handlers, setup propagation with uvicorn log_config
Apparently this was what I have been chasing for the last few hours.
2024-11-01 15:47:28 -05:00
3a2ef75086 Add ASGI Request-Id correlation, add structlog LoggingMiddleware, overhaul all logging
- minor formatting details, type fixes.
2024-11-01 15:47:28 -05:00
a96631e81e Setup structlog, delete randomized IPs on startup
- minor formatting, type fixes
2024-11-01 15:47:28 -05:00
0816ddcdca Switch from hypercorn to uvicorn, structlog testing 2024-11-01 15:47:28 -05:00
91cc8e24b6 Remove deprecated startup/shutdown events into proper applicaiton Lifespan definition 2024-11-01 15:47:28 -05:00
f8b76c757c Initial logging improvements, switch run.sh to direct module 'serve' cmd 2024-11-01 15:47:28 -05:00
902eb74deb Add 'structlog' module 2024-11-01 15:47:28 -05:00
5a288cf87c Only import CORSMiddleware in development mode 2024-11-01 15:47:28 -05:00
cb76965a43 Add run.sh warning note to README 2024-11-01 15:47:28 -05:00
af91adeca3 Overhaul README.md with more instructions (env vars, railway CLI, usage, asdf install) 2024-11-01 15:47:28 -05:00
5390fb57a7 Overhaul run.sh scripts
- Default environment variables through this, instead of .env
- Added some basic checks to ensure developers don't stub their toe
- Use `railway link`, injecting environment variables without insecure dotenv files
2024-11-01 15:47:28 -05:00
f034b41da1 Add .env.example in proper places 2024-11-01 15:47:28 -05:00
109e09df50 Add note on purpose of poetry version in Nixpacks config 2024-11-01 15:47:28 -05:00
b962966080 Move .tool-versions to project root 2024-11-01 15:47:22 -05:00
5360d24543 python analysis extraPath (import resolution) sprintOne v0.1.0 2024-10-24 13:01:13 -05:00
1380ae5497 only hide ip if it's not the same as user_ip 2024-10-24 04:38:37 -05:00
5815c2b6d1 frontend: error handling 2024-10-24 04:26:00 -05:00
bc0ef7728f reformat, add docs 2024-10-24 04:23:35 -05:00
c25e335fc9 Add psycopg2 (!!!) 2024-10-24 04:23:29 -05:00
6f26df1939 Update frontend to use new IP listing feature 2024-10-24 04:18:16 -05:00
4267d40611 development mode checks 2024-10-24 04:18:08 -05:00
c0d135d8a8 revamp ip address demo, buffered background IP submit with upsert, parameterized SQL with psycopg2 cursor & execute_values 2024-10-24 04:04:09 -05:00
25177a3346 get_ip helper method, hide_ip helper, docs 2024-10-24 04:03:28 -05:00
77d8586772 add human-readable, apscheduler, bpython (dev) 2024-10-24 04:03:09 -05:00