Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c693e54
feat: delay step transition until all media is processed
jozsefdamokos Oct 8, 2025
aaf63e8
update test
jozsefdamokos Oct 9, 2025
41e9279
add test
jozsefdamokos Oct 9, 2025
8313a31
update test
jozsefdamokos Oct 9, 2025
4266984
phpstan
jozsefdamokos Oct 9, 2025
fa367a7
remove unnecessary snippets
jozsefdamokos Oct 15, 2025
ab4e772
Merge branch 'trunk' into feat/media-processing-v4
jozsefdamokos Oct 15, 2025
0c619bf
merge media processing message handlers
jozsefdamokos Oct 27, 2025
84207d1
fix acceptance test
jozsefdamokos Oct 28, 2025
f4db277
remove media check from test
jozsefdamokos Oct 28, 2025
d15b06b
Merge branch 'trunk' into feat/media-processing-v4
jozsefdamokos Oct 28, 2025
1b06549
remove test file
jozsefdamokos Oct 28, 2025
68ec8ae
fix test
jozsefdamokos Oct 28, 2025
639e79f
fix acceptance test
jozsefdamokos Oct 29, 2025
ecf3be2
try to pass test in ci
jozsefdamokos Oct 29, 2025
e37c827
phpstan
jozsefdamokos Oct 30, 2025
b4cbc87
more phpstan
jozsefdamokos Oct 30, 2025
c4ad550
add tests
jozsefdamokos Oct 31, 2025
3441e2d
ecs-fix
jozsefdamokos Oct 31, 2025
1c57608
phpstan
jozsefdamokos Oct 31, 2025
809f818
more phpstan
jozsefdamokos Oct 31, 2025
dc4e861
more phpstan
jozsefdamokos Oct 31, 2025
8917bef
last phpstan
jozsefdamokos Oct 31, 2025
dc06a09
revert test change
jozsefdamokos Oct 31, 2025
b0d2f21
change acceptance test after API changes
jozsefdamokos Nov 3, 2025
17155df
remove sleep
jozsefdamokos Nov 3, 2025
66e8f7b
remove unused file + increase batch size
jozsefdamokos Nov 10, 2025
6b1e518
remove leftover argument
jozsefdamokos Nov 10, 2025
ce998d1
fix acceptance test
jozsefdamokos Nov 10, 2025
7a373a1
fix phpstan
jozsefdamokos Nov 10, 2025
40f686e
cs fixer
jozsefdamokos Nov 10, 2025
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
20 changes: 4 additions & 16 deletions src/DependencyInjection/migration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,6 @@
<argument type="service" id="swag_migration_mapping.repository"/>
</service>

<service id="SwagMigrationAssistant\Migration\Service\MediaFileProcessorService" public="true">
<argument type="service" id="messenger.default_bus"/>
<argument type="service" id="SwagMigrationAssistant\Migration\DataSelection\DataSet\DataSetRegistry"/>
<argument type="service" id="SwagMigrationAssistant\Migration\Logging\LoggingService"/>
<argument type="service" id="Doctrine\DBAL\Connection"/>
</service>

<service id="SwagMigrationAssistant\Migration\Media\MediaFileProcessorRegistry">
<argument type="tagged_iterator" tag="shopware.migration.media_file_processor"/>
</service>
Expand Down Expand Up @@ -318,14 +311,6 @@
<argument type="service" id="swag_migration_connection.repository"/>
</service>

<service id="SwagMigrationAssistant\Migration\MessageQueue\Handler\ProcessMediaHandler">
<argument type="service" id="swag_migration_run.repository"/>
<argument type="service" id="SwagMigrationAssistant\Migration\Media\MediaFileProcessorRegistry"/>
<argument type="service" id="SwagMigrationAssistant\Migration\Logging\LoggingService"/>
<argument type="service" id="SwagMigrationAssistant\Migration\MigrationContextFactory"/>
<tag name="messenger.message_handler"/>
</service>

