sync: shipping-platform patches 2026-04-19#1068
Merged
Merged
Conversation
…core) Exported from jtlshipping/shipping-platform main via ./bin/export-karrio-patches --force per PRDs/SUBTREE_SYNC_WORKFLOW.md. 1445 files across modules/connectors (579), modules/core (198), apps/api (160), modules/manager (113), modules/pricing (75), modules/sdk (55), modules/events (46), modules/orders (39), modules/data (36), modules/documents (28), modules/graph (25), modules/admin (24) + packages, plugins, scripts, and PRDs. Major functional additions from shipping-platform: - rate sheet Excel/CSV import/export (apps/, packages/, modules/data/) - Playwright e2e package scaffold (packages/e2e/) - dhl_parcel_de improvements (optional dims, reference fallback) - carrier i18n translation expansions (dhl_parcel_de, asendia) - ruff-format reflow across the tree from SP's linter config 54 three-way conflicts resolved per SUBTREE_SYNC_WORKFLOW.md matrix (see PR body for per-file decisions). Smartkargo, FedEx signature defaults, rate-sheet UX variants, and graph archive/unarchive kept at upstream (ours); carrier i18n dicts merged; e2e fixtures and de locale compiled catalog copied directly from SP. Pre-excluded from apply: 10 phantom-deletions of SP-experimental credential/secret modules that never reached upstream, and 5 binary-new files that needed direct copy (xlsx fixtures, django.mo). No JTL-proprietary modules in diff.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| ) | ||
| except Exception as exc: | ||
| return Response( | ||
| {"errors": [{"message": str(exc)}]}, |
| rate_sheet.batch_update_service_rates(updates) | ||
| except ValueError as e: | ||
| raise exceptions.ValidationError({"rates": str(e)}) | ||
| raise exceptions.ValidationError({"rates": str(e)}) from e |
| ) | ||
| except ValueError as e: | ||
| raise exceptions.ValidationError({"rate": str(e)}) | ||
| raise exceptions.ValidationError({"rate": str(e)}) from e |
| rate_sheet.batch_update_surcharges(surcharges) | ||
| except ValueError as e: | ||
| raise exceptions.ValidationError({"surcharges": str(e)}) | ||
| raise exceptions.ValidationError({"surcharges": str(e)}) from e |
| rate_sheet.remove_surcharge(input["surcharge_id"]) | ||
| except ValueError as e: | ||
| raise exceptions.ValidationError({"surcharge_id": str(e)}) | ||
| raise exceptions.ValidationError({"surcharge_id": str(e)}) from e |
| rate_sheet.add_surcharge(surcharge_dict) | ||
| except ValueError as e: | ||
| raise exceptions.ValidationError({"surcharge": str(e)}) | ||
| raise exceptions.ValidationError({"surcharge": str(e)}) from e |
| rate_sheet.remove_zone(input["zone_id"]) | ||
| except ValueError as e: | ||
| raise exceptions.ValidationError({"zone_id": str(e)}) | ||
| raise exceptions.ValidationError({"zone_id": str(e)}) from e |
| rate_sheet.update_zone(input["zone_id"], zone_dict) | ||
| except ValueError as e: | ||
| raise exceptions.ValidationError({"zone_id": str(e)}) | ||
| raise exceptions.ValidationError({"zone_id": str(e)}) from e |
| rate_sheet.add_zone(zone_dict) | ||
| except ValueError as e: | ||
| raise exceptions.ValidationError({"zone": str(e)}) | ||
| raise exceptions.ValidationError({"zone": str(e)}) from e |
| refresh = jwt.RefreshToken(refresh_token) | ||
| except TokenError as e: | ||
| # Blacklisted / expired / malformed → 401, not 500. | ||
| raise exceptions.AuthenticationFailed(str(e), code="token_not_valid") from e |
danh91
added a commit
that referenced
this pull request
Apr 19, 2026
Picks up karrioapi/karrio-insiders#32 (158 files, orgs/automation/apps/audit). Completes Wave 0 of the 2026.5 umbrella on feat/2026.5 — paired with the karrio-side sync merged as #1068 (now in main).
danh91
added a commit
that referenced
this pull request
Apr 19, 2026
Post-Wave-0-sync fixes — CI was failing on feat/2026.5 for two reasons introduced by the shipping-platform sync (#1068): 1. modules/huey/ exists in the tree (task-backend abstraction from SP) but was never added to requirements.server.dev.txt or requirements. build.txt. INSTALLED_APPS declares huey.contrib.djhuey, so Django AppConfig.create() fails with ModuleNotFoundError: No module named 'huey'. Add -e ./modules/huey to both files — its pyproject pulls huey>=2.5 transitively. 2. modules/sdk/karrio/lib.py:259 uses Python 3.12 type-parameter syntax (def to_list[T]: ...) but mypy.ini declared python_version = 3.10, so SDK typecheck fails. Bump to 3.12 to match the runtime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sub-PR 3a of the
2026.5.0umbrella release (#1065 /PRDs/RELEASE_2026_5_PLATFORM_UPGRADE.md).Pulls 1445 files of accumulated shipping-platform work back upstream per
PRDs/SUBTREE_SYNC_WORKFLOW.md. Counterpart sync intokarrio-insidersmain is karrioapi/karrio-insiders#32.modules/connectorsmodules/coreapps/apimodules/managermodules/pricingmodules/sdkmodules/eventsmodules/ordersmodules/datamodules/documentsmodules/graphmodules/adminpackages/,plugins/, scripts, PRDsNet:
+41,610 / -20,154.Source
Shipping-platform was 77 commits behind upstream when the patch was generated — expected per SUBTREE_SYNC_WORKFLOW.md ("5000+ commits ahead is normal").
Pre-exclusions (not in diff, intentional)
Phantom deletions (10 files) — SP-experimental credential/secret modules that never reached upstream, so there's nothing to delete:
modules/core/karrio/server/providers/{credential_manager,secret_manager,rotation}.pymodules/core/karrio/server/providers/models/secret.pymodules/core/karrio/server/providers/management/commands/{check_kek_usage,migrate_credentials_to_encrypted,rotate_secrets}.pymodules/core/karrio/server/providers/migrations/{0102_add_secret_storage,0103_rename_carrier_secret_refs_...}.pymodules/core/karrio/server/providers/tests/test_secret_encryption.pyBinary new files (5 files) — git's patch format lacked the
--full-indexline; copied directly from SP after the text patch applied:apps/api/locale/de/LC_MESSAGES/django.momodules/data/karrio/server/data/templates/rate-sheet-template.xlsxpackages/e2e/fixtures/rate-sheet-{errors,updated,valid}.xlsxConflict Resolution (54 files)
Per the SUBTREE_SYNC_WORKFLOW.md matrix. Default on ambiguity: keep upstream (ours).
Connector i18n (4)
modules/connectors/asendia/.../i18n.pyunits.py; ours had unique cup/country_road/priority variants. Kept both sets.modules/connectors/dhl_parcel_de/.../i18n.pyOPTION_NAME_TRANSLATIONSentries; upstream dict was empty.modules/connectors/usps/.../i18n.pymodules/connectors/usps_international/.../i18n.pyConnector providers (9)
smartkargo/**(5 files)dhl_express/address.pyconnection_config.software_name.state.dhl_express/tests/.../test_shipment.py<LocalProductCode>P</LocalProductCode>.dhl_parcel_de/.../shipment/create.pyfedex/rate.py,fedex/shipment/create.pyups/rate.pyCore server (17)
settings/base.py,core/gateway.py,core/signals.py,core/serializers.py,core/hooks.py,core/views/references.py,core/tests/test_sentry_shipment_context.pycore/tests/test_references_i18n.pyproviders/migrations/0104_merge_0103.py0103_rename_carrier_secret_refs_...that doesn't exist here.providers/models/__init__.py_hookable+ added SP'sServiceLevel/AccountRateSheet/RateSheet/SystemRateSheet/LabelTemplate/has_rate_sheetimports.providers/models/{carrier,connection}.py,providers/serializers/base.pyproviders/views/carriers.pydjango.conf.settings+ kept SP'sVirtualDownloadView/datatypes/dataunits/serializersimports (referenced in file body).serializers/abstract.py,tracing/utils.pypass-on-exception pattern.Graph / archive-unarchive (5)
All
modules/graph/karrio/server/graph/schemas/base/{__init__,inputs,mutations,types}.py+graph/serializers.py→ keep upstream. Upstream shipped archive/unarchive mutations,is_archived/archived_atfields, all_objects manager routing, and rate-sheet bulk_create fix that SP doesn't have.UI (2)
packages/ui/components/rate-sheet-editor.tsxpackages/ui/components/rate-sheet-import-panel.tsxSDK, data, manager, orders, pricing (other, 14)
modules/data/**(5 files)rate_sheets.py).modules/manager/.../views/shipments.pymodules/manager/.../views/trackers.pyidentifierwould break consistency.modules/orders/.../serializers/base.py,orders/views.pyis_archived/archived_aton Order.modules/pricing/.../signals.pymodules/sdk/.../i18n/{__init__,translations}.py__all__addition/reorder, line-wrap.modules/sdk/.../utils/helpers.pyaccess_key,api-key,client-secret, ...).modules/sdk/.../utils/tracing.pythreading.Lockfor thread-safe recordings.Migrations (1) + Localization (1)
modules/data/.../migrations/0004_add_rate_sheet_resource_type.py→ keep upstream (blank-line diff).apps/api/locale/de/LC_MESSAGES/django.po→ take SP (SP has 111 moremsgidentries; upstream-unique ones are all#~obsolete stubs thatcompilemessagesregenerates).Contamination Check
Test plan
./bin/run-sdk-testspasses locally./bin/run-server-testspasses locally (new modules/apps + modules/audit migrations present)modules/providers/views/carriers.pymerge (new dataunits/datatypes/serializers imports all have call sites)providers/models/__init__.pymerge (all six added imports resolved by downstream consumers)apps/api/locale/de/LC_MESSAGES/django.mofrom the updated.povia./manage.py compilemessagesPost-merge
Per SUBTREE_SYNC_WORKFLOW.md Phase 8, once this merges back in shipping-platform: