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
`Kyte\Aws\CloudFront::createInvalidation()` built its `CallerReference` as `time().$distributionId` — **second precision**. Any two invalidations against the same distribution within the same second reused that reference with a different path batch, which CloudFront rejects with `InvalidArgument`. The wrapper then swallowed it as a generic *"Unable to create new invalidation"*. This made the **direct** invalidation path (`KYTE_USE_SNS=false`) flaky under rapid or bulk publishes — a/the reason invalidation was historically routed through SNS→Lambda instead.
6
+
7
+
Fix: append `uniqid('', true)` (microsecond entropy) so successive CallerReferences never collide, and surface the real AWS error message instead of the generic one. Measured latency of a single `createInvalidation` is ~150–190 ms, so the synchronous direct call is well within request budgets (the old "timeout" symptom was this failure, not the call duration). Unblocks the #201 move off SNS for cache invalidation: fix lands first, then installs flip `KYTE_USE_SNS=false`, then the dead SNS branches get removed.
8
+
9
+
**Best-effort invalidation hardening.** With `KYTE_USE_SNS=false` the invalidation runs synchronously inside the publish request, so a transient CloudFront error (throttling, a missing distribution) would otherwise fail a publish whose content already wrote to S3 successfully. Wrapped all 10 invalidation sites (`KytePageController` ×3, `KyteScriptController` ×2, `KyteLibraryController` ×2, `KytePageDataController`, `NavigationController`, `SideNavController`) in best-effort try/catch — log and continue, never fail the publish — matching the pattern `ApplicationController` already used.
10
+
1
11
## 4.11.0
2
12
3
13
### Feature: JWT-mode anonymous/public API access (AppContextStrategy) — KYTE-#229
0 commit comments