-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Bazarr: error when there are no series #244
Comments
**Description** This adds exportarr to the bazarr application as bazarr is supported by exportarr. This allows the user to have prometheus scrape for bazarr metrics. **⚙️ Type of change** - [X] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ]⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** Created a personal catalog which I added to TrueNAS. I then installed this app sourced from this catalog to ensure the questions + answers, and actual installation works. **📃 Notes:** Exportarr for bazarr does not work without having the API key to access bazarr set. I have added this as a question to the metrics part (see below screenshot). Is this an acceptable way of doing this, or should it be done differently? Unfortunately bazarr does not support setting the api key via environment variables, so enabling metrics for a new deployment requires 2 deployments. The first one without metrics enabled to bootstrap bazarr, and then a second one to enable metrics and set the api key. ![2023-11-20_12-26](https://github.com/truecharts/charts/assets/20680059/b9455821-6dc5-4f9e-bc8f-16461bbb394d) Also, due to a bug in exportarr (onedr0p/exportarr#244), exportarr does not work when there are no series added/sonarr is not configured. Should this be mentioned anywhere to the users of this chart? **✔️ Checklist:** - [X] ⚖️ My code follows the style guidelines of this project - [X] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ]⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [X] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: Kjeld Schouten <[email protected]> Co-authored-by: Stavros Kois <[email protected]> Co-authored-by: Kjeld Schouten <[email protected]>
while minor, easily avoided. will look at adding in a check at some point after #238 is merged |
i adjusted the tests to take a bunch of empty json payloads, kept a series list so it would try for episodes and it didnt throw any errors. i don't think this is a reproducible as it seems. Given how short the window for this to be an issue is id argue we just close (unless theres more info for reproduce?) |
There's really two situations that would lead to this state:
In the latter case, a 5XX response is the expected handling in prometheus, as this indicates to prometheus that the scrape failed (A 5XX actually flops the |
Signed-off-by: Russell Troxel <[email protected]>
When bazarr contains no series, it will still try to fetch the episodes. This results in the episodes api endpoint returning a 404, and as a result, exportarr returns a 500 to prometheus when prometheus tries to scrape the metrics. I believe this is a bug, as it would be a perfectly acceptable scenario to have no series in bazarr at all.
The culprit is in this part:
exportarr/internal/arr/collector/bazarr.go
Line 389 in e732d20
When no series are returned, the collector should not attempt to fetch the episodes (as there is nothing to fetch).
This is the error returned by exportarr /metrics when there are no series:
And from the exportarr logs:
As soon as you add sonarr to bazarr and it synced the series, it starts to work without problems.
Let me know if any other details are required.
The text was updated successfully, but these errors were encountered: