Skip to content

[Initiative] Move Git Smart HTTP Server into gitstore-api (port 5000) #103

@juliuskrah

Description

@juliuskrah

Summary

Move the Git smart HTTP server out of gitstore-git-service and into gitstore-api, exposing it on a dedicated port (5000) that is separate from the GraphQL/REST API routes on port 4000. gitstore-git-service retains only its gRPC interface and storage responsibilities. Only the transport is implemented in gitstore-api, the git operations will be delegated via gRPC to gitstore-git-service (see #109).

This supersedes #63 (which proposed retaining smart HTTP inside git-service on port 5000) and requires #65 (gRPC Git Service) to be completed first so the smart HTTP layer can delegate operations to git-service via gRPC.

Implementation Notes

After #39 then the endpoint should support:

  • GET /{namespace}/{repo} (non-git) Makes sense for the UI (Storefront/Admin)
  • GET /{namespace}/{repo}.git redirects to /{namespace}/{repo} (non-git) Makes sense for the UI (Storefront/Admin)
  • GET /{namespace}/{repo}/info/refs?service=git-upload-pack
  • GET /{namespace}/{repo}.git/info/refs?service=git-upload-pack
  • GET /{namespace}/{repo}/info/refs?service=git-receive-pack
  • GET /{namespace}/{repo}.git/info/refs?service=git-receive-pack
  • POST /{namespace}/{repo}/git-upload-pack
  • POST /{namespace}/{repo}.git/git-upload-pack
  • POST /{namespace}/{repo}/git-receive-pack
  • POST /{namespace}/{repo}.git/git-receive-pack

#100 and #70 provides the needed functionality to lookup repository identity and storage path from the database for downstream calls to git-service over RPC.

Scope

In Scope

  • Implement Git smart HTTP protocol (git-upload-pack, git-receive-pack, info/refs) inside gitstore-api, running on port 5000.
  • Delegate all repository operations (pack generation, object resolution, ref listing) to gitstore-git-service via the gRPC layer introduced in [Initiative] Decouple API from Git Storage via gRPC Git Service #65.
  • Expose Git smart HTTP routing separate from the existing API router on port 4000.
  • Remove or gate the smart HTTP handler currently living in gitstore-git-service.
  • Update Compose, environment variable defaults, and docs to reflect the new service topology (git operations via http://api:5000/<org>/<repo>).
  • Update healthchecks for port 5000.
  • Verify git clone, git fetch, and git push over HTTP on port 5000.

Out of Scope

Acceptance Criteria

  • git clone http://localhost:5000/<org>/<repo>[.git] succeeds end-to-end.
  • git push and git fetch over HTTP on port 5000 work correctly.
  • gitstore-git-service no longer exposes a standalone smart HTTP server.
  • gitstore-api listens on port 4000 (GraphQL) and port 5000 (Git smart HTTP) simultaneously.
  • No git:// scheme remains in Compose files, scripts, or documentation.
  • Healthchecks pass for both ports.
  • CI includes integration tests for clone, fetch, and push over HTTP smart protocol.

Dependencies

Tracking

  • Milestone: TBD

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Task.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions