Skip to content

fix(logs): further clarify update channel selection logging and logic#10058

Open
joshtrichards wants to merge 3 commits into
masterfrom
jtr/logs-update-channel-selection
Open

fix(logs): further clarify update channel selection logging and logic#10058
joshtrichards wants to merge 3 commits into
masterfrom
jtr/logs-update-channel-selection

Conversation

@joshtrichards
Copy link
Copy Markdown
Member

@joshtrichards joshtrichards commented May 19, 2026

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 ConfigFile class. 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:

  • Refactored 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.
  • Updated 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:

  • Introduced hasDesktopEnterpriseChannel() to encapsulate the check for a server-provided enterprise channel, and updated usages accordingly. [1] [2]
  • Improved variable naming for consistency and readability in validUpdateChannels() (e.g., channel_listchannelList, defaultChannel extracted).

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI [PR summary partially]

- 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>
@joshtrichards joshtrichards added feature: 📥 install and update papercut Annoying recurring UX issue with possibly simple fix. labels May 19, 2026
@joshtrichards joshtrichards changed the title Jtr/logs update channel selection fix(logs): further clarify update channel selection logging and logic May 19, 2026
@joshtrichards joshtrichards marked this pull request as ready for review May 19, 2026 16:38
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

Comment thread src/libsync/configfile.h Outdated
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
77.3% Coverage on New Code (required ≥ 80%)
63 New Code Smells (required ≤ 0)
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@github-actions github-actions Bot dismissed their stale review May 20, 2026 17:46

No Clang-Tidy warnings found so I assume my comments were addressed

@github-actions
Copy link
Copy Markdown

Artifact containing the AppImage: nextcloud-appimage-pr-10058.zip

Digest: sha256:26a05f37ee32fe6664d10e53d4ee95eba3110934a8e5192b69cb0a0185a0b1a6

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review feature: 📥 install and update papercut Annoying recurring UX issue with possibly simple fix.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant