nextcloud / nextcloud/updater

Refuse to run the Updater if the upgrade cycle hasn't finished

Open
#567 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug feature: upgrade
Dominant language
PHP
Stars
51
Forks
40
Avg merge
2d 19h
Merged PRs (30d)
3

Description

In the web UI, when the "Go back to your Nextcloud instance to finish the update" comes up (which is supposed to be used to visit the instance and run the db migrations/app upgrades), it appears to be possible to merely hit reload and start the next update cycle.

This shouldn't be permitted.

Also, it's what turned up #566 in the wild (I think). Because the repair step (for the stray .step file we're leaving around) is added during the db migrations/etc.

This leaves the instance stuck in step 12 until manual intervention is taken.

This is currently possible because the Updater doesn't look at the database to check what version is currently in place, but merely looks at the version.php

Since we can't have the Updater connect to the db, we need a reliable mechanism for it to detect whether the upgrade cycle was fully completed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the updater flow behind the web UI message about returning to the Nextcloud instance, then inspect how version.php, database migrations, and the stray .step file represent upgrade progress. Define a reliable completion check and verify that reloading cannot begin another cycle before migrations and app upgrades finish, including the step-12 failure described here.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
release
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.