Repository navigation
feat(hardware-registry): show the last registry sync on the hardware page - #2184
Open
alanpeixinho wants to merge 2 commits into
Open
alanpeixinho wants to merge 2 commits into
alanpeixinho wants to merge 2 commits into
Conversation
Add hardware_registry_sync, one row holding the last full --index run and the SHA-256 of each file it fetched. Store the device tree compatible strings that kernelci-pipeline added to each platform. Part of kernelci#2170 Part of kernelci#1886 Assisted-by: Cursor Signed-off-by: Alan Peixinho <[email protected]>
…page update_hardware_registry now reads files nested under hardware_registry, the format kernelci-pipeline moved to, and stores compatible. An --index run loads every file in one transaction, deletes rows missing from the files, and records each file's SHA-256 and the day its content last changed. Single-file runs do neither. GET /api/hardware/registry-sync/ returns that record. The hardware page lists it below the table, so sha256sum on an upstream file can be compared with what the dashboard loaded. Closes kernelci#2170 Part of kernelci#1886 Assisted-by: Cursor Signed-off-by: Alan Peixinho <[email protected]>
Member
|
@alanpeixinho can you add a description and test instructions to this PR, please? |
alanpeixinho
marked this pull request as ready for review
October 20, 2026 22:16
This branch has not been deployed
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 it is
The nightly
update_hardware_registry --indexrun now records each file it fetched. For the index and every vendor file it stores a sha256 of the raw bytes and the time those bytes last changed.GET /api/hardware/registry-sync/returns that record, plussynced_atfor the run itself.The hardware listing shows the record under the table.
index.yamlis visible with its date and hash. The vendor files open from the chevron.That same
--indexrun deletes registry rows missing from the fetched files. A single-file run still only upserts that file and leaves the record alone.The platform table also gains a
compatiblearray, copied from the YAML.Closes #2170.
How to test
0021and0022.python manage.py update_hardware_registry --index=<index.yaml>. The default URL is the kernelci-pipeline index./hardware. Under the table, confirmindex.yaml, a date, and a hash. The hash should matchsha256sumof that file. Open the chevron and confirm each vendor file has its own date and hash.synced_atinGET /api/hardware/registry-sync/moves forward.--indexat a local index, remove one platform from a vendor file, and run again. That platform is gone fromhardware_registry_platforms, and that file's hash and date change. Put the platform back and run again to restore the row.