Skip to content

Commit

Permalink
Merge pull request #1639 from spryker-shop/feature/acp-3963/master-al…
Browse files Browse the repository at this point in the history
…goila-event

ACP-3963 nonsplit to split merge
  • Loading branch information
abitskil authored Nov 21, 2024
2 parents f15e362 + e2110b3 commit 16e6e07
Show file tree
Hide file tree
Showing 13 changed files with 246 additions and 187 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@
"spryker-shop/store-widget": "^1.0.0",
"spryker-shop/tabs-widget": "^1.0.0",
"spryker-shop/tabs-widget-extension": "^1.0.0",
"spryker-shop/traceable-event-widget": "^1.0.0",
"spryker-shop/url-page": "^1.0.0",
"spryker-shop/wishlist-page": "^1.10.0",
"spryker-shop/wishlist-page-extension": "^1.0.0",
Expand Down Expand Up @@ -1096,7 +1097,7 @@
"spryker/search": "^8.0.0",
"spryker/search-elasticsearch": "^1.13.0",
"spryker/search-elasticsearch-gui": "^1.0.0",
"spryker/search-http": "^0.4.0",
"spryker/search-http": "^0.5.0",
"spryker/secrets-manager": "^1.0.0",
"spryker/secrets-manager-aws": "^1.0.0",
"spryker/secrets-manager-extension": "^1.0.0",
Expand Down
310 changes: 181 additions & 129 deletions composer.lock

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions config/Shared/config_default.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
use Spryker\Shared\OauthClient\OauthClientConstants;
use Spryker\Shared\OauthCryptography\OauthCryptographyConstants;
use Spryker\Shared\Oms\OmsConstants;
use Spryker\Shared\Payment\PaymentConstants;
use Spryker\Shared\Product\ProductConstants;
use Spryker\Shared\ProductConfiguration\ProductConfigurationConstants;
use Spryker\Shared\ProductLabel\ProductLabelConstants;
Expand All @@ -105,7 +104,6 @@
use Spryker\Shared\SchedulerJenkins\SchedulerJenkinsConfig;
use Spryker\Shared\SchedulerJenkins\SchedulerJenkinsConstants;
use Spryker\Shared\SearchElasticsearch\SearchElasticsearchConstants;
use Spryker\Shared\SearchHttp\SearchHttpConstants;
use Spryker\Shared\SecurityBlocker\SecurityBlockerConstants;
use Spryker\Shared\SecurityBlockerBackoffice\SecurityBlockerBackofficeConstants;
use Spryker\Shared\SecurityBlockerMerchantPortal\SecurityBlockerMerchantPortalConstants;
Expand Down Expand Up @@ -886,13 +884,11 @@
= $config[OauthClientConstants::OAUTH_OPTION_AUDIENCE_FOR_PAYMENT_AUTHORIZE]
= 'aop-app';

$config[SearchHttpConstants::TENANT_IDENTIFIER]
= $config[KernelAppConstants::TENANT_IDENTIFIER]
$config[KernelAppConstants::TENANT_IDENTIFIER]
= $config[ProductConstants::TENANT_IDENTIFIER]
= $config[MessageBrokerConstants::TENANT_IDENTIFIER]
= $config[MessageBrokerAwsConstants::CONSUMER_ID]
= $config[OauthClientConstants::TENANT_IDENTIFIER]
= $config[PaymentConstants::TENANT_IDENTIFIER]
= $config[AppCatalogGuiConstants::TENANT_IDENTIFIER]
= $config[TaxAppConstants::TENANT_IDENTIFIER]
= getenv('SPRYKER_TENANT_IDENTIFIER') ?: '';
Expand Down
47 changes: 24 additions & 23 deletions config/Zed/cronjobs/jenkins.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,74 +7,75 @@
* - jobs[]['role'] default value is 'admin'
*/

$logger = 'config/Zed/cronjobs/bin/loggable.sh '; // script for jenkins logging
/* ProductValidity */
$jobs[] = [
'name' => 'check-product-validity',
'command' => '$PHP_BIN vendor/bin/console product:check-validity',
'command' => $logger . '$PHP_BIN vendor/bin/console product:check-validity',
'schedule' => '0 6 * * *',
'enable' => true,
];

