Skip to content

Add locking data structures to kernels-data - #771

Merged
danieldk merged 1 commit into
mainfrom
kernels-data-lock
Aug 18, 2026
Merged

Add locking data structures to kernels-data#771
danieldk merged 1 commit into
mainfrom
kernels-data-lock

Conversation

@danieldk

Copy link
Copy Markdown
Member

This change adds locking data structures to kernels-data and exposes them through the Python binding:

  • KernelLock: a lock that stores the Git commit OID.
  • KernelLocks: a mapping from KernelDependency to KernelLock.
  • NixKernelLock: a lock that also stores the SRI hash of the Nix output path of a kernel.
  • NixKernelLocks: a mapping from KernelDependency to NixKernelLock.
  • KernelPaths: a mapping from KernelDependency to Path for kernels that are available locally. This will be used to point to Nix store paths after realizing NixKernelLocks, however it is more generic than just being for Nix - downstream users will also be able to use this to map kernel dependencies to local paths.

These data structures will be used inside kernels for lock files and inside nix-builder for lock files with output hashes.

This change adds locking data structures to `kernels-data` and exposes
them through the Python binding:

- `KernelLock`: a lock that stores the Git commit OID.
- `KernelLocks`: a mapping from `KernelDependency` to `KernelLock`.
- `NixKernelLock`: a lock that also stores the SRI hash of the Nix
  output path of a kernel.
- `NixKernelLocks`: a mapping from `KernelDependency` to `NixKernelLock`.
- `KernelPaths`: a mapping from `KernelDependency` to `Path` for kernels
  that are available locally. This will be used to point to Nix store
  paths after realizing `NixKernelLocks`, however it is more generic
  than just being for Nix - downstream users will also be able to use
  this to map kernel dependencies to local paths.

These data structures will be used inside `kernels` for lock files and
inside `nix-builder` for lock files with output hashes.

@drbh drbh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

really nice!

@danieldk
danieldk merged commit 6ecfbf5 into main Aug 18, 2026
53 of 55 checks passed
@danieldk
danieldk deleted the kernels-data-lock branch August 18, 2026 15:55
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.

2 participants