devops
Technical notes on web development, DevOps, and AI integration.
115 articles
- 21:24backend
The Safe Boundary: Why the Roundtrip Test Stops at Checkpoint 56
The down chain breaks mid-way: an old down migration inserts an ENUM value that no longer exists there. Checkpoint 56 is the tested safe window.
TL;DR: The migration roundtrip test stops at version 56 instead of unwinding to zero, because a cross-dependency between migrations 45 and 51 breaks any deeper descent. Version 56 is the deepest proven-safe checkpoint, verified with spot-checks on 8 tables and 12 columns. A separate test pins the dev-only login route to return 404 everywhere except development.
#golang#golang-migrate#mysql - 22:29devops
The Module Changelog Is Not the Git Log
One changelog row can summarize six commits: curated module logs beat raw git history.
TL;DR: Six commits landed in one day, but the module changelog captured the whole shift in a single row. Turns out git logs record the mechanical steps of how code was built, while a curated changelog states what the product now does. Automation can list commits, but it can't infer triggers or QA flags, so human judgment stays essential.
#changelog#documentasi#praktik-rekayasa - 01:42devops
Hybrid Upgrade Playbook: npm In-Container, Image Fallback
A two-phase upgrade playbook: npm inside the running container plus an automatic custom-image fallback, verified against the version the app actually serves.
TL;DR: After upgrading 9router, the endpoint still served the old version because the container ran code baked into the image, not the freshly installed npm package. The rewritten playbook uses a two-phase approach: cheap in-container installs first, then building an image from source, with served-version verification, health checks, and automatic rollback. Running serial: 1 keeps failures contained to one host.
#ansible#docker#npm - 00:12devops
Keeping the Users Table Alive When db-push Swaps the Database
db-push replaced staging from a dev dump and accounts vanished. Two small dumps and honest guards keep them alive.
TL;DR: Staging users kept vanishing because db-push replaces the whole database with a dev dump that excludes the users table. The fix: dump staging users beforehand, then restore them after the import using --no-data, --complete-insert, and --no-create-info. Key lesson: dump and verify before any DROP, validate injected names, and lock down the hash-bearing file.
#mysql#mysqldump#ssh - 17:45testing
Baseline QA Before Fixes: Red Doesn't Mean Broken Code
The first QA baseline came back all red: a stale database volume and a healthcheck calling a missing wget, not a broken codebase.
TL;DR: Initial integration failures came from environment drift, not broken code, with a stale database volume and a missing wget in the healthcheck. Cleaning volumes with docker compose down -v fixed the setup and let all 28 API packages pass. Coverage gaps and E2E failures were recorded without patching to keep the baseline trustworthy for prioritized follow-ups.
#testing#golang#docker - 23:57devops
Move an Oversized Folder to Block Storage with a Symlink
A 14G backup folder filled the root disk. The move-to-block-storage-with-symlink pattern relieves disk pressure without deleting backup data.
TL;DR: When the root disk hit 95 percent, the culprit was a 14GB WordPress plugin backup folder. Instead of deleting it, the fix moved the folder intact to block storage and left a symlink at the old path, dropping usage to 44 percent. Verify file counts, use absolute paths, and persist the mount in fstab to avoid dangling links.
#linux#rsync#symlink - 23:09devops
Full WordPress Disk: Auditing the EWWW Image Backup Folder
A bloated EWWW IO image backup folder appears when the disk fills. Learn the backup mechanism, official trimming paths, and safety criteria before deleting.
TL;DR: A production server hit 100 percent disk usage, and the EWWW Image Optimizer backup folder turned out to hold 14 gigabytes. The folder grows from pre-optimization originals, downscaled originals, and WebP copies, each with its own official cleanup command. Verify an independent, restorable backup first, map the folder composition, then run the matching command.
#wordpress#backup#wp-cli - 03:42devops
A Zero-Diff Commit: Removing a Third-Party Integration
The commit removed an integration and changed zero lines of code. The real cleanup lives in credentials, caches, breakers, and billing.
TL;DR: A zero-diff commit declared a Plane integration removed, but the real cleanup happened entirely outside the codebase. Credentials, client caches, billing entitlements, and circuit breaker configs all outlive the code and need manual revocation. The lesson: treat integrations as detachable backing services and write a removal plan listing vendor touchpoints from day one.
#plane#api#mcp - 23:25backend
Red Pipeline, Green Laptop: Migrations Before pytest
CI called pytest on an empty database while production applied migrations first; one workflow line aligned both contracts.
TL;DR: A test suite that passed locally kept failing in CI with misleading database errors. The root cause was that production ran Alembic migrations before boot, while CI pointed pytest straight at an empty Postgres. Adding alembic upgrade head before tests in the workflow made starting state deterministic, so failures now point at actual code.
#ci#alembic#pytest