[Feature][Grafana][config-ui] Gaps when running DevLake with a managed PostgreSQL and an external Grafana
Maintainer antworten meist innerhalb von 3 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 42/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- docker-compose, nginx, postgresql, shell, typescript, vite
- Bereich
- devops, frontend, observability
Rechercherichtung
This is a tracking issue for several separate gaps, so pick one item and work only on it. For the Grafana side, start in grafana/scripts/entrypoint.sh, where DATABASE_SSL_MODE and the hard-coded admin user are read, and check docker-compose-dev-postgresql.yml and env.example for the missing pass-through. For the config-ui side, start in nginx.conf for the external-Grafana redirect and in config-ui/routes/onboard/step-4.tsx and components/card.tsx for the Check Dashboard button. Done means the chosen item works as described with defaults unchanged.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Search before asking
- I had searched in the issues and found no similar feature requirement.
Use case
We run DevLake in Kubernetes with a managed PostgreSQL (TLS with a
corporate CA, sslmode=verify-full) and want to use a managed / external
Grafana. Data sources are GitHub, GitLab, Jira and SonarQube.
The backend handles this setup fine (DB_URL is passed unchanged to pgx, so
sslmode=verify-full&sslrootcert=… works). The gaps are in the dashboard image
(grafana/scripts/entrypoint.sh) and in the config-ui. This issue collects
them in one place, so that the small PRs below can refer to it.
Description
Verified on main @ 4ad2f66df, PostgreSQL mode only. We do not run MySQL,
so MySQL paths are left unchanged and untested.
A. Dashboard image ↔ managed PostgreSQL over TLS (one small, additive PR planned)
-
DATABASE_SSL_MODEis read byentrypoint.sh(defaultdisable), but
docker-compose-dev-postgresql.yml/env.exampledo not pass it
through (follow-up to #9207). Proposal:GRAFANA_DATABASE_SSL_MODE
→DATABASE_SSL_MODE, defaultdisable. - The PostgreSQL datasource payload has no
sslRootCertFile/
sslCertFile/sslKeyFile, soverify-ca/verify-fullagainst a
private CA fails. Proposal: optionalDATABASE_SSL_ROOT_CERT
(+_CERT/_KEY) →jsonData.tlsConfigurationMethod: "file-path". - The API calls use a hard-coded
admin:user. Renaming the admin via
GF_SECURITY_ADMIN_USERsilently breaks datasource creation, because
the POST status is not checked. Proposal:${GF_SECURITY_ADMIN_USER:-admin}
plus a status check with a log message. - The entrypoint deletes all datasources on every start ("clean
slate"). This is destructive when the Grafana state is shared (GF_DATABASE_*,
several replicas, manually added datasources). Proposal for the PR: an
opt-outDATASOURCE_CLEAN_SLATE=false. The default staystrue, so
the current behaviour is unchanged.
B. config-ui ↔ Grafana links (one small bug-fix PR planned)
- With
USE_EXTERNAL_GRAFANA=true,nginx.confreturns
302 "${GRAFANA_ENDPOINT}"and drops the path and query, so every
/grafana/d/<uid>/…deep link lands on the Grafana home page. Proposal:
append the remaining path +$is_args$args. - Onboarding "Check Dashboard" (GitHub / GitLab,
routes/onboard/step-4.tsx,components/card.tsx) calls
window.open(import.meta.env.DEVLAKE_DASHBOARD_URL_*). The released
image is built without a.envand the code has no fallback, so the
button opens an empty tab. The example values inconfig-ui/env.example
point to the MySQL UIDs (KXWvOFQnz,msSjEq97z), while the PostgreSQL
dashboards use…-pg. Proposal: a DB-independent fallback (e.g.
/grafana/dashboards?query=GitHub), or hide the button when the
variable is empty. Also document the PostgreSQL UIDs.
C. Open points, no PR planned for now (feedback welcome)
- Clean slate, alternatives to the opt-out: (i) delete only the DevLake
datasource (UIDdevlake-postgres-api/devlake-mysql-api), or
(iii) switch to file provisioning with env interpolation instead of the
API. - Root-level dashboards
ClaudeCodeAdoption*.json,Incidentio.json,
Linear.jsonandRootly.jsonreference the MySQL datasource
devlake-mysql-api, but are also shipped in PostgreSQL mode, where they
show datasource errors. Moving them todashboards/mysql/(plus
PostgreSQL variants), and adding a dashboard-check rule against files
directly underdashboards/, would fix this. -
DEVLAKE_GRAFANA_PATH/DEVLAKE_DASHBOARD_URL_*are build-time only
(ViteenvPrefix). With relative/grafana/…links and the redirect
fix from B this is fine for us. Runtime configuration (e.g. an
env-config.jsgenerated bynginx.sh) would only matter for setups
with different dashboard UIDs or a non-default Grafana org. Noted here
for completeness.
Related issues
- #5009 — config-ui image support for optional/external Grafana (introduced
USE_EXTERNAL_GRAFANA) - #9207 — Grafana against an external database via Compose (
GRAFANA_DATABASE_*) - #4286 — deploying DevLake in a production setting
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
I will open the PRs for A and B one after another and link them here. They
are small and additive, and the defaults are unchanged.
Code of Conduct
- I agree to follow this project's Code of Conduct
- Vorherrschende Sprache
- Go
- Sterne
- 3.2k
- Forks
- 819
- Ø Merge
- 2 T. 21 Std.
- Gemergte PRs (30 T.)
- 46
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus apache/devlake
-
[Bug][e2e] Several plugin e2e tests fail on a fresh database because they depend on tables created by other testsEvtl. vergeben @chenwei791129 hat das vor 1 Tag übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 55/100
Maintainer antworten meist innerhalb von 3 Tagen
Ähnliche Issues
-
perf(translator): Claude→Responses stream re-validates the whole request body on every SSE chunkOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
router-for-me/CLIProxyAPI#6665 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
superplanehq/superplane#8557 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
copilot-api domain:platform go
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
docs: clarify gh api -f vs -F and @-file expansion in the gh skillEvtl. vergeben @MatiasOlivera hat das heute übernommen. Offenenhancement
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 62/100
cli/cli#14701 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag