Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix application crashing on startup #177

Merged
merged 1 commit into from
Nov 1, 2022
Merged

Conversation

feld
Copy link
Contributor

@feld feld commented Oct 31, 2022

Change description

If the folder UID changes for any reason prom_ex gets stuck in a crash loop that takes down the VM.

What problem does this solve?

Issue number: #176

None of the Grafana client functionality appears to have test coverage this time. edit: sorry, checked the wrong test modules

@akoutmos
Copy link
Owner

Thanks for the PR. Really appreciate it :). The Grafana Client functionality is validated in this test module https://github.com/akoutmos/prom_ex/blob/master/test/prom_ex/dashboard_uploader_test.exs using canned responses from Bypass. Could you add a test case in there to reproduce this?

@coveralls
Copy link

coveralls commented Oct 31, 2022

Coverage Status

Coverage increased (+0.02%) to 79.022% when pulling 4bfd0cb on feld:master into 7a4dd91 on akoutmos:master.

@feld
Copy link
Contributor Author

feld commented Oct 31, 2022

I tried to dig through the labyrinth of Grafana history and pinpoint exactly when they changed this but I can't figure out when that happened. I suspect you were testing against old Grafana API behavior.

I've changed the test that covers this scenario to mock the response code as a 409 instead of a 400 which does cause the test case to fail without the updated code.

@akoutmos
Copy link
Owner

akoutmos commented Nov 1, 2022

Thanks! Appreciate you digging into Grafana source to see when this was change. To future proof it, definitely better that the match isn't limited to one specific status code and instead logs it out 👍 .

@akoutmos akoutmos merged commit 22664c1 into akoutmos:master Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants