Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix(upgrade): skip disabled apps in post-upgrade schema check - #66813

Merged
szaimen merged 1 commit into
masterfrom
fix/schema-check-skip-disabled-apps
Nov 19, 2026
Merged

szaimen merged 1 commit into
masterfrom
fix/schema-check-skip-disabled-apps

Conversation

@Antreesy

Copy link
Copy Markdown
Contributor

Summary

  • The post-upgrade check now skips disabled apps.
  • occ db:schema:check still replays them. in case of Fatal error, it doesn't break the instance
2026-11-19_14h24_18 2026-11-19_14h24_42

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

- The post-upgrade check now skips disabled apps.
- occ db:schema:check still replays them. in case of Fatal error, it doesn't break the instance

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy added this to the Nextcloud 36 milestone Nov 19, 2026
@Antreesy
Antreesy requested a review from szaimen November 19, 2026 13:26
@Antreesy Antreesy self-assigned this Nov 19, 2026
@Antreesy
Antreesy requested a review from a team as a code owner November 19, 2026 13:26
@Antreesy Antreesy added the bug label Nov 19, 2026
@Antreesy
Antreesy requested review from CarlSchwan and leftybournes and removed request for a team November 19, 2026 13:26
@Antreesy Antreesy added 3. to review Waiting for reviews feature: database Database related DB labels Nov 19, 2026
@Antreesy

Copy link
Copy Markdown
Contributor Author

/backport to stable35

@come-nc

come-nc commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

I would say this is not the right fix, it will always report tables from disabled apps as missing on upgrade, no?

I would instead catch any Throwable in the schema check implementation.

@come-nc

come-nc commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Hum but this was done in #64696 already 🤔
Where is it breaking then?

@Antreesy

Copy link
Copy Markdown
Contributor Author

it will always report tables from disabled apps as missing on upgrade, no?

Wouldn't be reported here. If migration from disabled apps never run, table is considered unexpected and from unknown app. Those are already non-blocking and omitted in non-verbose check (which postUpgrade does).
More importantly is that on real DB, disabled app also doesn't run migrations, when updated - so it won't match anyway

I would instead catch any Throwable in the schema check implementation.

See Simon's issue, it was reported for fatal error, not throwable

@szaimen szaimen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM but didnt test. Thanks a lot for fixing this so fast! :)

@come-nc

come-nc commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Indeed, fatal error, not catchable, that’s sad.
So I do not have a better solution than what you did.

@szaimen
szaimen merged commit 04213dd into master Nov 19, 2026
155 of 167 checks passed
@szaimen
szaimen deleted the fix/schema-check-skip-disabled-apps branch November 19, 2026 14:05

@joshtrichards joshtrichards left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess this a hairy problem because disabled apps are in this weird state where their migrations don't normally run anyhow...

The other issue being that there are really two "formerly active app" states: disabled and uninstalled. Both (generally) leave tables around.

Makes we want to create a setupcheck that says "You have too many disabled apps; uninstall ones you're no longer using..." though I know that's not really the root cause here necessarily. ;-)

Related: #5539

@Antreesy

Antreesy commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Makes we want to create a setupcheck that says "You have too many disabled apps; uninstall ones you're no longer using..." though I know that's not really the root cause here necessarily. ;-)

There was a PR recently flying around with occ app:purge, which should be covering it, in my opinion. It was also putting a hint in schema:check report, which I assume goes to the area of your suggestion)

@bartclone

Copy link
Copy Markdown

This does not resolve the bug. App still caused Nextcloud AIO v15.1.1 to break when updating to 35.0.3.

(See bug report in File Archive)

@Antreesy

Copy link
Copy Markdown
Contributor Author

This does not resolve the bug. App still caused Nextcloud AIO v15.1.1 to break when updating to 35.0.3.

Have you checked if the fix was released in a stable version since it was merged 3 days ago?

@bartclone

Copy link
Copy Markdown

This does not resolve the bug. App still caused Nextcloud AIO v15.1.1 to break when updating to 35.0.3.

Have you checked if the fix was released in a stable version since it was merged 3 days ago?

I entered in the bug 3d ago and removed the app as I cannot afford the outages in this way.
In which Nextcloud release/tag was this fixed?

@szaimen

szaimen commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

This does not resolve the bug. App still caused Nextcloud AIO v15.1.1 to break when updating to 35.0.3.

Have you checked if the fix was released in a stable version since it was merged 3 days ago?

I entered in the bug 3d ago and removed the app as I cannot afford the outages in this way. In which Nextcloud release/tag was this fixed?

v35.0.4 which is not released nor included in AIO yet.

@bartclone

Copy link
Copy Markdown

This does not resolve the bug. App still caused Nextcloud AIO v15.1.1 to break when updating to 35.0.3.

Have you checked if the fix was released in a stable version since it was merged 3 days ago?

I entered in the bug 3d ago and removed the app as I cannot afford the outages in this way. In which Nextcloud release/tag was this fixed?

v35.0.4 which is not released nor included in AIO yet.

Then I need to correct myself as I cannot say anything sensible about the change.

Now, I am by no means a Nextcloud expert - my professional life is in QA mainly.
From that viewpoint, and reading the changes, I think however the current unittests will not solve this or alike issues in the long run.
And a (minor) update should also not really bring down the AIO main nextcloud container.

Maybe some mechanism could be arranged that takes care that all apps are - individually? - tested/updated in a sandbox first, before (re)activated?
But TBH, I do not know enough how NC apps are (QA-)tested before release.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: occ upgrade dies with an uncatchable "Trait not found" fatal in SchemaChecker when a disabled app's migration uses an app trait

6 participants