Skip to content

v1.6.1 - More Backend Updates

Choose a tag to compare

@thejudge22 thejudge22 released this 19 Jan 22:51
· 59 commits to main since this release
48dc851

What's New

This release focuses on technical debt resolution, improving code quality, infrastructure, and operational capabilities.

🔧 Tech-Debt Improvements

Separate Test Dependencies (#21)

  • Removed pytest dependencies from production requirements
  • Created backend/requirements-dev.txt for development dependencies
  • Updated Dockerfile.dev to install development dependencies
  • Added test running instructions to README.md
  • Benefit: Production Docker images are now smaller and build faster without test dependencies

YouTube Video ID Index (#17)

  • Added explicit index=True to youtube_video_id column in Video model
  • Generated and applied Alembic migration for explicit index
  • Documented indexing strategy with explanatory comments
  • Benefit: Improved query performance and code clarity for video lookups by YouTube ID

Enhanced Health Check Endpoint (#22)

  • Updated /api/health endpoint to verify database connectivity
  • Added SELECT 1 query to test database connection
  • Returns {"status":"ok","database":"connected"} on success
  • Returns HTTP 503 with error details on database failure
  • Benefit: Better monitoring, observability, and container orchestration support (Docker health checks, Kubernetes probes)

🧪 Test Improvements

  • Fixed 10 pre-existing test failures
  • Updated error response format assertions to match structured ErrorResponse format
  • Updated path parameter tests to use valid UUID formats
  • Result: All 47 tests now pass with 0 failures

📦 Files Changed

Modified:

  • backend/requirements.txt - Removed test dependencies
  • Dockerfile.dev - Updated to use requirements-dev.txt
  • README.md - Added test running instructions
  • backend/app/models/video.py - Added explicit index to youtube_video_id
  • backend/app/main.py - Enhanced health check endpoint
  • backend/tests/test_api_channels.py - Fixed 4 tests
  • backend/tests/test_api_videos.py - Fixed 6 tests

Created:

  • backend/requirements-dev.txt - Development dependencies file
  • backend/alembic/versions/20260119_2214_63e6b77c0da0_add_explicit_index_to_youtube_video_id.py - Database migration

🔗 Related

  • Closes #17
  • Closes #21
  • Closes #22
  • Closes #23 (via documentation in previous release)

Full Changelog: v1.6.0...v1.6.1

What's Changed

Full Changelog: v1.6.0...v1.6.1