Skip to content

Commit 97d848f

Browse files
authored
Merge pull request #915 from karrioapi/patch-2025.5.2
[patch] karrio 2025.5.2
2 parents 9acb94e + e64f0d1 commit 97d848f

File tree

52 files changed

+687
-382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+687
-382
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Karrio 2025.5.2
2+
3+
## Changes
4+
5+
### Feat
6+
7+
- feat: consolidate apply_shipping_rules with support for single call label generation
8+
9+
### Fix
10+
11+
- fix: server perf affected by sentry + fix permission issues caused by carriers permission update
12+
13+
---
14+
115
# Karrio 2025.5.1
216

317
## Changes

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
The open-source shipping platform for modern logistics
1919

20-
[![License](https://img.shields.io/badge/License-LGPL_3.0-blue.svg)](./LICENSE)
21-
[![Enterprise](https://img.shields.io/badge/Enterprise-Karrio_EE-orange.svg)](./ee/LICENSE)
20+
[![Karrio OSS](https://img.shields.io/badge/License-LGPL_3.0-blue.svg)](./LICENSE)
21+
[![Karrio Enterprise](https://img.shields.io/badge/Enterprise-Karrio_EE-orange.svg)](./ee/LICENSE)
2222
[![puprlship-tests](https://github.com/karrioapi/karrio/actions/workflows/tests.yml/badge.svg)](https://github.com/karrioapi/karrio/actions/workflows/tests.yml)
2323
[![karrio-build](https://github.com/karrioapi/karrio/actions/workflows/build.yml/badge.svg)](https://github.com/karrioapi/karrio/actions/workflows/build.yml)
2424
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/cc2ac4fcb6004bca84e42a90d8acfe41)](https://www.codacy.com/gh/karrioapi/karrio/dashboard?utm_source=github.com&utm_medium=referral&utm_content=karrioapi/karrio&utm_campaign=Badge_Grade)

apps/api/karrio/server/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025.5.1
1+
2025.5.2

apps/api/karrio/server/settings/apm.py

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@
6464
SENTRY_DSN = config("SENTRY_DSN", default=None)
6565
SENTRY_ENVIRONMENT = config("SENTRY_ENVIRONMENT", default=config("ENV", default="production"))
6666
SENTRY_RELEASE = config("SENTRY_RELEASE", default=config("VERSION", default=None))
67-
SENTRY_TRACES_SAMPLE_RATE = config("SENTRY_TRACES_SAMPLE_RATE", default=1.0, cast=float)
68-
SENTRY_PROFILES_SAMPLE_RATE = config("SENTRY_PROFILES_SAMPLE_RATE", default=1.0, cast=float)
67+
# Lower default sample rates for better performance (was 1.0/100%)
68+
SENTRY_TRACES_SAMPLE_RATE = config("SENTRY_TRACES_SAMPLE_RATE", default=0.1, cast=float) # 10% of transactions
69+
SENTRY_PROFILES_SAMPLE_RATE = config("SENTRY_PROFILES_SAMPLE_RATE", default=0.0, cast=float) # Disabled by default
6970
SENTRY_SEND_PII = config("SENTRY_SEND_PII", default=True, cast=bool)
7071
SENTRY_DEBUG = config("SENTRY_DEBUG", default=False, cast=bool)
7172

@@ -136,8 +137,8 @@ def _sentry_before_send_transaction(event, hint):
136137
integrations = [
137138
DjangoIntegration(
138139
transaction_style="url", # Use URL patterns for transaction names
139-
middleware_spans=True, # Create spans for middleware
140-
signals_spans=True, # Create spans for Django signals
140+
middleware_spans=False, # Disabled for performance (was True)
141+
signals_spans=False, # Disabled for performance (was True)
141142
),
142143
]
143144

@@ -182,10 +183,10 @@ def _sentry_before_send_transaction(event, hint):
182183
environment=SENTRY_ENVIRONMENT,
183184
release=SENTRY_RELEASE,
184185

185-
# Performance monitoring
186+
# Performance monitoring (lower sample rates for better performance)
186187
traces_sample_rate=SENTRY_TRACES_SAMPLE_RATE,
187-
profile_session_sample_rate=SENTRY_PROFILES_SAMPLE_RATE,
188-
profile_lifecycle="trace",
188+
# Only enable profiling if explicitly configured (disabled by default)
189+
**({"profile_session_sample_rate": SENTRY_PROFILES_SAMPLE_RATE, "profile_lifecycle": "trace"} if SENTRY_PROFILES_SAMPLE_RATE > 0 else {}),
189190

190191
# Privacy settings
191192
send_default_pii=SENTRY_SEND_PII,
@@ -200,16 +201,11 @@ def _sentry_before_send_transaction(event, hint):
200201
before_send=_sentry_before_send,
201202
before_send_transaction=_sentry_before_send_transaction,
202203

203-
# Additional options
204-
max_breadcrumbs=50, # Keep last 50 breadcrumbs for context
204+
# Additional options (reduced for performance)
205+
max_breadcrumbs=25, # Reduced from 50 for lower memory usage
205206
attach_stacktrace=True, # Attach stack traces to messages
206-
include_source_context=True, # Include source code in stack traces
207-
include_local_variables=True, # Include local variables in stack traces
208-
209-
# Set custom tags
210-
_experiments={
211-
"record_sql_params": True, # Record SQL query parameters
212-
},
207+
include_source_context=False, # Disabled for performance (was True)
208+
include_local_variables=False, # Disabled for performance (was True)
213209
)
214210

215211
# Set default tags that will be applied to all events

apps/www/openapi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ info:
1414
## Versioning
1515
1616
When backwards-incompatible changes are made to the API, a new, dated version is released.
17-
The current version is `2025.5.1`.
17+
The current version is `2025.5.2`.
1818
1919
Read our API changelog to learn more about backwards compatibility.
2020
@@ -84,7 +84,7 @@ info:
8484
All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure).
8585
API requests without authentication will also fail.
8686
title: Karrio API
87-
version: 2025.5.1
87+
version: 2025.5.2
8888
paths:
8989
/:
9090
get:

bin/deploy-hobby

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
export KARRIO_TAG="${KARRIO_TAG:-2025.5.1}"
5+
export KARRIO_TAG="${KARRIO_TAG:-2025.5.2}"
66
export SENTRY_DSN="${SENTRY_DSN:-'https://public@sentry.example.com/1'}"
77

88
SECRET_KEY=$(head -c 28 /dev/urandom | sha224sum -b | head -c 56)
@@ -22,7 +22,7 @@ echo ""
2222
if ! [ -z "$1" ]; then
2323
export KARRIO_TAG=$1
2424
else
25-
echo "What version of Karrio would you like to install? (We default to '2025.5.1')"
25+
echo "What version of Karrio would you like to install? (We default to '2025.5.2')"
2626
echo "You can check out available versions here: https://hub.docker.com/r/karrio/server/tags"
2727
read -r KARRIO_TAG_READ
2828
if [ -z "$KARRIO_TAG_READ" ]; then

bin/deploy-insiders

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
export KARRIO_TAG="${KARRIO_TAG:-2025.5.1}"
5+
export KARRIO_TAG="${KARRIO_TAG:-2025.5.2}"
66
export SENTRY_DSN="${SENTRY_DSN:-'https://public@sentry.example.com/1'}"
77

88
SECRET_KEY=$(head -c 28 /dev/urandom | sha224sum -b | head -c 56)

bin/upgrade-hobby

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ else
4141
fi
4242

4343
[[ -f ".env" ]] && export $(cat .env | xargs) || (echo "No .env file found. Please create it with SECRET_KEY and DOMAIN set." && exit 1)
44-
export KARRIO_TAG="${KARRIO_TAG:-2025.5.1}"
44+
export KARRIO_TAG="${KARRIO_TAG:-2025.5.2}"
4545

4646
# get karrio scripts
4747
mkdir -p ./karrio

docker/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ REDIS_PORT=6379
3030
# API - Configuration for the Nginx Reverse proxy.
3131
############
3232

33-
KARRIO_TAG=2025.5.1
33+
KARRIO_TAG=2025.5.2
3434
KARRIO_HTTP_PORT=5002
3535

3636
############

0 commit comments

Comments
 (0)