/* ProductLabel */
$jobs[] = [
'name' => 'check-product-label-validity',
'command' => '$PHP_BIN vendor/bin/console product-label:validity',
'command' => $logger . '$PHP_BIN vendor/bin/console product-label:validity',
'schedule' => '0 6 * * *',
'enable' => true,
];
$jobs[] = [
'name' => 'update-product-label-relations',
'command' => '$PHP_BIN vendor/bin/console product-label:relations:update -vvv --no-touch',
'command' => $logger . '$PHP_BIN vendor/bin/console product-label:relations:update -vvv --no-touch',
'schedule' => '* * * * *',
'enable' => true,
];

/* Oms */
$jobs[] = [
'name' => 'check-oms-conditions',
'command' => '$PHP_BIN vendor/bin/console oms:check-condition',
'command' => $logger . '$PHP_BIN vendor/bin/console oms:check-condition',
'schedule' => '* * * * *',
'enable' => true,
];

$jobs[] = [
'name' => 'check-oms-timeouts',
'command' => '$PHP_BIN vendor/bin/console oms:check-timeout',
'command' => $logger . '$PHP_BIN vendor/bin/console oms:check-timeout',
'schedule' => '* * * * *',
'enable' => true,
];

$jobs[] = [
'name' => 'clear-oms-locks',
'command' => '$PHP_BIN vendor/bin/console oms:clear-locks',
'command' => $logger . '$PHP_BIN vendor/bin/console oms:clear-locks',
'schedule' => '0 6 * * *',
'enable' => true,
];

$jobs[] = [
'name' => 'queue-worker-start',
'command' => '$PHP_BIN vendor/bin/console queue:worker:start',
'command' => $logger . '$PHP_BIN vendor/bin/console queue:worker:start',
'schedule' => '* * * * *',
'enable' => true,
];

$jobs[] = [
'name' => 'product-relation-updater',
'command' => '$PHP_BIN vendor/bin/console product-relation:update -vvv',
'command' => $logger . '$PHP_BIN vendor/bin/console product-relation:update -vvv',
'schedule' => '30 2 * * *',
'enable' => true,
];

$jobs[] = [
'name' => 'event-trigger-timeout',
'command' => '$PHP_BIN vendor/bin/console event:trigger:timeout -vvv',
'command' => $logger . '$PHP_BIN vendor/bin/console event:trigger:timeout -vvv',
'schedule' => '*/5 * * * *',
'enable' => true,
];

$jobs[] = [
'name' => 'deactivate-discontinued-products',
'command' => '$PHP_BIN vendor/bin/console deactivate-discontinued-products',
'command' => $logger . '$PHP_BIN vendor/bin/console deactivate-discontinued-products',
'schedule' => '0 0 * * *',
'enable' => true,
];
Expand Down Expand Up @@ -109,91 +110,91 @@
/* Quote */
$jobs[] = [
'name' => 'clean-expired-guest-cart',
'command' => '$PHP_BIN vendor/bin/console quote:delete-expired-guest-quotes',
'command' => $logger . '$PHP_BIN vendor/bin/console quote:delete-expired-guest-quotes',
'schedule' => '30 1 * * *',
'enable' => true,
];

/* QuoteRequest */
$jobs[] = [
'name' => 'close-outdated-quote-requests',
'command' => '$PHP_BIN vendor/bin/console quote-request:close-outdated',
'command' => $logger . '$PHP_BIN vendor/bin/console quote-request:close-outdated',
'schedule' => '0 * * * *',
'enable' => true,
];

/* PriceProductSchedule */
$jobs[] = [
'name' => 'apply-price-product-schedule',
'command' => '$PHP_BIN vendor/bin/console price-product-schedule:apply',
'command' => $logger . '$PHP_BIN vendor/bin/console price-product-schedule:apply',
'schedule' => '0 6 * * *',
'enable' => true,
];

