fix(upgrade): handle missing status after restart (#11350)

This commit is contained in:
Andras Bacsai 2026-08-18 10:41:45 +02:00 committed by GitHub
parent a3e78a3677
commit c9d5c4c41f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 0 deletions

View file

@ -295,6 +295,16 @@ class="flex flex-wrap items-center justify-end gap-2 border-t border-neutral-200
}
throw error;
}
if (!data) {
if (this.instanceWentDown) {
// The upgraded instance can no longer return data for the old Livewire component.
// A healthy response after observed downtime confirms that the restart completed.
this.showSuccess();
} else {
this.currentStatus = this.getReviveStatusMessage(elapsedMinutes, this.healthCheckAttempts);
}
return;
}
if (data.status === 'complete') {
this.showSuccess();
} else if (data.status === 'error') {

View file

@ -149,6 +149,16 @@
->toContain('return;');
});
it('finishes when the post-restart Livewire status response is undefined', function () {
$upgradeView = file_get_contents(__DIR__.'/../../resources/views/livewire/upgrade.blade.php');
expect($upgradeView)
->toContain('if (!data) {')
->toContain('if (this.instanceWentDown) {')
->toContain('this.showSuccess();')
->toContain('return;');
});
it('tells users to reload manually if the automatic reload does not happen', function () {
$upgradeView = file_get_contents(__DIR__.'/../../resources/views/livewire/upgrade.blade.php');