Skip to content
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

if lifecycle image is supplied, consider its apis #1607

Merged
merged 2 commits into from
Jan 31, 2023

Conversation

joe-kimmel-vmw
Copy link
Contributor

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

  • Should this change be documented?
    • Yes, see #___
    • [ x] No -- imo this is a very niche case of interest primarily to lifecycle developers, but by all means let me know if i'm misunderstanding the use cases and/or the documentation needs of these valuable members of our community.

Related

Resolves #1091

@github-actions github-actions bot added the type/enhancement Issue that requests a new feature or improvement. label Jan 23, 2023
@github-actions github-actions bot added this to the 0.29.0 milestone Jan 23, 2023
@joe-kimmel-vmw joe-kimmel-vmw force-pushed the lifecyle-api-versions-check branch 2 times, most recently from aa80e11 to 7d6fbeb Compare January 23, 2023 20:59
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.

Signed-off-by: Joe Kimmel <jkimmel@vmware.com>
@joe-kimmel-vmw joe-kimmel-vmw force-pushed the lifecyle-api-versions-check branch from 7d6fbeb to cef80f6 Compare January 23, 2023 21:04
@codecov
Copy link

codecov bot commented Jan 23, 2023

Codecov Report

Merging #1607 (be5a709) into main (2e7e9b6) will decrease coverage by 0.97%.
The diff coverage is 79.32%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1607      +/-   ##
==========================================
- Coverage   80.59%   79.61%   -0.97%     
==========================================
  Files         156      156              
  Lines       10489    10544      +55     
==========================================
- Hits         8453     8394      -59     
- Misses       1534     1644     +110     
- Partials      502      506       +4     
Flag Coverage Δ
os_linux 79.40% <79.32%> (+0.03%) ⬆️
os_macos 77.42% <79.32%> (-0.02%) ⬇️
os_windows 79.53% <79.32%> (-0.97%) ⬇️
unit 79.61% <79.32%> (-0.97%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@joe-kimmel-vmw joe-kimmel-vmw marked this pull request as ready for review January 23, 2023 21:19
@joe-kimmel-vmw joe-kimmel-vmw requested review from a team as code owners January 23, 2023 21:19
Copy link
Member

@natalieparellano natalieparellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, amazing work @joe-kimmel-vmw! Thank you for the contribution 😸

@jkutner jkutner enabled auto-merge January 31, 2023 17:40
@jkutner jkutner merged commit 66fa019 into buildpacks:main Jan 31, 2023
@joe-kimmel-vmw joe-kimmel-vmw deleted the lifecyle-api-versions-check branch February 8, 2023 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect the right version of platform api to use
3 participants