Skip to content

1.8.11

βš™οΈ Patch 1.8.11 β€” Sentry production fixes & triage automation

πŸš€ Summary

  • Qogita watchlist push β€” invalid / unknown GTINs no longer spam Sentry; push uses the resolved catalog GTIN and skips gracefully.
  • Qogita catalog import β€” duplicate GTIN rows in one CSV and concurrent webhook imports no longer cause wholesale_shopping_list primary-key violations.
  • Plenty populate cron β€” fixed retry_pending_orders() call, Sellerlogic bulk-update validation, bundle-check 429 handling, and Sheets metadata 429 retries.
  • Sentry triage automation β€” project skill + Cursor Automation + webhook script to triage, fix, test, and write patchnotes in one run.

✨ Improvements

Qogita β€” invalid GTIN push (LAGE-DASHBOARD-7)

Before After
Push used local gtin even when catalog resolved a different barcode API calls use push_gtin from resolve_push_gtin
Invalid GTIN 400 logged as error β†’ Sentry noise warning + skip row; no Sentry event for expected bad data
322+ events for GTINs not in Qogita catalog Row skipped as skipped / skipped_not_in_catalog

Qogita β€” catalog webhook import (LAGE-DASHBOARD-9 / A)

Before After
Duplicate GTIN in same CSV β†’ double INSERT β†’ UniqueViolation In-batch dedupe via pending_by_ean
Concurrent webhooks could race on insert IntegrityError retry updates existing rows only

Omni β€” pending Plenty orders cron (LAGE-DASHBOARD-8)

Before After
retry_pending_orders(db) β€” TypeError every cron run retry_pending_orders() (function opens its own session)

Plenty β€” populate workflow

Area Fix
Sellerlogic min/max update (LAGE-DASHBOARD-D) UpdateAmazonProductsRequest.asins typed as Optional[List[str]] β€” asins=None valid for bulk update
Bundle check 429 (LAGE-DASHBOARD-C) Rate limit β†’ warning, skip classification (not logged as error / not marked bundle)
Google Sheets (LAGE-DASHBOARD-F/J/R/…) retry_on_429 on metadata fetch; removed silent Sheet1 fallback when tab resolution fails
Populate cron (LAGE-DASHBOARD-S) Credential id / username read before async workflow to avoid DetachedInstanceError

Sentry triage tooling (new)

Asset Purpose
.cursor/skills/sentry-triage-fix/SKILL.md Local agent: @sentry-triage-fix or fix sentry errors
.cursor/automations/sentry-triage-fix.workflow.json Cursor Automation draft (webhook + Sentry MCP)
scripts/invoke-sentry-fix-agent.ps1 One-command webhook trigger

Each run ends with a patchnotes draft when code changed (see skill step 7).

πŸ”§ Deploy

  1. Rebuild / restart service-omni and service-plenty.
  2. Rebuild docs if you publish patchnotes from the repo.
  3. No database migration.

Optional β€” re-import Cursor Automation prompt from .cursor/automations/sentry-triage-fix.workflow.json if you use the cloud webhook agent.

βœ… Verify

  1. Qogita push: run Keepa β†’ Qogita push; invalid GTINs should log warnings only, not new Sentry issues.
  2. Catalog webhook: trigger or replay catalog import; no wholesale_shopping_list_pkey errors.
  3. Plenty cron: next plenty_orders_runner / populate cron β€” no retry_pending_orders TypeError in logs.
  4. Sheets populate: Plenty article populate with Sheets step β€” 429 retries in logs, no bogus Sheet1! range errors after metadata failure.
  5. Sentry triage: @sentry-triage-fix in Cursor β€” fixes + docs/docs/patchnotes/1.8/<version>.md updated.

⚠️ Notes

  • Sheets 400 β€œUnable to parse range” may still occur if the configured spreadsheet tab name/GID does not match the live sheet β€” fix in Sheets settings, not code.
  • Sentry issues are not auto-resolved until fixes are deployed; the triage agent resolves them only after verified code changes.
  • LAGE-DASHBOARD-B (catalog_id info log typo) unchanged β€” informational only.

Files touched

service-omni

  • app/api/v1/endpoints/statistics.py β€” retry_pending_orders() call fix
  • app/crud/qogita_catalog.py β€” catalog row dedupe + IntegrityError retry
  • app/services/keepa/scanner.py β€” push_gtin for API; invalid GTIN skip
  • app/services/qogita/qogita_client.py β€” is_qogita_invalid_gtin_error; warn on invalid GTIN 400

service-plenty

  • app/models/sellerlogic.py β€” optional asins on Amazon update requests
  • app/api/v1/endpoints/plenty_article.py β€” cron credential detach fix
  • app/services/plenty/plenty_manager.py β€” bundle check 429 handling
  • app/services/sheets.py β€” retry_on_429; no silent Sheet1 fallback

Tooling / docs

  • .cursor/skills/sentry-triage-fix/SKILL.md
  • .cursor/automations/sentry-triage-fix.md
  • .cursor/automations/sentry-triage-fix.workflow.json
  • scripts/invoke-sentry-fix-agent.ps1
  • docs/docs/patchnotes/1.8/1.8.11.md β€” this file