Skip to content

refactor(identity-stub): build identity stubs from fleetops-data - #380

Merged
roncodes merged 3 commits into
release/v0.6.72from
refactor/identity-stub-from-fleetops-data
Oct 11, 2026
Merged

roncodes merged 3 commits into
release/v0.6.72from
refactor/identity-stub-from-fleetops-data

Conversation

@roncodes

@roncodes roncodes commented Oct 9, 2026

Copy link
Copy Markdown
Member

What change does this PR introduce?

Follow-up to #379: utils/identity-cell-resource.js re-exports buildIdentityStub from @fleetbase/fleetops-data/utils/identity-stub instead of defining it, so every extension builds identity stubs the same way. resolveIdentityCellResource stays 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).

…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
@roncodes
roncodes merged commit 9128a73 into release/v0.6.72 Oct 11, 2026
2 of 4 checks passed
@roncodes
roncodes deleted the refactor/identity-stub-from-fleetops-data branch October 11, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant