Repository navigation
Persist Grafana data in Docker Compose - #40
Merged
devin-ai-integration[bot] merged 4 commits intoNov 23, 2026
Merged
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Compose never mounted Grafana's
/var/lib/grafanaon a volume, so an upgrade ordocker compose up --force-recreatedeleted user-made dashboards.compose/docker-compose.yaml: named volumegrafana-datamounted at/var/lib/grafana. No image pins changed.install.sh: on upgrade, if a legacy Grafana container (no volume) exists, copy its/var/lib/grafanainto the new volume before Compose replaces it. If the copy fails, the old container stays untouched. A retry takes a fresh copy, so edits made after a failed upgrade are kept. A partial copy (for example, disk full) is cleared and redone. Mount detection reads/proc/self/mountinfo, so it also works on Docker VFS.docs/setup.md: run the installer before removing or recreating a legacy Grafana container.tests/test_install.py: covers the volume, migration order, stopped containers, repeat installs, copy failure, retry refresh, partial-copy recovery and same-filesystem mounts.QA: installed the
v0.3.1Compose recipe, created a dashboard through the Grafana API, upgraded throughinstall.shwith a locally packaged bundle, then force-recreated Grafana. The dashboard survived both steps on Grafana11.4.0and on13.3.1(PR #36), and Grafana (uid 472) could write to the volume. Without the fix, recreating Grafana on v0.3.1 returned 404 for the dashboard. The Python suite (95 tests), browser tests, Helm and CloudFormation lint, and the launcher build all pass.Details
Link to Devin session: https://app.devin.ai/sessions/ccff2c3bd48e453abc54bf8746d71a6f
Open in Devin Desktop: https://app.devin.ai/desktop/session/ccff2c3bd48e453abc54bf8746d71a6f?variant=devin
Requested by: @moe-berri
🟢 Devin Review found nothing to fix · View findings · Follow Devin's work