if lifecycle image is supplied, consider its apis #1607
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.
Summary
if we're injecting a custom lifecycle image into an untrusted builder, when we select the platform api version we'll consider the intersection between the builder, the lifecycle, and this instance of pack when choosing which version of the api to speak.
because this is a rare case, the default is that there is no lifecycle api list, which is treated as no constraints.
Output
Before
technically you could've used a lifecycle that didn't support the highest common version supported by both pack and the builder, but in practice i think this never happened.
After
Now it really can't ever happen.
Documentation
Related
Resolves #1091