v1.3.2 - #240
Conversation
…ed redis set field
…ed adapter for set field
…ate the action models with set field
…ed actions for set redis
…hod to ignore in check
…ed models for tests
… is now special field
…ed sanity test case for RedisSet
…t excluded model is not in redis dump
…ck excluded field are not converting to redis types
…t convert excluded fields
…ck ignored models
… aget with extracting special field data
…ge all errors imports
… common special field key from cls
…ed api to work with loading sf fields
…l to combine results of sf fields to model
…ated a list of all the sub fields that contains sf to load
…ate aget model - if there are sf fields, we load with pipeline
… aload to work with sf
…ck if atmoic model needs to be updated as contains sf
…apply additional data in the inejct function
…ate queueing the actions
…ate afind model with sf fields
… common code for afind
…ed tests to see that when we manipulate local changes, it doesn't raises an error for redis action
…ed test for sync methods - check they act normally for no pipeline
…created tests for local corruption
…ed test that sync action raise normally when we not in redis context
…ate coverage for new tests
…reign-keys-atomic-models] - ensure deepcopy of datetime fields
…reign-keys-atomic-models] - type is the same as factory
…reign-keys-atomic-models] - update the action groups
…reign-keys-atomic-models] - added tests to check 2 sf fields in the same model
…reign-keys-atomic-models] - we send full path for sf key
…reign-keys-atomic-models] - fix key in test
…reign-keys-atomic-models] - update change log
…edisset-data-structure-as-a-special-field-type Add RedisSet special field type (closes #236)
| name: str = "test" | ||
| secret: str = Field(default="hidden", exclude=True) | ||
|
|
||
| model = ModelWithExcludedField(name="my_model", secret="should_not_appear") |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (74)
📝 WalkthroughWalkthroughImplements RedisSet special field with docs/tests; refactors AtomicRedisModel loads/deletes for nested special fields; introduces MarkVersion enum with v2 default and updates decorators; revises Pydantic conversion/generic handling; broad test infra changes; new benchmarks; changelog and mkdocs updates. ChangesCore: SF-aware loading, keying, and MarkVersion
RedisSet special field and nested SFs
Decorator metadata migration across types
Pydantic conversion and GenericRedisType
Test infra, coverage, and bases
Integration tests across actions and Redis types
Benchmark model and pipeline updates
Changelog and release notes
Sequence Diagram(s)sequenceDiagram
participant Client
participant AtomicRedisModel
participant RedisUtils
participant RedisPipeline
participant Redis
Client->>AtomicRedisModel: aload(keys)
AtomicRedisModel->>RedisUtils: contains_sf_field()?
alt has special fields
RedisUtils->>RedisPipeline: execute_load_pipeline(classes, keys)
RedisPipeline->>Redis: JSON.MGET(keys)
RedisPipeline->>Redis: queue SMEMBERS for planned SF paths
Redis-->>RedisPipeline: dumps + sf_raw
RedisPipeline-->>RedisUtils: dumps, plans_per_key, sf_raw
RedisUtils->>AtomicRedisModel: build_models_from_dumps(...)
AtomicRedisModel-->>Client: instances
else no special fields
RedisUtils->>Redis: JSON.MGET(keys)
Redis-->>RedisUtils: dumps
RedisUtils->>AtomicRedisModel: build_models_from_dumps(...)
AtomicRedisModel-->>Client: instances
end
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related issues
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
Merging this PR will not alter performance
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes |
Summary by CodeRabbit
Release Notes
New Features
RedisSetspecial field type for unordered, unique-member set operations with async/sync methods including add, remove, clear, contains, members, size, and set algebra (union, intersect, difference).Bug Fixes
Documentation
Breaking Changes
mark_actionsnow usesMarkVersionenum (defaults to V2).exclude=Truefield handling behavior.