Repository navigation
feat(database): warn about failing database checks on the overview page - #1124
Merged
Merged
Conversation
The database page reports what is wrong with the database configuration, but only to an admin who knows to open it. Settings > Overview is where they already look for things that need attention, so a failing check now says so there, linking straight to the findings. Running fifty-odd rules against a live server on every Overview load is not reasonable, so the outcome of a run is recorded in app config and the setup check reads that. Opening the database page records a fresh result, which means acting on a finding clears the warning without waiting for anything; a server nobody has looked at for a day re-runs the checks once and records that instead. The link is passed as a rich object parameter rather than through SetupResult's linkToDoc: the Overview does not render linkToDoc at all -- of the twenty-two checks on a stock install, the only one showing a link builds it the way this now does. Following that link needs the page to be addressable, so the admin settings page now reads its view from the URL fragment (#status, #database, #background-jobs) and keeps it in sync with history.replaceState, which leaves the back button alone while switching between them. Signed-off-by: Frank Karlitschek <frank.karlitschek@nextcloud.com> Assisted-by: Claude Code:claude-opus-5 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
Author
This was referenced Sep 9, 2026
Member
Author
|
/backport to stable35 |
|
The backport to # Switch to the target branch and update it
git checkout stable35
git pull origin stable35
# Create the new backport branch
git checkout -b backport/1124/stable35
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick c6533b70
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/1124/stable35Error: Failed to check for changes with origin/stable35: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
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.
Why
The database page reports what is wrong with the database configuration — but only to an admin who knows to open it. Settings → Overview is where they already look for things that need attention, so a failing check now says so there and links straight to the findings.
The result on a stock Ubuntu MariaDB:
Not run on every page load
Running fifty-odd rules against a live server every time somebody opens Overview is not reasonable, so the outcome of a run is recorded in app config and the setup check reads that:
inforather than a scary warning — a database that is unreachable is a problem the other setup checks report far better than this one canTwo things worth knowing
SetupResult::linkToDocis not rendered. I passed the URL there first and it silently never appeared. Of the twenty-two setup checks on a stock install, exactly one renders a link — core's own code-integrity check — and it does it by passing ahighlightrich object indescriptionParameterswith{link}in the description. This now does the same. (DB Doctor's own setup check pastes a bare URL into the description text, which is presumably the same discovery arrived at differently.)The page had to become addressable. A link to
#databaseonly works if the page reads it, soSettingsAdmin.vuenow takes its view from the URL fragment (#status,#database,#background-jobs) and keeps it in sync withhistory.replaceState—replaceStaterather than assigning tolocation.hash, so switching pages does not fill the back button with entries inside one settings section. An unrecognised fragment falls back to Status rather than rendering nothing.Verification
End to end against a live NC 35 instance:
<a href="/nextcloud/index.php/settings/admin/serverinfo#database">Show the findings…</a>— 2 of 22 checks now render a link, where before it was 1hash="#database", the database view visible and the other two hidden#background-jobs)eslint,php-cs-fixerand psalm clean; phpunit green; committedjs//css/reproduce from a fresh build.One judgement call to check
You asked for a warning whenever a check is failing, and that is what this does — any failing check, whatever its severity. On the test instance all 12 failures are
notice-level tuning suggestions, and they produce a yellow warning. If that turns out to be noisier than you want on a typical install, the obvious refinement iswarningwhen an alert or warning fails andinfowhen only notices do. Easy to change — I did not want to quietly soften what you asked for.