PMM-15028 Flatten dashboards/, move pmm-app into the ui/ monorepo - #5719
Closed
fabio-silva wants to merge 2 commits into
Closed
PMM-15028 Flatten dashboards/, move pmm-app into the ui/ monorepo#5719fabio-silva wants to merge 2 commits into
fabio-silva wants to merge 2 commits into
Conversation
Restructures developer experience around Grafana dashboards and the QAN Grafana plugin (pmm-app): - Flatten dashboards/dashboards/* up to dashboards/, so the top-level dashboards/ folder holds only JSON dashboard definitions (plus misc/ tooling and packaging metadata required by the RPM spec). - Move pmm-app from dashboards/pmm-app into ui/apps/pmm-app as a member of the existing ui/ Yarn workspaces + Turborepo monorepo, alongside pmm and pmm-compat. The plugin id/dist layout are unchanged. - Recreate the src/dashboards symlink at its new location, now pointing at the flattened top-level dashboards/ folder — plugin.json's include paths keep working unchanged. - Fix pmm-app's lint/test scripts so they're non-mutating/one-shot (required once folded into a shared workspace pipeline), matching the pmm-compat app's conventions. - Add a chokidar-based watcher (scripts/watch-dashboards.mjs) that mirrors dashboard JSON edits into the provisioned dashboards directory during local dev, so both dashboard JSON and QAN JS/TS changes show up without any manual reload command. Wired into pmm-app's `dev` script and into .devcontainer/Makefile's run-ui/build-ui targets. - Update AGENTS.md guides and CONTRIBUTING docs to match the new layout. Out of scope for this change (flagged as required follow-up, see PR description): .github/workflows/dashboards.yml and ui.yml, and build/packages/rpm/server/SPECS/percona-dashboards.spec still reference the old paths and need a dedicated PR validated with a real CI run and RPM build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NDDsxiiPmrUTUshGQQ3rpT
Follow-up to the previous commit: these two docs still pointed at the retired make run-qan-ui/build-qan-ui targets and the old dashboards/pmm-app path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NDDsxiiPmrUTUshGQQ3rpT
Contributor
Author
|
Closing in favor of #5720, opened from a renamed branch ( Generated by Claude Code |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5719 +/- ##
==========================================
+ Coverage 43.59% 44.64% +1.04%
==========================================
Files 415 418 +3
Lines 43134 43329 +195
==========================================
+ Hits 18804 19343 +539
+ Misses 22454 22076 -378
- Partials 1876 1910 +34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Ticket number: PMM-15028
Feature build: SUBMODULES-0
Summary
Developer-experience restructuring requested in PMM-15028:
dashboards/:dashboards/dashboards/*is moved up todashboards/*, so the top-leveldashboards/folder holds only JSON dashboard definitions (plusmisc/tooling andLICENSE/README.md, kept for the RPM spec's%license/%doclines — see caveats below).pmm-appinto theui/monorepo:dashboards/pmm-app→ui/apps/pmm-app, now a Yarn workspace + Turborepo member alongsidepmmandpmm-compat. The plugin id (pmm-app) and its dist layout are unchanged, so no downstream Grafana paths change.src/dashboardsis recreated at its new location, retargeted to the flattened top-leveldashboards/folder.plugin.json's 68 dashboardincludespaths resolve unchanged — verified against the new symlink target.ui/apps/pmm-app/scripts/watch-dashboards.mjs) that mirrors dashboard JSON edits into the provisioned dashboards directory during local dev; wired intopmm-app'sdevscript (concurrentlyalongside the existing webpack watcher) and into.devcontainer/Makefile'srun-ui/build-uitargets. QAN JS/TS changes already auto-reload via the existing webpack + livereload setup, just relocated.pmm-app'slint/testscripts to be non-mutating/one-shot (previouslylintraneslint --fixandtestranjest --watch), matchingpmm-compat's conventions — required for these to behave correctly once folded into the shared workspace pipeline.AGENTS.mdguides (root,dashboards/,ui/,ui/apps/pmm-app/) andCONTRIBUTING.mddocs to match the new layout.Explicitly out of scope / required follow-up
This PR intentionally does not touch CI workflows or packaging, since those need a real CI run / RPM build to validate safely (not feasible in the sandbox this draft was authored in):
.github/workflows/dashboards.ymland.github/workflows/ui.ymlstill reference the old paths (dashboards/dashboards/*.json,dashboards/pmm-app/...) and need updating — thedashboards.ymlbuild/test jobs become redundant oncepmm-appis aui/workspace member, and the "verify plugin.json paths" check should move toui.yml.build/packages/rpm/server/SPECS/percona-dashboards.spec(make -C dashboards release,cp -a ./dashboards/pmm-app/dist ...) hard-depends on the pre-move paths and needs updating to buildui/apps/pmm-appvia turbo — this is the highest-risk gap, since no GitHub Actions check builds RPMs, so a missed update wouldn't be caught by CI..github/CODEOWNERSshould get an explicit/ui/apps/pmm-app/entry so review routing for QAN isn't silently absorbed by the generic/ui/rule.This PR should not be merged to a release-affecting branch until that follow-up lands. Opening as a draft for that reason, and to get early feedback on the restructuring approach itself.
Verification done
readlink -f ui/apps/pmm-app/src/dashboardsresolves to the repo-rootdashboards/folder.Verified all 68
plugin.jsoninclude paths resolve through the new symlink (no missing files).Attempted
yarn installatui/to reconcilepmm-app's dependencies into the shared workspace lockfile — blocked in this sandbox by an organization egress policy denyingcodeload.github.com(a pre-existing transitive git dependency of@grafana/ui, already present inpmm-app's own lockfile before this change, unrelated to the restructuring). Needs to be run in CI or a real dev environment before merge to confirm dependency hoisting resolves cleanly (pmm-app currently pins olderreact/typescript/@grafana/eslint-configversions than the rest ofui/).Grepped the repo for stale
dashboards/dashboards/ordashboards/pmm-app/references outside the explicitly deferred CI/RPM files — none found.API Docs updated — N/A, no API changes.
Links to related work items: PMM-15028
Generated by Claude Code