Add locking data structures to kernels-data - #771
Merged
Conversation
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 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.
This change adds locking data structures to
kernels-dataand exposes them through the Python binding:KernelLock: a lock that stores the Git commit OID.KernelLocks: a mapping fromKernelDependencytoKernelLock.NixKernelLock: a lock that also stores the SRI hash of the Nix output path of a kernel.NixKernelLocks: a mapping fromKernelDependencytoNixKernelLock.KernelPaths: a mapping fromKernelDependencytoPathfor kernels that are available locally. This will be used to point to Nix store paths after realizingNixKernelLocks, 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
kernelsfor lock files and insidenix-builderfor lock files with output hashes.