Skip to content

feat: Include hardware registry info into DB via django command#1905

Merged
gustavobtflores merged 1 commit into
kernelci:mainfrom
profusion:feat/hardware-registry
May 26, 2026
Merged

feat: Include hardware registry info into DB via django command#1905
gustavobtflores merged 1 commit into
kernelci:mainfrom
profusion:feat/hardware-registry

Conversation

@alanpeixinho
Copy link
Copy Markdown
Contributor

@alanpeixinho alanpeixinho commented May 18, 2026

How to test:

  1. Run migrations ./migrate-app-db.sh. (Using a local database with write permissions)
  2. Run update_hardware_registry poetry run python3 manage.py update_hardware_registry ti.yaml command passing an example of valid hardware registry manifest (https://github.com/kernelci/kernelci-pipeline/blob/main/config/hardware_registry/ti.yaml).
  3. The information should be available in the tables hardware_registry_platform_vendors, hardware_registry_platforms, hardware_registry_processors, hardware_registry_silicon_vendors and hardware_registry_system_modules.

Closes #1899

@gustavobtflores gustavobtflores added the Backend Most or all of the changes for this issue will be in the backend code. label May 22, 2026
Comment on lines +66 to +78
missing = [k for k in EXPECTED_SECTIONS if k not in data]
if missing:
self.stderr.write(
self.style.WARNING(
"Missing typical hardware-registry sections : {', '.join(missing)}"
)
)

silicon_vendors = data["silicon_vendors"]
platform_vendors = data["platform_vendors"]
processors = data["processors"]
system_modules = data["system_modules"]
platforms = data["platforms"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to access these keys even if data may be missing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we could trust this data, as it is a manifest, and not data directly from user, but you are correct, we should be careful.

if missing:
self.stderr.write(
self.style.WARNING(
"Missing typical hardware-registry sections : {', '.join(missing)}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing f prefix in the string?

@alanpeixinho alanpeixinho force-pushed the feat/hardware-registry branch 2 times, most recently from 466044d to 4866317 Compare May 22, 2026 20:44
into db

Closes kernelci#1899

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
@alanpeixinho alanpeixinho force-pushed the feat/hardware-registry branch from 4866317 to 5b07ed7 Compare May 22, 2026 20:49
Copy link
Copy Markdown
Contributor

@gustavobtflores gustavobtflores left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gustavobtflores gustavobtflores added this pull request to the merge queue May 26, 2026
Merged via the queue into kernelci:main with commit 76bf104 May 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Most or all of the changes for this issue will be in the backend code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import Or Fetch Hardware Registry Metadata

2 participants