You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Truncate large error messages in status conditions
When upgrading operators, CRD validation errors can be very large (50KB+).
Kubernetes rejects status updates over 32KB with "Too long: may not be more than 32768 bytes".
This causes ClusterExtension upgrades to fail and get stuck.
Added `truncateMessage()` function that cuts messages over 30KB.
Applied to status condition functions that handle large errors:
- `setStatusProgressing()` - handles CRD validation errors
- `ensureAllConditionsWithReason()` - handles resolution errors
- `setInstalledStatusConditionUnknown()` - handles bundle errors
Messages keep important info at the start and add "... [message truncated]" suffix.
Now upgrades complete successfully even with large CRD validation errors.
Added unit tests for truncation logic and CRD error scenarios.
Assisted-by: Cursor
0 commit comments