/* ProductOfferValidity */
$jobs[] = [
'name' => 'check-product-offer-validity',
'command' => '$PHP_BIN vendor/bin/console product-offer:check-validity',
'command' => $logger . '$PHP_BIN vendor/bin/console product-offer:check-validity',
'schedule' => '0 6 * * *',
'enable' => true,
];

/* Oauth */
$jobs[] = [
'name' => 'remove-expired-refresh-tokens',
'command' => '$PHP_BIN vendor/bin/console oauth:refresh-token:remove-expired',
'command' => $logger . '$PHP_BIN vendor/bin/console oauth:refresh-token:remove-expired',
'schedule' => '*/5 * * * *',
'enable' => true,
];

/* Customer */
$jobs[] = [
'name' => 'delete-expired-customer-invalidated',
'command' => '$PHP_BIN vendor/bin/console customer:delete-expired-customer-invalidated',
'command' => $logger . '$PHP_BIN vendor/bin/console customer:delete-expired-customer-invalidated',
'schedule' => '0 0 * * 0',
'enable' => true,
];

/* Order invoice */
$jobs[] = [
'name' => 'order-invoice-send',
'command' => '$PHP_BIN vendor/bin/console order:invoice:send',
'command' => $logger . '$PHP_BIN vendor/bin/console order:invoice:send',
'schedule' => '*/5 * * * *',
'enable' => true,
];

$jobs[] = [
'name' => 'page-product-abstract-refresh',
'command' => '$PHP_BIN vendor/bin/console product-page-search:product-abstract-refresh',
'command' => $logger . '$PHP_BIN vendor/bin/console product-page-search:product-abstract-refresh',
'schedule' => '0 6 * * *',
'enable' => true,
];

/* Push notification */
$jobs[] = [
'name' => 'delete-expired-push-notification-subscriptions',
'command' => '$PHP_BIN vendor/bin/console push-notification:delete-expired-push-notification-subscriptions',
'command' => $logger . '$PHP_BIN vendor/bin/console push-notification:delete-expired-push-notification-subscriptions',
'schedule' => '0 0 * * 0',
'enable' => true,
];

$jobs[] = [
'name' => 'send-push-notifications',
'command' => '$PHP_BIN vendor/bin/console push-notification:send-push-notifications',
'command' => $logger . '$PHP_BIN vendor/bin/console push-notification:send-push-notifications',
'schedule' => '* * * * *',
'enable' => true,
];

$jobs[] = [
'name' => 'glue-api-generate-documentation',
'command' => '$PHP_BIN vendor/bin/glue api:generate:documentation --invalidated-after-interval 90sec',
'command' => $logger . '$PHP_BIN vendor/bin/glue api:generate:documentation --invalidated-after-interval 90sec',
'schedule' => '*/1 * * * *',
'enable' => true,
];

