Capture OEM and OEM Version attributes from Omaha requests#1286
Capture OEM and OEM Version attributes from Omaha requests#1286
Conversation
17439e7 to
efd1f3d
Compare
|
Just a note: OEM version is not particularly interesting as it is tightly coupled to the OS version and always updated in lockstep - one may look it up in the source repo git tag. The alephversion attribute from the request would be more interesting - it tells you the initial version an instance was provisioned from. |
Thanks for the note. I'll replace it with |
2d52519 to
410381d
Compare
410381d to
0ef741f
Compare
0ef741f to
db18dd5
Compare
a0b40ea to
a345261
Compare
7c54b45 to
cbf596a
Compare
cbf596a to
fd8ae1e
Compare
There was a problem hiding this comment.
Pull request overview
Captures OEM and Aleph version attributes from Omaha update requests and refactors instance registration/update lookup APIs to use struct-based parameters.
Changes:
- Add
oemandaleph_versioncolumns to theinstancetable. - Refactor
RegisterInstance,GetUpdatePackage, andGetUpdatePackagesForSyncerto acceptInstance/InstanceApplicationstructs (plusNewInstanceApplicationhelper). - Update and extend tests to cover OEM/AlephVersion persistence and to use the new APIs.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| backend/pkg/api/db/migrations/0021_add_instance_oem.sql | Adds DB columns to persist OEM/AlephVersion. |
| backend/pkg/api/instances.go | Extends Instance model and updates registration to upsert OEM/AlephVersion. |
| backend/pkg/omaha/omaha.go | Populates OEM/AlephVersion from Omaha requests into instance registration calls. |
| backend/pkg/api/updates.go | Refactors update lookup APIs to use struct params and relies on struct-based registration. |
| backend/pkg/api/instances_test.go | Adds coverage for saving/preserving/updating OEM/AlephVersion and updates call sites. |
| backend/pkg/api/updates_test.go | Updates test call sites to the new struct-based API. |
| backend/pkg/api/packages_floors_test.go | Updates floor-related tests for the new GetUpdatePackage signature. |
| backend/pkg/api/events_test.go | Updates event tests to use struct-based GetUpdatePackage/RegisterInstance. |
| backend/pkg/api/groups_test.go | Updates group tests to use struct-based instance registration. |
| backend/pkg/api/applications_test.go | Updates application tests to use struct-based instance registration. |
| backend/pkg/api/activity_test.go | Updates activity tests to use struct-based instance registration. |
| backend/test/api/instance_test.go | Updates higher-level API tests to use struct-based registration/update calls. |
| backend/test/api/stats_test.go | Updates stats tests to use struct-based registration/update calls. |
| CHANGELOG.md | Documents OEM/AlephVersion capture behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3def60f to
6e7b262
Compare
- 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>
6e7b262 to
71a3566
Compare
- Rename database column from `oem_version` to `aleph_version` - Update struct field and JSON tag in Instance model - Use struct params instead of long function signature - Refactor method signatures and variable names - Adjust test assertions Signed-off-by: Ervin Rácz <ervin.racz@protonmail.com>
- Add NOT NULL constraints to `oem` and `aleph_version` columns - Ensure default empty string values for both columns - Maintain backward compatibility with existing data - add PR link to OEM Attribute Capture entry Signed-off-by: Ervin Rácz <ervin.racz@protonmail.com>
71a3566 to
a2e56c4
Compare
Summary
Captures OEM and Aleph version attributes from Omaha update requests, and refactors registration APIs to use struct params.
Changes
Database
0021_add_instance_oem.sqladdsoemandaleph_versioncolumns to theinstancetableAPI
RegisterInstance,GetUpdatePackage, andGetUpdatePackagesForSyncerrefactored from positional string params toInstance/InstanceApplicationstructsNewInstanceApplicationhelper added for constructing registration inputTests