{
  "id": 2599149,
  "title": "Fixing a pgvector CI mismatch in a FastAPI RAG backend",
  "url": "https://urgent.news/2026/08/22/fixing-a-pgvector-ci-mismatch-in-a-fastapi-rag-backend",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-22T15:33:05.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/sxt12356/fixing-a-pgvector-ci-mismatch-in-a-fastapi-rag-backend-3gm2"
  },
  "original_language": "en",
  "account": "The GitHub Actions workflow for a FastAPI RAG backend named mini-agent encountered a failure during testing on August 12, 2026. The test environment lacked the pgvector extension required by the application due to the use of the general-purpose postgres:17-alpine service image. The failure was traced back to the database initialization step, which did not provision the necessary extension.\n\nTo resolve the issue, the CI workflow was updated to use the pgvector/pgvector:0.8.6-pg17 image alongside the postgres container. The change was minimal, adding only one line to the services section of the workflow. The PostgreSQL image version, credentials, port mapping, health check, application environment, dependency installation, and test command remained unchanged. This approach ensured the CI environment matched the application's database requirements.\n\nThe patch was straightforward, with no alterations to the application's core functionality. It restored the full CI test run, maintaining compatibility between the PostgreSQL service and the pgvector-backed model. The change did not affect PostgreSQL's major version, credentials, port mapping, health check, application environment, dependency installation, or test command.\n\nImplementing this fix restored the CI's reliability, ensuring tests accurately reflect the application's behavior in a production-like environment. By treating database extensions as explicit runtime dependencies, the approach prevents issues arising from missing or incompatible extensions during CI runs. This method aligns with best practices, promoting a robust integration testing environment that accurately simulates the application's runtime dependencies.",
  "summary": "This is a submission for DEV's Summer Bug Smash: Clear the Lineup , powered by Sentry . Project Overview mini-agent is a public FastAPI backend for an AI support-agent demo. Its test suite covers API behavior, authentication, rate limiting, approval flows, and PostgreSQL/pgvector-backed retrieval. The GitHub Actions workflow starts PostgreSQL and Redis service containers before running the Python…",
  "key_points": [
    "GitHub Actions workflow failed on August 12, 2026 due to missing pgvector extension",
    "CI updated to use pgvector/pgvector:0.8.6-pg17 image alongside postgres container",
    "Fix restored CI reliability by aligning database requirements with application"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}