Skip to content

fix(syncer-updates): separate target from floors in update logic#1291

Open
ervcz wants to merge 2 commits intofeat/capture-oem-attributefrom
fix/floors-in-multiple-batch
Open

fix(syncer-updates): separate target from floors in update logic#1291
ervcz wants to merge 2 commits intofeat/capture-oem-attributefrom
fix/floors-in-multiple-batch

Conversation

@ervcz
Copy link
Copy Markdown
Collaborator

@ervcz ervcz commented Jan 13, 2026

Problem

When more floor packages exist than NEBRASKA_MAX_FLOORS_PER_RESPONSE, the server incorrectly included the target in every batch. This caused syncers to skip remaining floors.

Solution

  • Server returns only floors (no target) when more floors remain beyond the limit
  • Target is included only when all floors have been sent
  • Syncer tracks highest floor version for next request when no target is present

Changes

  • GetUpdatePackagesForSyncer returns (floors, target, error) separately
  • GetRequiredChannelFloorsWithLimit uses LIMIT+1 to detect remaining floors
  • Syncer updates tracked version to highest floor when target is nil
  • Added TestFloorLimitPagination and TestSyncer_FloorLimitVersionTracking
  • Updated ADR-002 and operator guide documentation

- Add OEM and OEM version columns to instance table
- Update RegisterInstance and GetUpdatePackage calls to include OEM parameters
- Modify test cases to pass empty OEM values for compatibility

Signed-off-by: Ervin Rácz <ervin.racz@protonmail.com>
@ervcz ervcz marked this pull request as ready for review January 23, 2026 09:53
@ervcz ervcz requested a review from a team as a code owner January 23, 2026 09:53
Bug: Syncer received batches with the target even if there were still
floor packages waiting to be sent. The target would have been used
by the next syncer omaha request and that prevented preparing the
remaining floors to be sent.

- Update GetUpdatePackagesForSyncer to handle floors and target separately
- Fix tests for multi-step-updates floor pagination for syncers
- Modify update selection to prioritize floors before target package
- Add LIMIT+1 query pattern for floor pagination detection
- Update architecture decisions doc

Signed-off-by: Ervin Rácz <ervin.racz@protonmail.com>
@ervcz ervcz force-pushed the fix/floors-in-multiple-batch branch from 4fc1de7 to ca2d4b8 Compare January 23, 2026 10:01
@ervcz ervcz force-pushed the feat/capture-oem-attribute branch 3 times, most recently from 17439e7 to efd1f3d Compare January 26, 2026 11:43
@ervcz ervcz force-pushed the feat/capture-oem-attribute branch from 2d52519 to 410381d Compare February 6, 2026 07:04
@ervcz ervcz force-pushed the feat/capture-oem-attribute branch from 410381d to 0ef741f Compare February 13, 2026 09:23
@ervcz ervcz force-pushed the feat/capture-oem-attribute branch from 0ef741f to db18dd5 Compare March 3, 2026 06:42
@ervcz ervcz force-pushed the feat/capture-oem-attribute branch 2 times, most recently from a0b40ea to a345261 Compare March 11, 2026 17:34
@ervcz ervcz force-pushed the feat/capture-oem-attribute branch from 7c54b45 to cbf596a Compare March 19, 2026 08:38
@ervcz ervcz force-pushed the feat/capture-oem-attribute branch 4 times, most recently from 71a3566 to a2e56c4 Compare April 21, 2026 07:43
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