Support Platform API 0.14 - Add -run flag to restorer #2516
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.
Description
This PR implements support for Platform API 0.14 by adding the
-runflag to the restorer phase. This was the missing feature preventing full Platform API 0.14 compliance.Changes
-runflag to restorer when Platform API >= 0.14Background
Platform API 0.14 introduced the
-runflag for the restorer to enable read access validation for run images selected by extensions during the restore phase. When extensions switch the run image to one listed inrun.toml, the restorer needs to verify accessibility using the platform's authentication context (CNB_REGISTRY_AUTH). This prevents builds from proceeding with images the system cannot actually access.Implementation Details
The implementation follows the same pattern as the analyzer (Platform API >= 0.12) and exporter (Platform API >= 0.12):
When Platform API >= 0.14, the restorer receives:
-runflag pointing to/layers/run.tomlWriteRunTomloperation to create the run.toml fileThe run.toml file contains the run image configuration from the builder
Testing
References
-runflag to therestorerbinary spec#408Checklist