[Maintainability] Deduplicate compose cluster setup and use the Docker Compose plugin in e2e

Chiusa
#166 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #187 di @s2x — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
66/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker-compose, github-actions, php, yaml
Ambito
ci-cd, database, devops

Direzione di ricerca

Start with docker-compose.yml at the listed service and entrypoint lines, then review .github/workflows/ci.yml and bindingtester.yml to match the repository’s Compose CLI usage. Centralize the coordinator value, use it for the cluster files, and remove or justify the duplicate tenant-mode step. Done means the compose config validates and make test and ci-ok pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

good first issue priority:low type:chore

Description

The coordinator string is repeated in every FDB service
(docker-compose.yml:7-8,25-26,43-44,65-66,87-88,111-112) and in the php
entrypoint (:224). The fdb-config service sets
FDB_CLUSTER_FILE_CONTENTS at :111-112 but its overridden entrypoint writes a
hardcoded string at :123; the php service does not even have the env var. A
coordinator or port change must be made in many places.

The e2e-tests job installs the legacy docker-compose binary
(.github/workflows/ci.yml:127-130) and uses it at :134,140,150,174,189,208,
while bindingtester.yml and the rest of the repository use the docker compose
plugin. Both work on ubuntu-latest today, but the repository maintains two
Compose CLIs for no reason.

CI also has a separate "Configure tenant mode" step
(.github/workflows/ci.yml:184-198) that duplicates what the fdb-config
entrypoint now does. It is harmless (idempotent) but masks a future regression
where the compose stack stops configuring tenant mode.

Found during #139 / PR #153 and #147 / PR #157.

Where to start

  • Use a YAML anchor or a single .env value for the coordinator string, and
    write $FDB_CLUSTER_FILE_CONTENTS to /var/fdb/fdb.cluster (and
    /app/fdb.cluster in the php service) instead of duplicating it.
  • Switch the e2e job to docker compose, drop the apt install, and keep the
    commands otherwise unchanged.
  • Remove the duplicate tenant-mode step, or keep it with a comment explaining it
    is a safety net and add an assertion that the compose stack itself configured
    tenant mode.

Definition of done

  • The coordinator string has one source of truth; changing it updates every
    service.
  • e2e-tests uses docker compose and no longer installs docker-compose.
  • The duplicate tenant-mode step is removed or explicitly justified.
  • docker compose config -q, make test and ci-ok are green.
Lingua principale
PHP
Stelle
0
Fork
0
Merge medio
8h 20m
PR unite (30g)
23

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di crazy-goat/fdb-php

Tutte le issue di crazy-goat/fdb-php

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.