-
Notifications
You must be signed in to change notification settings - Fork 297
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
Allow the build to proceed with /cnb/lifecycle/creator when the order contains extensions #1983
Conversation
… contains extensions The creator will error if the detected group contains extensions, but if no extensions detect then the build can proceed and potentially succeed. This avoids end-user headaches when popular builders contain extensions (see buildpacks/community#244) but the extensions don't detect by default (and hence using the creator is just fine). Signed-off-by: Natalie Arellano <[email protected]>
@@ -281,7 +281,7 @@ func (l *LifecycleExecution) Run(ctx context.Context, phaseFactoryCreator PhaseF | |||
return l.Export(ctx, buildCache, launchCache, kanikoCache, phaseFactory) | |||
} | |||
|
|||
if l.platformAPI.AtLeast("0.10") && l.hasExtensions() { | |||
if l.platformAPI.AtLeast("0.10") && l.hasExtensions() && !l.opts.UseCreatorWithExtensions { | |||
return errors.New("builder has an order for extensions which is not supported when using the creator") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can improve the error message to give some guidance to end-users on what's going on or what they can do to fix it.. maybe a link to some documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion - I updated the error message in c351409
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Natalie Arellano <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1983 +/- ##
==========================================
+ Coverage 79.51% 79.52% +0.01%
==========================================
Files 174 174
Lines 13074 13077 +3
==========================================
+ Hits 10395 10398 +3
Misses 2016 2016
Partials 663 663
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: Juan Bustamante <[email protected]>
Signed-off-by: Juan Bustamante <[email protected]>
(Note that this will have no effect until there is a lifecycle 0.19.0 - but, we can prepare for it now)
The creator will error if the detected group contains extensions, but if no extensions detect then the build can proceed and potentially succeed.
This avoids end-user headaches when popular builders contain extensions (see buildpacks/community#244) but the extensions don't detect by default (and hence using the creator is just fine).
Related lifecycle PR: buildpacks/lifecycle#1246