Extract tenantstore and simplify models package#666
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
alexbouchardd
approved these changes
Jan 30, 2026
…antstore Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Separate RunConformanceTests (CRUD, destination listing, match, misc) from RunListTenantTests (enrichment, excludes deleted, input validation, keyset pagination, pagination suite). ListTenant tests now only run on RediSearch backends (Redis Stack, Dragonfly Stack) instead of skipping at runtime. Pagination suite moved from standalone redistenantstore test into the drivertest framework. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add tenantstore/tenantstore.go facade following the logstore pattern with type aliases, re-exported error sentinels, and a Config-based constructor. Update all consumers from models.EntityStore to tenantstore.TenantStore across services, apirouter, publishmq, and deliverymq packages. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Delete moved code from models/ (entity.go, encryption.go and their tests), remove parseRedisHash/parseTimestamp methods from tenant.go and destination.go. Rename EntityStore to MockStore in destinationmockserver, and rename entityStore to tenantStore across apirouter, publishmq, deliverymq, telemetry, and config. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
75564a9 to
c52bfaa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
modelspackage was mixing domain types, Redis serialization logic, and theEntityStorestorage interface. This PR separates those concerns:tenantstore— Move tenant/destination storage into its own package with a driver interface, conformance test suite (drivertest), andmem/redisimplementations. Follows the same pattern aslogstore.models— Strip down to pure data types, split into focused files (entities.go,tasks.go,serialization.go). RemoveEntityStorereferences and Redis parsing logic.