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..

How do people deal, in general, with inconsistent data in Yves?

2

Comments

  • Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited May 2020

    it's not in abstract storage in the DB

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

    but the abstract product exists

  • Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited May 2020

    I'd think event:trigger -rproduct_abstract -i2086 (where 2086 is the abstract product) should solve it?

  • Domain Lead Solution Architecture Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    there could be scenarios when it got disabled and removed from storage, but concretes were not taken care of

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

    all the concretes seem active

  • Domain Lead Solution Architecture Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    yes it might solve it (if product is valid). But the question is why could that happen

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

    it doesn't populate the storage table after that

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

    maybe my pub/sync knowledge is lacking though

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

    there can be many reasons for this, but my first guess is that you have errors while publishing something

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

    or if you have super slow queue processing and until messages are processed you have inconsistent state

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

    I should probably prepare a talk on p&s troubleshooting

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

    yeah -- would be a good talk πŸ™‚

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi @UKGT7RC7P,
    Good to hear from you! πŸ™‚
    Yves data consistency for each resource is defined in each storage client as a default logic. if the data is not completed in Redis, you probably get an exception. and project needs to handle this either 404 page or custom logic which defined based on project

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet

    btw Data consistency can be different or several projects. e.g. Products can be shown even if price is not there, or image is missing

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

    thanks πŸ™‚ would be good to have some kind of validation in the FE though, as otherwise you would just have to catch all errors and make them 404s

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

    if you had validation you could verify the data asynchronously

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

    and deactivate problematic products f.e.

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

    πŸ€”

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet

    Let me check this

  • Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited May 2020

    As I said the validation could be different for project implementation, Page can be still rendered with optional missing data, but with mandatory missing data, exception is fine, you don’t need to catch all errors, only those you think it’s mandatory for showing a product which should not be too many.

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

    yeah, the problem really is that the NULL errors are not handled in Spryker

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

    so you just get call to method on NULL, undefined index etc

  • Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited May 2020

    so I would want to extend the all Spryker things and add some exception handling where anything could be NULL / undefined

  • Unknown
    edited May 2020

    do you have to handle it before it hits the template?

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

    there are lots of places where it's assumed that the data is not null

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

    but it can be

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

    it can happen in the template, or in the storage client, or anywhere in between

  • do you have a couple of examples at hand?

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

    vendor/spryker/product-storage/src/Spryker/Client/ProductStorage/Storage/ProductAbstractStorageReader.php:363

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

    but there are numerous places

Welcome!

It looks like you're new here. Sign in or register to get started.