mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-03-04 00:01:12 -05:00
Request for option to parse schema version. #4952
Labels
No labels
P1: Critical
P2: High
P3: Medium
P4: Low
UI
bug
cannot reproduce
compatibility
dependencies
docker
documentation
duplicate
enhancement
enhancement
external libs
feature request
good first issue
help wanted
infrastructure
invalid
localization
needs investigation
performance
potential-duplicate
question
recurrent
research
snap
waiting for data
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AdGuardHome#4952
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jumpsmm7 on GitHub (Dec 15, 2023).
Originally assigned to: @ainar-g on GitHub.
Prerequisites
I have checked the Wiki and Discussions and found no answer
I have searched other issues and found no duplicates
I want to request a feature or enhancement and not ask a question
The problem
As the installation script writer for Asuswrt-Merlin Addon AdGuardHome installer which installs AdGuardHome in a method for user friendly access, it has became apparent that there is no easy way of parsing the latest schema version. Currently the only method I have found is:
curl -sL "https://api.github.com/repos/AdguardTeam/AdGuardHome/releases" | grep -m1 -oE 'schema.*to[[:space:]][0-9]{1,2}' | awk '{ print $NF }'.and
Proposed solution
I want to request a feature that allows for the latest schema version to be read from the AdGuardHome binary, similar to how the AdGuardHome binary version can be read.
e.g.
AdGuardHome --versionI know this sounds trivial, but I think such a feature could be useful in a practical since for developers who incorporate AdGuardHome as addons.
Alternatives considered and additional information
Make it easier to parse the latest schema version from the upstream.
@ainar-g commented on GitHub (Dec 15, 2023):
In general there shouldn't be a need to parse the version. What is the feature you're trying to support through that?
@jumpsmm7 commented on GitHub (Dec 15, 2023):
Maintaining schema accuracy across upgrades.
I have noticed on a few occasions that this number not being accurate as give errors in adguardhome when major syntax changes were introduced to adguardhome. For example, when the way the bind port was handled changed. It introduced issues for people who had not been monitoring the changes very well.
@ainar-g commented on GitHub (Dec 15, 2023):
My question was more about why you're making changes to the configuration file directly instead of using the documented API? Unattended changes directly to the configuration file probably won't ever be safe.
@jumpsmm7 commented on GitHub (Dec 15, 2023):
The changes aren't unattended. Typically the user has to physically run the upgrade process just to get the next version. That doesnt guarantee they are fully paying attention to this minor detail when doing such. I have just had issues in the past with this being a minor annoyance for users who do not actually pay attention to changing this number when necessary.
@ainar-g commented on GitHub (Dec 15, 2023):
I guess I see your point, and adding it shouldn't be hard. But just to be clear, using the API is the preferred option, when possible.
Related: #4067.
@ainar-g commented on GitHub (Dec 15, 2023):
@jumpsmm7, see the latest Edge release. We've added the schema version to the output of
-v --version.@jumpsmm7 commented on GitHub (Dec 16, 2023):
That is actually great! @ainar-g , I appreciate you taking the extra time on this. Below is the output:
and easily able to be read:
AdGuardHome -v --version | awk '/Schema version:/{ print $NF }'27I hope at some point it is incorporated in the documentation. While this is not really a critical feature for those who follow the changelogs and understand what's going on behind the scenes, it is easy in our day to day lives to not pay attention to something so significant for the actual functionality of AdGuardHome. You have taken one extra step to help your user base keep track of things. As always, the efforts taken by the AGH team will always be appreciated. Consider this a quick win.