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?
Comments
-
it's not in abstract storage in the DB
0 -
but the abstract product exists
0 -
I'd think
event:trigger -rproduct_abstract -i2086
(where 2086 is the abstract product) should solve it?0 -
there could be scenarios when it got disabled and removed from storage, but concretes were not taken care of
0 -
all the concretes seem active
0 -
yes it might solve it (if product is valid). But the question is why could that happen
0 -
it doesn't populate the storage table after that
0 -
maybe my pub/sync knowledge is lacking though
0 -
there can be many reasons for this, but my first guess is that you have errors while publishing something
0 -
or if you have super slow queue processing and until messages are processed you have inconsistent state
0 -
I should probably prepare a talk on p&s troubleshooting
0 -
yeah -- would be a good talk π
0 -
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 project0 -
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
0 -
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
0 -
if you had validation you could verify the data asynchronously
0 -
and deactivate problematic products f.e.
0 -
π€
0 -
Let me check this
0 -
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.
0 -
yeah, the problem really is that the NULL errors are not handled in Spryker
0 -
so you just get call to method on NULL, undefined index etc
0 -
so I would want to extend the all Spryker things and add some exception handling where anything could be NULL / undefined
0 -
do you have to handle it before it hits the template?
0 -
there are lots of places where it's assumed that the data is not null
0 -
but it can be
0 -
it can happen in the template, or in the storage client, or anywhere in between
0 -
do you have a couple of examples at hand?
0 -
vendor/spryker/product-storage/src/Spryker/Client/ProductStorage/Storage/ProductAbstractStorageReader.php:363
0 -
but there are numerous places
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 77 Spryker News
- 938 Developer Corner
- 795 Spryker Development
- 90 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 27 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 33 Product & Business Questions
- 69 Spryker Safari Questions
- 50 Random