Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable27] fix(dav): Catch SAB sync errors during upgrade #39028

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion apps/dav/lib/Migration/Version1027Date20230504122946.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Psr\Log\LoggerInterface;
use Throwable;

class Version1027Date20230504122946 extends SimpleMigrationStep {
private SyncService $syncService;
Expand All @@ -49,6 +50,13 @@ public function __construct(SyncService $syncService, LoggerInterface $logger) {
* @param array $options
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
$this->syncService->syncInstance();
try {
$this->syncService->syncInstance();
} catch (Throwable $e) {
$this->logger->error('Could not sync system address books during update', [
'exception' => $e,
]);
$output->warning('System address book sync failed. See logs for details');
}
}
}