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

Fix "folderId" propagation for "update_dashboard"#85

Open
amotl wants to merge 1 commit into
m0nhawk:mainfrom
panodata:fix-update-dashboard
Open

Fix "folderId" propagation for "update_dashboard"#85
amotl wants to merge 1 commit into
m0nhawk:mainfrom
panodata:fix-update-dashboard

Conversation

@amotl

@amotl amotl commented Jan 5, 2021

Copy link
Copy Markdown

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

codecov Bot commented Jan 5, 2021

Copy link
Copy Markdown

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
Copy Markdown

@m0nhawk could you please take a look?

@amotl

amotl commented Mar 3, 2021

Copy link
Copy Markdown
Author

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

amotl commented May 19, 2021

Copy link
Copy Markdown
Author

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
Copy Markdown

@m0nhawk could you please take a look?

@amotl

amotl commented Oct 1, 2021

Copy link
Copy Markdown
Author

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

amotl commented Feb 6, 2022

Copy link
Copy Markdown
Author

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.

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