grafana_api icon indicating copy to clipboard operation
grafana_api copied to clipboard

Fix "folderId" propagation for "update_dashboard"

Open amotl opened this issue 3 years ago • 7 comments

Dear Andrew,

this fixes #82. Users reported the original flaw through https://github.com/panodata/grafana-wtf/issues/5.

When the folderId is not available within the dashboard payload, populate it from the nested meta object, if given. On the other hand, if it is given within the dashboard payload, it should take precedence.

I have added additional tests to verify this situation.

With kind regards, Andreas.

amotl avatar Jan 05 '21 10:01 amotl

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@d2e1520). Click here to learn what that means. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #85   +/-   ##
=======================================
  Coverage        ?   85.95%           
=======================================
  Files           ?       16           
  Lines           ?      641           
  Branches        ?        0           
=======================================
  Hits            ?      551           
  Misses          ?       90           
  Partials        ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d2e1520...b07063a. Read the comment docs.

codecov[bot] avatar Jan 05 '21 10:01 codecov[bot]

@m0nhawk could you please take a look?

pierluigilenoci avatar Jan 26 '21 13:01 pierluigilenoci

Dear Andrew,

can I humbly ask you about the chore to look at this patch and eventually release a new version of grafana_api with it? We would like to also release a new version of grafana-wtf using your fine library, see https://github.com/panodata/grafana-wtf/issues/5.

Thank you very much in advance.

With kind regards, Andreas.

amotl avatar Mar 03 '21 19:03 amotl

Hi Andrew,

I feel a bit bad for bugging you about his once more. Do you see any chance to integrate this patch and issue a new release? It would really be nice in order to be able to release a new version of grafana-wtf.

With kind regards, Andreas.

amotl avatar May 19 '21 16:05 amotl

@m0nhawk could you please take a look?

pierluigilenoci avatar May 19 '21 17:05 pierluigilenoci

Hi again,

everyone who is tripped by this issue can use monkey-patching to work around it. See https://github.com/panodata/grafana-wtf/commit/b77f90b and feel free to reuse it in your code.

With kind regards, Andreas.

amotl avatar Oct 01 '21 14:10 amotl

Hi again,

we integrated this patch into the grafana-client code base with https://github.com/panodata/grafana-client/pull/7.

With kind regards, Andreas.

amotl avatar Feb 06 '22 22:02 amotl