Repository navigation
refactor(identity-stub): build identity stubs from fleetops-data - #380
Merged
roncodes merged 3 commits intoOct 11, 2026
Merged
Conversation
…e_events table every run fleetops:prune-telematics-data ran every 15 minutes and, on a 2.3M-row device_events table, held the database for minutes per batch even though every telematics connection was inactive and nothing was left to prune: - batches were ordered by id while the scope ranged over created_at, so MySQL walked the primary key instead of the (company_uuid, created_at) retention index; batches now order by the ranged column - the orphan scope was 'company_uuid IS NULL OR NOT IN (select uuid from companies)', which cannot use an index; the gone company uuids are now resolved once per table from a grouped index scan and the scope becomes IS NULL / IN (...) - the compaction sweep re-read every already-compacted row on every run; a per-scope watermark (cache) now limits it to rows that aged into the window since the last complete sweep - the soft-deleted purge had no index on deleted_at; two migrations add (company_uuid, deleted_at) on device_events and positions Polling itself was already correct: fleetops:sync-telematics only queues connections in active/connected states.
fix(telematics): retention pruner no longer scans the whole device_events table every run
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.
What change does this PR introduce?
Follow-up to #379:
utils/identity-cell-resource.jsre-exportsbuildIdentityStubfrom@fleetbase/fleetops-data/utils/identity-stubinstead of defining it, so every extension builds identity stubs the same way.resolveIdentityCellResourcestays here. No call site changes.Why was this change needed?
The stub builder moved to the shared package (fleetops-data follow-up to #86) so Storefront can use it; this removes the duplicate.
Other information
Depends on that fleetops-data PR being released; until then the import resolves only through the workspace link. The descriptor, wrapper and identity-cell suites are unaffected (the same filtered run as on #379).