Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix "folderId" propagation for "update_dashboard" #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amotl
Copy link

@amotl amotl commented Jan 5, 2021

Dear Andrew,

this fixes #82. Users reported the original flaw through grafana-toolbox/grafana-wtf#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.

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.
@amotl amotl requested a review from m0nhawk as a code owner January 5, 2021 10:06
@codecov
Copy link

codecov bot commented Jan 5, 2021

Codecov Report

❗ 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.

@pierluigilenoci
Copy link

@m0nhawk could you please take a look?

@amotl
Copy link
Author

amotl commented Mar 3, 2021

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 grafana-toolbox/grafana-wtf#5.

Thank you very much in advance.

With kind regards,
Andreas.

@amotl
Copy link
Author

amotl commented May 19, 2021

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.

@pierluigilenoci
Copy link

@m0nhawk could you please take a look?

@amotl
Copy link
Author

amotl commented Oct 1, 2021

Hi again,

everyone who is tripped by this issue can use monkey-patching to work around it. See grafana-toolbox/grafana-wtf@b77f90b and feel free to reuse it in your code.

With kind regards,
Andreas.

@amotl
Copy link
Author

amotl commented Feb 6, 2022

Hi again,

we integrated this patch into the grafana-client code base with grafana-toolbox/grafana-client#7.

With kind regards,
Andreas.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating dashboards will cause them to move to the "General" folder
2 participants