fix(logs): further clarify update channel selection logging and logic#10058
Open
joshtrichards wants to merge 3 commits into
Open
fix(logs): further clarify update channel selection logging and logic#10058joshtrichards wants to merge 3 commits into
joshtrichards wants to merge 3 commits into
Conversation
- Further fixes misleading logs, such as when fallback is used - Improves robustness against edge cases (invalid values) - Refactors logic for improved readability and consistency Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Josh <josh.t.richards@gmail.com>
|
No Clang-Tidy warnings found so I assume my comments were addressed
|
Artifact containing the AppImage: nextcloud-appimage-pr-10058.zip Digest: To test this change/fix you can download the above artifact file, unzip it, and run it. Please make sure to quit your existing Nextcloud app and backup your data. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
A non-policy change follow-up to #10037.
TLDR: Refactors for code clarity, tweaks logging output for clarity, adds missing logging for edge cases. No outright changes in implemented policy.
Details:
Refactors the logic for determining update channels in the
ConfigFileclass. Clarifies the selection of the default and current update channels, handle branded clients more explicitly, and introduces a helper to check for the presence of a server-provided enterprise channel. Variable naming and logging have also been improved to boost clarity.Update channel selection logic improvements:
defaultUpdateChannel()to clarify the priority order: branded clients always use the default channel, otherwise, the method checks for a valid server-provided enterprise channel, then the client build's version suffix, and finally falls back to the default channel, with improved logging at each decision point. Logs each scenario more explicitly, including adding logging when server does not provide a channel.currentUpdateChannel()to validate the selected channel against the list of valid channels and ensure stability when a server subscription is present. If the current or most stable channel is invalid, it falls back to the default.Code maintainability and clarity:
hasDesktopEnterpriseChannel()to encapsulate the check for a server-provided enterprise channel, and updated usages accordingly. [1] [2]validUpdateChannels()(e.g.,channel_list→channelList,defaultChannelextracted).Checklist
AI (if applicable)