v1.0.40 - #106
v1.0.40#106
Conversation
.local-feed/ (the repo-local NuGet feed written by build/pack-local.sh and consumed by vnext as ../aether/.local-feed) was ignored only through .git/info/exclude, which is per clone; a fresh checkout following the local-feed procedure saw an untracked directory. It is now in the committed .gitignore. CLAUDE.md's NuGet section only described the release-v* publishing job; it now also documents the local feed: pack-local.sh usage, the -local version rule, why the script purges the NuGet cache before packing, the consumer-side wiring in vnext (nuget.config source + packageSourceMapping, AetherPackageVersion) and the revert-before-PR rule, with a link to the full procedure in vnext. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
chore: ignore .local-feed/ and document build/pack-local.sh in CLAUDE.md
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…rever DaprDistributedCacheService truncated the requested expiry to whole seconds and dropped the ttlInSeconds metadata when the result was zero, which Dapr reads as "no expiry" — the shortest lifetime a caller can ask for became the longest one. The absolute and sliding branches also disagreed on what a sub-second request meant. Both branches now share one computation that rounds up and never falls below the store's one-second granularity. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…over An absolute expiry in the past, or a non-positive sliding expiration, means the entry is already dead. Storing it was writing a permanent entry. The write is now skipped and the span carries cache.skipped=true. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…gative DateTimeOffset.MaxValue as an absolute expiry wrapped the unchecked int cast to int.MinValue, sending a negative ttlInSeconds to the state store. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…xample Documents Dapr's one-second floor and the round-up behaviour, and replaces the AbsoluteExpirationRelativeToNow example — that property does not exist on DistributedCacheEntryOptions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Basic Get/Set sample used the same non-existent property that the Expiration Options sample did, so a reader copying it still got a compile error. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…he skip The span tags the design cited as a substitute for logging only exist under the Verbose tracing profile, so a skipped write is silent by default; the skip is also reachable from GetOrSetAsync whenever the fetch outlives a short absolute expiry, which the design wrongly called a caller bug. Both are now recorded, along with the upgrade note for entries already stored without a TTL, the per-provider meaning of cache.ttl_seconds, and the unspecified out-of-range cast behaviour that made the overflow test unreproducible on ARM64. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
fix(cache): a sub-second TTL no longer becomes a permanent entry on the Dapr provider
There was a problem hiding this comment.
Sorry @yilmaztayfun, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 4 days by commenting @sourcery-ai review. Upgrade to get a review now.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 14 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Reviewer's GuideVersion 1.0.40 fixes Dapr distributed-cache TTL loss and truncation by centralizing expiration handling, rounding positive TTLs up to Dapr’s one-second granularity, skipping already-expired writes, and clamping extreme values. It adds focused unit tests, expands cache documentation and migration guidance, and documents the implementation/design plus local NuGet packaging workflow. Sequence diagram for Dapr cache TTL handlingsequenceDiagram
participant Caller
participant Cache as DaprDistributedCacheService
participant Dapr as DaprClient
Caller->>Cache: SetAsync(key, value, options)
Cache->>Cache: Compute requestedTtl
alt requestedTtl <= TimeSpan.Zero
Cache->>Cache: SetTag(cache.skipped, true)
Cache-->>Caller: Return without SaveStateAsync
else positive requestedTtl
Cache->>Cache: ToStoreTtlSeconds(ttl)
Cache->>Cache: Round up and clamp to int.MaxValue
Cache->>Dapr: SaveStateAsync(..., ttlInSeconds metadata)
Dapr-->>Cache: Save completed
Cache-->>Caller: Return
else no expiration options
Cache->>Dapr: SaveStateAsync(..., no TTL metadata)
Dapr-->>Cache: Save completed
Cache-->>Caller: Return
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|



Summary by Sourcery
Correct Dapr distributed-cache TTL handling to prevent stale permanent entries and accurately document provider-specific expiration behavior.
Bug Fixes:
Enhancements:
Documentation:
Tests:
Chores: