-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds CI jobs for SPI to cover the combinations of digest_strategy and encoding_format #965
Open
dcookspi
wants to merge
21
commits into
main
Choose a base branch
from
spi-adding-CI-for-digest-encoding-combinations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
This is needed to construct a test around empty platforms, but the flag is hidden since it is not expected to be used in normal usage. Note that the act of creating an empty runtime via `spfs run - -- bash` causes an empty platform to be committed to storage. So it is possible, but it wasn't possible via `spfs commit`. Signed-off-by: J Robert Ray <[email protected]> Signed-off-by: Ryan Bottriell <[email protected]>
An empty platform, something that will get created in storage when starting an empty runtime, happens to have the same digest as a blob containing 8 null bytes. A file with 8 null bytes is something cargo will write in the target directory under some circumstances. Therefore, creating an spfs layer out of the target directory of a Rust project can corrupt the spfs storage, as the blob object does not get written since the file already exists, and that file is a platform object. This test serves to demonstrate the collision and then eventually verify the collision problem has been fixed. Signed-off-by: J Robert Ray <[email protected]> Signed-off-by: Ryan Bottriell <[email protected]>
If the blob is written first and an object with that digest didn't actually exist yet, then the blob "wins" control of that digest, and then creating the platform doesn't replace the digest file on disk, keeping it a blob. In that case, the test passes even though a collision problem still exists. Signed-off-by: J Robert Ray <[email protected]> Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]>
The original header used a u64 for the kind of each object, this is now split into pieces with two components and reserved space. Instead of 8 bytes for the uint we now have: [ epoch, !, !, !, !, !, !, kind ], where each '!' is reserved space Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]>
These two types look exactly the same, expect that the generated one makes the internal bytes public. This is not particulary problematic, and has the benefit of not needing to cast or convert any deserialized digests in the future. Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]>
Move `Object::kind` out of `impl Object` into its own trait so the different object types can implement this trait and know their own kind. Signed-off-by: J Robert Ray <[email protected]> Signed-off-by: Ryan Bottriell <[email protected]>
All top-level objects (that are constructed and stored on their own) are now a specific variantion on an underlying generic type FlatObject. These objects all contain the same AnyObject flatbuffer, with the more specific types having validated the contained data as a specific variant. The main side effects of this are that: - a new Variant enum is created to enable the existing match-based disambiguation pattern - the spfs Repository trait can now have a generic write_object function that no longer requires wrapping the data in an emum before calling - objects must be constructed using the flatbuffer api, and types that are not top-level (tree, entry) cannot be created individually - only seen as references to data within the Manifest object The removal of Tree and Entry as owned types also allows for removing their references in other areas. They can no longer be encoded and saved on their own, which was technically possible before but never done. Signed-off-by: Ryan Bottriell <[email protected]> Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]> Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]> Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]> Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]> Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]>
…_format Signed-off-by: David Gilligan-Cook <[email protected]>
jrray
reviewed
Jan 31, 2024
8979b35
to
2190b10
Compare
89a849a
to
3725036
Compare
ed18c8d
to
93d4c55
Compare
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 adds CI jobs for SPI to cover the combinations of digest_strategy and encoding_format settings so we have better testing coverage.