-
Notifications
You must be signed in to change notification settings - Fork 36
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
Include Nextcloud update availability information #116
Conversation
This commit introduces new option and metric about nextcloud update availabilty information. A new option was introduced called `--enable-info-update` which will append the to the Nextcloud serverinfo-URL a `&skipUpdate=false`. In response, the update information is returned and provided in a new metric called `nextcloud_system_update_available`. Fixes xperimental#115
Hi @monofox . Thanks for the contribution 👍 I have seen the issue and this PR, but I had no time to look at this thoroughly yet. I had an idea to add this information when adding the I'll probably not get to this until after the weekend, but I already enabled CI for this PR and it seems some tests need to be updated for the new code. |
Thank you @xperimental . No hurry. Just let me know, if (and which) changes should be done in this way. |
@monofox I checked your tests. The problem with the test is the expected URL does not match the actual URL. Example 1: Example 2: If I'm correct, the following code (
|
Fix test suite.
Thank you @PReimers for review and giving the right hint. I was blind for it. Fixed it. Test is fine on local machine. |
Sorry, I have been busy / away the past weekends. This PR is not forgotten though. 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally managed to have a look at this (it's GPN 🎉 ). Works fine, thanks for the contribution 🙂
I have added some small comments.
@monofox Do you have time to go through the review comments or do you want me to take over the PR? |
Took a bit longer to get again free time. Thanks for your grateful comments. I've addressed them. Unfortunately, the check on the version number seems to be essential for proper indication whether an update is really available. See my comments above. |
This commit introduces new option and metric about nextcloud update availabilty information.
A new option was introduced called
--enable-info-update
which will append the to the Nextcloud serverinfo-URL a&skipUpdate=false
.In response, the update information is returned and provided in a new metric called
nextcloud_system_update_available
.Example output if update available:
Example output if update not available:
It was a bit tricky, as Nextcloud is reporting conflicting information (shortened excerpt):
Fixes #115