<service id="SwagMigrationAssistant\Migration\MessageQueue\Handler\CleanupMigrationHandler">
<argument type="service" id="Doctrine\DBAL\Connection"/>
<argument type="service" id="messenger.default_bus"/>
Expand Down Expand Up @@ -407,8 +392,11 @@

<service id="SwagMigrationAssistant\Migration\MessageQueue\Handler\Processor\MediaProcessingProcessor"
parent="SwagMigrationAssistant\Migration\MessageQueue\Handler\Processor\AbstractProcessor">
<argument type="service" id="SwagMigrationAssistant\Migration\Service\MediaFileProcessorService"/>
<argument type="service" id="messenger.default_bus"/>
<argument type="service" id="SwagMigrationAssistant\Migration\Logging\LoggingService"/>
<argument type="service" id="Doctrine\DBAL\Connection"/>
<argument type="service" id="SwagMigrationAssistant\Migration\Media\MediaFileProcessorRegistry"/>
<argument type="service" id="SwagMigrationAssistant\Migration\DataSelection\DataSet\DataSetRegistry"/>

<tag name="shopware.migration.processor"/>
</service>
Expand Down
9 changes: 4 additions & 5 deletions src/Migration/Logging/Log/CannotGetFileRunLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

namespace SwagMigrationAssistant\Migration\Logging\Log;

use GuzzleHttp\Exception\RequestException;
use Shopware\Core\Framework\Log\Package;

#[Package('fundamentals@after-sales')]
Expand All @@ -18,7 +17,7 @@ public function __construct(
string $entity,
string $sourceId,
private readonly string $uri,
private readonly ?RequestException $requestException = null,
private readonly ?\Throwable $error = null,
) {
parent::__construct($runId, $entity, $sourceId);
}
Expand Down Expand Up @@ -71,10 +70,10 @@ public function getDescription(): string
$args['sourceId']
);

if ($this->requestException !== null) {
if ($this->error !== null) {
$description .= \sprintf(
' The following request error occurred: %s',
$this->requestException->getMessage()
' The following error occurred: %s',
$this->error->getMessage()
);
}

Expand Down
5 changes: 2 additions & 3 deletions src/Migration/Media/Processor/HttpDownloadServiceBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

use Doctrine\DBAL\Connection;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Promise;
use GuzzleHttp\Promise\PromiseInterface;
use GuzzleHttp\Promise\Utils;
use Psr\Http\Message\ResponseInterface;
Expand All @@ -30,7 +29,7 @@
use SwagMigrationAssistant\Migration\Media\MediaFileProcessorInterface;
use SwagMigrationAssistant\Migration\Media\MediaProcessWorkloadStruct;
use SwagMigrationAssistant\Migration\Media\SwagMigrationMediaFileCollection;
use SwagMigrationAssistant\Migration\MessageQueue\Handler\ProcessMediaHandler;
use SwagMigrationAssistant\Migration\MessageQueue\Handler\Processor\MediaProcessingProcessor;
use SwagMigrationAssistant\Migration\MigrationContextInterface;

/**
Expand Down Expand Up @@ -114,7 +113,7 @@ function (MediaProcessWorkloadStruct $work) use ($uuid) {
$work->setAdditionalData($additionalData);
$work->setErrorCount($work->getErrorCount() + 1);

if ($work->getErrorCount() > ProcessMediaHandler::MEDIA_ERROR_THRESHOLD) {
if ($work->getErrorCount() > MediaProcessingProcessor::MEDIA_ERROR_THRESHOLD) {
$failureUuids[] = $uuid;
$work->setState(MediaProcessWorkloadStruct::ERROR_STATE);
$this->loggingService->addLogEntry(new CannotGetFileRunLog(
Expand Down
131 changes: 0 additions & 131 deletions src/Migration/MessageQueue/Handler/ProcessMediaHandler.php

This file was deleted.

Loading
Loading