1.7.2
βοΈ Patch 1.7.2 β Cron export fixes, Kaufland status, Shopify deferral, and dark mode¶
π Summary¶
- Fixed post-cron export for Kaufland, FBA, FBM, and Shopify so articles marked
update_neededare actually cleared after a successful marketplace export. - Kaufland no longer reports βsuccessfulβ API calls while leaving articles stuck in
update_needed; detached SQLAlchemy sessions after long async calls are handled safely. - Shopify export no longer blocks for up to ~10 minutes when Plenty defers the export β deferred items are queued and retried automatically every 3 minutes.
- Dark mode readability fixes across credentials pages, cron schedule/status panels, MultiRepricer tables/filters, and the background-jobs widget.
- n8n heap limit raised to reduce OOM crashes on heavy workflows.
β¨ Improvements¶
- Cron / base sync export (
service_multi-repricer): - Kaufland, FBM, and FBA exports run on a fresh DB session after recalculation so ORM objects expired during recalc do not break the export phase.
- UVP background export uses the same fresh-session pattern for Kaufland and FBM.
- Shopify deferred export:
export_to_shopifyreturns a structuredShopifyExportResult(success/deferred/retry_after_seconds) instead of a bare boolean.- Background exports (
run_shopify_export, cron) useblock_on_deferred=Falseβ Plentyβs βwait N minutesβ response is stored on the article (error_message:SHOPIFY_EXPORT_DEFERRED:<iso-timestamp>) and the task finishes immediately. - New cron job
shopify_deferred_export_retry(every 3 minutes) retries due deferred SKUs with a single quick attempt per run. - Bulk export skips deferred items until their scheduled retry time to avoid hammering Plenty early.
- Direct
/plenty/export-to-shopifyAPI still blocks on deferral when a synchronous result is required. - FBA export:
- After Sellerlogic batch reprice,
FBADetailsare re-fetched byarticle_idbefore settingACTIVE(avoids detached-instance errors). - Kaufland export:
- Eager-loads unit/price/status fields before async Plenty/Kaufland calls; re-fetches details before DB update.
- Uses
storefront or shop.storefront or "de"when cron passesstorefront=None. PAUSEDcheck usesArticleStatus.PAUSED(lowercase) instead of"PAUSED".- Dark mode (frontend):
- Shared
panelStyles.jshelpers for credential cards, cron builders, status panels, table headers, and filter surfaces. - Reusable
CronBuilderBoxandCronStatusPanelcomponents; global.cron_builderoverrides inAppThemeProvider. - All
*Credentials.jsxpages use theme-aware gradients instead of hardcoded light backgrounds. - Theme grey palette remapped in dark mode so
grey.50/grey.100(table headers, filter panels, expanded rows) render as dark surfaces app-wide. - MUI overrides for table head cells, outlined inputs (search/filter fields), and labels in dark mode.
- MultiRepricer
TaskStatusWidgetusesbackground.paper+ readable text instead of a fixed white panel. - Infrastructure:
- n8n + runners:
NODE_OPTIONS=--max-old-space-size=${N8N_NODE_MAX_OLD_SPACE_SIZE:-8192}(was 4096). - n8n / runners
mem_limit: 10g; Seleniumshm_size: 4gb,mem_limit: 6g.
π Bug Fixes¶
- Kaufland
update_neededstuck after successful export: on success, status was only set toactivewhen the article was notupdate_neededβ cron exports only processupdate_neededitems, so they never cleared. Now always setsactiveon successful export. - Kaufland / FBA background export crash:
Instance <KauflandDetails> is not bound to a Session(and equivalent FBA errors) after longawaitchains β fixed by re-querying details after async work and using a dedicated export session post-recalc. - FBA
repricer_articlenot defined: missing CRUD import infba_articles.pybroke post-export status updates. - Single-SKU sync recalculated all articles:
_sync_articles_internalnow passessku=skuinto per-channel recalc/export instead ofsku=None. - FBA / FBM recalc on OOS articles: articles with status
oosare skipped during recalculation. - Shopify repricer cron:
cron_job_wrapperincorrectly calledexport_updates(db); now awaitsrun_shopify_export(sku_inner=None)directly. - FBM bulk export crash:
process_export_updatesfailed with'NoneType' object has no attribute 'get'wheninternational_pricing.DE,max_bound, ormin_boundwasnullin JSON, or Sellerlogic returned aNoneper-SKU result β fixed with safe nested pricing accessors and guarded batch-result handling. - Dark mode UI: credentials, cron βStatus Informationβ panels, and cron schedule pickers stayed bright with low-contrast text; table header rows and search/filter bars in MultiRepricer (e.g. Base Articles) used light
grey.50surfaces in dark mode.
π Files changed¶
Backend (service_multi-repricer)
app/api/v1/endpoints/kaufland_articles.pyβ export status logic, detached-session safety, storefront fallback.app/api/v1/endpoints/fba_articles.pyβ export re-fetch,repricer_articleimport, OOS recalc skip.app/api/v1/endpoints/fbm_articles.pyβ OOS recalc skip, safeinternational_pricingaccess in export.app/api/v1/endpoints/repricer_articles.pyβ freshexport_dbfor cron/UVP export, single-SKU sync scope.app/api/v1/endpoints/shopify_articles.pyβ deferred export queue, retry runner, cron wrapper fix.app/api/v1/endpoints/plenty.pyβShopifyExportResulthandling.app/services/plenty/plenty_manager.pyβShopifyExportResult, non-blocking deferral option.app/main.pyβ registershopify_deferred_export_retrycron on startup.
Frontend
src/theme/index.jsβ dark grey palette, table/input MUI overrides.src/theme/panelStyles.jsβ credential, cron, table, and filter panel helpers.src/components/AppThemeProvider.jsxβ global dark-mode.cron_builderstyles.src/components/CronBuilderBox.jsx,src/components/CronStatusPanel.jsxβ new shared cron UI.src/pages/MultiRepricer/TaskStatusWidget.jsxβ dark-mode panel styling.src/pages/MultiRepricer/Tabs/BaseArticles/BaseArticles.jsxβ filter panel + table head dark mode.src/pages/**/Credentials/*.jsxβ theme-aware credential layouts (all services).- Cron tabs updated: Statistics (Shopping Table, Profit), Tickets, Plenty Populate Articles, JTL Bundles/Inbounds, Rituals Outlet.
Infrastructure
docker-compose.yml,docker-compose-portainer.ymlβ n8n memory limits.docs/docs/patchnotes/1.7/1.7.2.mdβ this patchnotes entry.
π§ Database & SQL¶
- No schema migration required.
- Deferred Shopify exports are tracked via
shopify_details.error_messageprefixSHOPIFY_EXPORT_DEFERRED:+ ISO retry timestamp; status staysupdate_neededuntil retry succeeds.
Usage notes¶
- After deploy, run the base repricer cron (or channel export endpoints) once to clear any backlog of stuck
update_neededarticles. - Shopify logs for deferred exports will show
export deferred β¦ (not blocking, retry in β¦s)instead of a multi-minute sleep; checkshopify_deferred_export_retrycron logs for completion. - Articles still
update_neededafter export may be skipped by design (e.g. FBM/FBAinternational_pricing.DE.ignorenot explicitlyfalse, Kaufland missingid_unit/prices, orpausedstatus) β inspecterror_messageon the channel detail row. - Optional env override for n8n heap:
N8N_NODE_MAX_OLD_SPACE_SIZE=8192(or higher) in compose / Portainer stack. - Dark mode preference is per-user (Settings β Appearance); no extra migration or cache clear required.