What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

When Glue API is used to get resources (/abstract-products/), there is an unexpected call to Zed to

UNTTWV4JK
UNTTWV4JK Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

When Glue API is used to get resources (/abstract-products/), there is an unexpected call to Zed to fetch the product tax information (TaxProductConnectorClient). When Zed is not available the API is crashing.
The expected behaviour is to get the data from the KV storage. This is also affecting performance and it hits our database when the products are returned.
Is there any update coming soon to remove the Glue dependency on Zed?

Comments

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    AFAIK this has been fixed already. Let me try to find it...

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    I have package version 4.2.1 and it still uses the zed stub to get the taxes public function getTaxSetForProductAbstract(ProductAbstractTransfer $productAbstractTransfer): TaxSetResponseTransfer { return $this->getFactory()->createZedStub()->getTaxSetForProductAbstract($productAbstractTransfer); }

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    \Pyz\Glue\GlueApplication\GlueApplicationDependencyProvider::getResourceRelationshipPlugins()

    $resourceRelationshipCollection->addRelationship(
                ProductsRestApiConfig::RESOURCE_ABSTRACT_PRODUCTS,
                new WRONGPLUGIN()
            );
    

    Correct plugin - Spryker\Glue\ProductsProductTaxSetsResourceRelationship\Plugin\ProductsProductTaxSetsResourceRelationshipPlugin

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thank you! I will try to change the plugin.

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    Good morning,
    I switched to Spryker\Glue\ProductsProductTaxSetsResourceRelationship\Plugin\ProductsProductTaxSetsResourceRelationshipPlugin but it still makes calls to Zed.


  • UNTTWV4JK
    UNTTWV4JK Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2019

    I saw there is an update for spryker/product-tax-sets-rest-api but I cannot update to version 2.0.0 because spryker/products-product-tax-sets-resource-relationship requires spryker/product-tax-sets-rest-api ^1.0.0

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    You need to delete spryker/products-product-tax-sets-resource-relationship and corresponding plugin usage ProductsProductTaxSetsResourceRelationshipPlugin.

    Then update spryker/product-tax-sets-rest-api as it provides ProductTaxSetByProductAbstractSkuResourceRelationshipPlugin plugin which doesn't do Zed call.

  • UNTTWV4JK
    UNTTWV4JK Posts: 63 πŸ§‘πŸ»β€πŸš€ - Cadet

    Done. It works well now. Thank you very much!

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Welcome!