You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The restorer should accept a -run flag (similar to analyzer and exporter in Platform API 0.12+) to enable read access validation for run images selected by extensions
Currently, pack passes the -run flag to the analyzer (when Platform API >= 0.12) and exporter (when Platform API >= 0.12), but NOT to the restorer
The restorer needs this flag to verify accessibility of run images when extensions have modified the run image selection, using the platform's authentication context
Current Implementation Status
What's already implemented:
Platform API 0.14 is listed in supported versions (internal/build/lifecycle_executor.go)
-run flag support for analyzer (Platform API >= 0.12)
-run flag support for exporter (Platform API >= 0.12)
WriteRunToml helper function (internal/build/container_ops.go:264)
What's missing:
-run flag support for restorer (should be Platform API >= 0.14)
Proposed solution
Add the -run flag to the restorer phase when Platform API >= 0.14:
Modify the Restore function in internal/build/lifecycle_execution.go (around line 520-617)
Add conditional logic similar to analyzer/exporter to pass -run flag when Platform API >= 0.14
Include the WriteRunToml container operation
Add tests to verify the flag is passed correctly when Platform API >= 0.14
Example implementation pattern (based on analyzer at line 708):
Description
Pack currently supports Platform API versions 0.3 through 0.15, but is missing a key feature introduced in Platform API 0.14.
See spec release: https://github.com/buildpacks/spec/releases/tag/platform%2Fv0.14
Platform API 0.14 Changes:
-runflag to therestorerbinary-runflag (similar to analyzer and exporter in Platform API 0.12+) to enable read access validation for run images selected by extensions-runflag to the analyzer (when Platform API >= 0.12) and exporter (when Platform API >= 0.12), but NOT to the restorerCurrent Implementation Status
What's already implemented:
-runflag support for analyzer (Platform API >= 0.12)-runflag support for exporter (Platform API >= 0.12)WriteRunTomlhelper function (internal/build/container_ops.go:264)What's missing:
-runflag support for restorer (should be Platform API >= 0.14)Proposed solution
Add the
-runflag to the restorer phase when Platform API >= 0.14:Restorefunction ininternal/build/lifecycle_execution.go(around line 520-617)-runflag when Platform API >= 0.14WriteRunTomlcontainer operationExample implementation pattern (based on analyzer at line 708):
Related Issues/PRs
-runflag to therestorerbinary spec#408