Skip to content

API reports version 1.1.0 while the package is 1.2.0: read it from package metadata #199

Backlog

Description

@OkiriGabriel

Problem

The package is version 1.2.0 (pyproject.toml), but the FastAPI app is created with a hard-coded version="1.1.0" (api/server.py). /docs, /openapi.json and anything that reads the API version (including Postman imports) report the wrong version, and this will drift again on every release.

Fix

  • Read the version once from package metadata (importlib.metadata.version("devops-ai-agent")), falling back to the pyproject.toml value when running from a source checkout, and use it for FastAPI(version=…).
  • Return it from GET /health as "version" so operators can see what's deployed.
  • Add a test that app.version matches pyproject.toml.

Good first issue: small, self-contained, with a clear test.

Files

api/server.py, tests/test_api.py

Activity

  1. added
    bug
    good first issue
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions