Expose store.toml
contents in BuildContext
#543
Merged
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.
Up until now, it wasn't possible to access to contents of
store.toml
via libcnb. This PR adds a minimal implementation and tests for accessing that data. I deliberately limited this PR to just that and not address issues withstore.toml
handling in general:store.toml
should be typed like layer metadata is. Working with raw TOML with Rust is tedious, especially when we need a specific TOML type (store.toml metadata needs to be atoml::value::Table
. However, this is not just a matter of slapping a new associated type onBuildpack
and use that to parse the metadata. We need a mechanism to handle incompatibilities (like we do with layer metadata). (I filed: Typedstore.toml
metadata #544)BuildResult
does not containstore.toml
data (i.e. that field isNone
), the file on disk is not modified. This is inconsistent with i.e. layers where the metadata needs to be written every time to keep it around. There is currently no way to remove all metadata either sinceNone
signals "don't change" instead of "no data". (I filed: Inconsistent handling ofstore.toml
#545)Without the fixes for the issues above, this PR a non breaking change we can roll out immediately as a point release to provide the needed functionality to buildpacks that need it and tackle the harder breaking changes separately.
Closes GUS-W-12299144