Merge ~whereisrysmind/charm-grafana:bugs/1875691 into charm-grafana:master
Status: | Rejected |
---|---|
Rejected by: | Haw Loeung |
Proposed branch: | ~whereisrysmind/charm-grafana:bugs/1875691 |
Merge into: | charm-grafana:master |
Diff against target: |
431 lines (+239/-19) (has conflicts) 4 files modified
actions/import-dashboard (+37/-9) lib/charms/layer/grafana.py (+130/-1) reactive/grafana.py (+71/-9) tests/unit/requirements.txt (+1/-0) Conflict in lib/charms/layer/grafana.py Conflict in reactive/grafana.py |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Xav Paice (community) | Needs Information | ||
Peter Sabaini (community) | Needs Fixing | ||
Drew Freiberger (community) | Approve | ||
BootStack Reviewers | mr tracking; do not claim | Pending | |
BootStack Reviewers | Pending | ||
BootStack Reviewers | Pending | ||
Review via email: mp+384918@code.launchpad.net |
Commit message
Standardize process for updating dashboards
Grafana dashboards were being POSTed to Grafana in two different places
in the code depending on whether they were from built-in templates, the
charm's run action, or the dashboards relation. Only for the built-in
templates were dashboards being checked against existing dashboards for
differences prior to importing them. In all cases Grafana would not
honor updates to exiting dashboards due to missing "overwrite=True"
flag.
- This commit moves the intelligent diff logic from reactive/grafana.py
to its own function in layer/grafana.py, and leverages import_dashboard
anywhere where dashboards are being imported.
- The reactive handler to import_dashboards will now iterate over all
requests from the dashboards endpoint regardless of whether they have
a response. This ensures that updates will be attempted to existing
dashboards.
- All POSTs to add or change the dashboard now use "overwrite=True" to
ensure Grafana will overwrite them.
- The import_dashboards action now returns more useful
failure information.
Partially Resolves: LP1875691
Resolves: LP1876371
This merge proposal is being monitored by mergebot. Change the status to Approved to merge.