$jobs[] = [
'name' => 'sync-order-matrix',
'command' => '$PHP_BIN vendor/bin/console order-matrix:sync',
'command' => $logger . '$PHP_BIN vendor/bin/console order-matrix:sync',
'schedule' => '*/1 * * * *',
'enable' => true,
'global' => true,
Expand All @@ -203,7 +204,7 @@
if (\Spryker\Shared\Config\Config::get(\Spryker\Shared\MessageBroker\MessageBrokerConstants::IS_ENABLED)) {
$jobs[] = [
'name' => 'message-broker-consume-channels',
'command' => 'config/Zed/cronjobs/bin/loggable.sh $PHP_BIN vendor/bin/console message-broker:consume --time-limit=15 --sleep=5',
'command' => $logger . '$PHP_BIN vendor/bin/console message-broker:consume --time-limit=15 --sleep=5',
'schedule' => '* * * * *',
'enable' => true,
];
Expand Down
9 changes: 7 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"lodash-es": "~4.17.21",
"password-validator": "~5.3.0",
"rxjs": "~7.8.1",
"search-insights": "~2.17.2",
"zone.js": "~0.14.4"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use Spryker\Shared\Http\Plugin\EventDispatcher\ResponseListenerEventDispatcherPlugin;
use Spryker\Yves\Application\Communication\Plugin\EventDispatcher\HeadersSecurityEventDispatcherPlugin;
use Spryker\Yves\Customer\Plugin\EventDispatcher\AnonymousIdSessionAssignEventDispatcherPlugin;
use Spryker\Yves\EventDispatcher\EventDispatcherDependencyProvider as SprykerEventDispatcherDependencyProvider;
use Spryker\Yves\Http\Plugin\EventDispatcher\CacheControlHeaderEventDispatcherPlugin;
use Spryker\Yves\Http\Plugin\EventDispatcher\CookieEventDispatcherPlugin;
Expand Down Expand Up @@ -66,6 +67,7 @@ protected function getEventDispatcherPlugins(): array
new SecurityBlockerCustomerEventDispatcherPlugin(),
new SecurityBlockerAgentEventDispatcherPlugin(),
new EnvironmentInfoHeaderEventDispatcherPlugin(),
new AnonymousIdSessionAssignEventDispatcherPlugin(),
];

if (class_exists(ProfilerRequestEventDispatcherPlugin::class)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
use SprykerShop\Yves\StoreWidget\Plugin\ShopApplication\StoreApplicationPlugin;
use SprykerShop\Yves\StoreWidget\Widget\StoreSwitcherWidget;
use SprykerShop\Yves\TabsWidget\Widget\FullTextSearchTabsWidget;
use SprykerShop\Yves\TraceableEventWidget\Widget\TraceableEventWidget;
use SprykerShop\Yves\WebProfilerWidget\Plugin\Application\WebProfilerApplicationPlugin;
use SprykerShop\Yves\WishlistWidget\Widget\WishlistMenuItemWidget;

Expand Down Expand Up @@ -353,6 +354,7 @@ protected function getGlobalWidgets(): array
CartReorderItemCheckboxWidget::class,
CartReorderItemsWidget::class,
OrderAmendmentWidget::class,
TraceableEventWidget::class,
];
}

Expand Down
14 changes: 14 additions & 0 deletions src/Pyz/Zed/MessageBroker/MessageBrokerConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ public function getDefaultWorkerChannels(): array
];
}

/**
* {@inheritDoc}
*
* @api
*
* @deprecated Will be removed without replacement.
*
* @return bool
*/
public function isDefaultApplicationLoggerUsed(): bool
{
return true;
}

/**
* Additional method to support MB1 and MB2 in parallel.
* Will be removed when MB1 is deprecated and removed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@ class SearchEndpointMessageTest extends Unit
public function testSearchEndpointAvailableMessageIsSuccessfullyHandled(): void
{
// Arrange
$storeTransfer = $this->tester->getAllowedStore();
$this->tester->removeHttpConfigForStore($storeTransfer);
$this->tester->removeHttpConfig();
$searchEndpointAvailableTransfer = $this->tester->buildSearchEndpointAvailableTransfer();

// Act
$this->tester->handleSearchMessage($searchEndpointAvailableTransfer);

// Assert
$this->tester->assertSearchHttpConfigExistsForStore($storeTransfer);
$this->tester->assertSearchHttpConfigExistsForStore();
}

/**
Expand All @@ -52,9 +51,7 @@ public function testSearchEndpointAvailableMessageIsSuccessfullyHandled(): void
public function testSearchEndpointRemovedMessageIsSuccessfullyHandled(): void
{
// Arrange
$storeTransfer = $this->tester->getAllowedStore();

$this->tester->removeHttpConfigForStore($storeTransfer);
$this->tester->removeHttpConfig();
$this->tester->handleSearchMessage(
$this->tester->buildSearchEndpointAvailableTransfer(),
);
Expand All @@ -65,6 +62,6 @@ public function testSearchEndpointRemovedMessageIsSuccessfullyHandled(): void
$this->tester->handleSearchMessage($searchEndpointRemovedTransfer);

// Assert
$this->tester->assertSearchHttpConfigIsRemovedForStore($storeTransfer);
$this->tester->assertSearchHttpConfigIsRemoved();
}
}
Loading

0 comments on commit 16e6e07

Please sign in to comment.