Commit Graph

164 Commits

Author SHA1 Message Date
be3c94b1a9 Reduce pull_request event listens for checklist workflow 2024-11-09 13:45:03 -06:00
f3c5f558b0 Add checklist workflow for draft label & changelog checker 2024-11-09 13:43:30 -06:00
f08ab043e8 Fix test workflow pytest invocation 2024-11-09 13:43:13 -06:00
818c3cb7bc Add pytest with GitHub Action workflow 2024-11-09 13:21:50 -06:00
db260ecfa3 Add RELEASE_CHECKLIST.md 2024-11-09 12:47:07 -06:00
ca9ea5ec30 Updated CHANGELOG.md, updated versions to 0.3.0 2024-11-09 12:36:28 -06:00
2390b62864 pnpm: Added clsx, removed @nkzw/eslint-config, updated @types/node to 22.9, @eslint 9.x 2024-11-09 12:29:08 -06:00
d612625de8 Add session model, use utc_now utility 2024-11-07 11:32:24 -06:00
95b05e077a delete all old IPAddress related model code 2024-11-07 11:31:03 -06:00
bc1a6f927f Add utc_now for deprecated datetime.datetime.utcnow 2024-11-07 11:30:34 -06:00
361fc13741 Remove IPAddress model, add User model 2024-11-07 11:03:21 -06:00
04ed915f28 backend run.sh defaults to pretty logs on debug level 2024-11-07 11:03:06 -06:00
b4da253583 add pwdlib[argon2] packages for hashing 2024-11-07 11:02:50 -06:00
8515879448 Revert "temp: try uvicorn command in railway.json"
This reverts commit 45ec5c396c.
2024-11-01 20:48:18 -05:00
45ec5c396c temp: try uvicorn command in railway.json 2024-11-01 20:44:40 -05:00
1003fd3eed hotfix: re-add hypercorn with railway start cmd/logging.toml, restore internal uvicorn bindings to conditional ip-v4/v6 2024-11-01 20:21:56 -05:00
e2a47c1868 hotfix: listen on 0.0.0.0 IPv4 interface binding
I don't know sometimes.
2024-11-01 19:34:11 -05:00
24a3ae5f24 Merge pull request #9 from Xevion/0.2.2
### Added

- Added the `orjson` serializer for faster JSON serialization
  - Used in `structlog`'s `JSONRenderer` for production logging
  - Used in `fastapi`'s `Response` for faster response serialization
- Improved documentation in multiple files
  - `__main__.py`
  - `logging.py`
  - `models.py`
  - `utilities.py`
  - `migrate.py`
  - `responses.py`
- A `get_db` utility function to retrieve a reference to the database (with type hinting)
- Minor `DATABASE_URL` check in `models.py` to prevent cryptic connection issues

## Changed

- Migration script now uses `structlog` instead of `print`
  - Migration script output is tuned to structlog as well.
- Migration names must be at least 9 characters long
- Unspecified IPv6 addresses are returned without hiding in `utilities.hide_ip`
- Applied `get_db` utility function in all applicable areas.

### Fixed

- Raised level for `apscheduler.scheduler` logger to `WARNING` to prevent excessive logging
- IPv4 interface bind in production, preventing Railway's Private Networking from functioning
- Reloader mode enabled in production
v0.2.2
2024-11-01 19:20:23 -05:00
f8d1edcf3b Bump project version to 0.2.2 2024-11-01 19:18:36 -05:00
43bf96e5c1 Add orjson JSON serializer for FastAPI & structlog performance 2024-11-01 19:17:57 -05:00
b561ec6998 Improve migrate, responses docs, require min length 9 migration name (validator) 2024-11-01 18:42:57 -05:00
75e875e61d Switch migrate.py to structlog, remove unused old testing code 2024-11-01 18:37:10 -05:00
3b3f3ba784 Fix unspecified IPv6 addresses from being malformed by hide_ip, fix double private get_database_url breaking 2024-11-01 18:24:06 -05:00
204be26201 Improve migrate.py docs, variable names 2024-11-01 18:17:38 -05:00
b7d9b256d9 Minor documentation improvement in utilities.py 2024-11-01 18:12:34 -05:00
01f6d348cd Improve models.py documentation, small DATABASE_URL check 2024-11-01 18:10:49 -05:00
cf7536a39b Add get_db utility function
- Minor changes in flush_ips log messages
2024-11-01 18:03:32 -05:00
85a2d82832 Remove deprecated utcnow() usage, pass UTC TzInfo instead 2024-11-01 17:54:36 -05:00
1ecab265ac Raise level for apscheduler.scheduler logger, add TODO for easier log configuration 2024-11-01 17:53:28 -05:00
b67272392a Improve logging.py documentation 2024-11-01 17:51:22 -05:00
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