Skip to content

The preview hub throws an exception during DB upgrade#16338

Merged
Zeegaan merged 1 commit intov14/devfrom
v14/fix/preview-hub-throws-at-upgrade
May 22, 2024
Merged

The preview hub throws an exception during DB upgrade#16338
Zeegaan merged 1 commit intov14/devfrom
v14/fix/preview-hub-throws-at-upgrade

Conversation

@kjac
Copy link
Contributor

@kjac kjac commented May 22, 2024

Prerequisites

  • I have added steps to test this contribution in the description below

Description

The preview hub sometimes throws an exception when upgrading a DB:

An unhandled exception has occurred while executing the request.
Umbraco.Cms.Core.Exceptions.BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.

-> Umbraco.Cms.Core.Exceptions.BootFailedException: An error occurred while running the unattended upgrade.
The database configuration failed with the following message: One or more errors occurred. (No key is set for payload with id 0)
 Please check log file for additional information (can be found in 'LoggingSettings.Directory')

I can't entirely put my finger on when and why, but it has to do with content cache refreshing at the end of the upgrade process:

image

This PR adds a little extra logic to the preview hub, so it strictly only handles "refresh node" notifications.

Testing this PR

To test that the upgrade works, get in touch with @kjac for a test DB which will trigger the cache refresh during upgrade.

Also test that the preview hub actually triggers updates when saving content. It's likely easiest to verify this using a debugger.

@Zeegaan
Copy link
Member

Zeegaan commented May 22, 2024

Looks good, tests good 🚀

@Zeegaan Zeegaan merged commit 9ab8b81 into v14/dev May 22, 2024
@Zeegaan Zeegaan deleted the v14/fix/preview-hub-throws-at-upgrade branch May 22, 2024 10:11
@kjac kjac mentioned this pull request May 23, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants