Marcin Gębala

Results 133 comments of Marcin Gębala
trafficstars

I think create/update/delete operations that modify the same entity, should also have the same permissions. So if we take products, for example, creating/updating/deleting attribute values should require `MANAGE_PRODUCTS` or `MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES`....

Reproduced on Saleor 3.19.0-a (master.staging) by trying to upload product image of size 2.7MB. Sentry log: https://saleor.sentry.io/issues/4968485679/events/fd74f4f6a4b94333be09f3f0de958876/

Note - this PR is blocked until 3.19 is released ([see context](https://saleorcommerce.slack.com/archives/C0352SN0W3U/p1707306920454469)).

Task functions to refactor: - `update_products_discounted_prices_for_promotion_task` - `update_products_discounted_prices_of_promotion_task`

We could try to use a custom Celery scheduler that will schedule the task only if there are products that need recalculating. An example custom schedule based on this logic...

To reproduce locally, it may be necessary to test it with a large dataset, possibly with many tax classes and many tax configurations for different countries.

After some investigation, we concluded that there are more problems with the linked trace: - There is a problem with fetching rax rates too many times in that query, but...

Anyway, we should fix the issue of fetching taxes too many times, it could be taking much more time if the DB was busy. Also we should rewrite these calls...

We're currently using the `3.0.6` version of GraphiQL and are still experiencing the issue. It seems to happen less often, though.