-
Notifications
You must be signed in to change notification settings - Fork 294
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
Add functionality for passing previous-image flag to analyzer #1275
Comments
I'm a bit stuck on what exactly the parameter for analyzer should be. For instance, in creator in #1198, we appended |
@importhuman I'm having trouble following the question as written. In #1198, you implemented the functionality with the following line of code here: ...
flags = append(flags, "-previous-image", l.opts.PreviousImage)
... The analyzer would thus require the same parameter: |
@aemengo yeah it does, I was initially thinking that creator already takes image as argument, so if analyzer also takes an argument, do I modify that or can I pass an extra parameter. I'll try appending the previous-image to args and make an initial PR. |
See buildpacks#897, buildpacks#1275 Signed-off-by: Ujjwal Goyal <importujjwal@gmail.com>
@importhuman Oh I understand now. Thank you for your patience with me, It's a good question. As @natalieparellano explained to us in this slack.buildpacks.io thread: analyzer already takes an argument so:
should become
And it makes sense because the analyzer phase is in fact looking for optimizations from the previous build of your application image. |
@aemengo so is the parameter to be changed |
@importhuman Ah. Well, I'm not quite so sure myself. There's an opportunity to learn here that I don't want to steal from you. 🙂 |
@aemengo that's fair I suppose 😂 looking at tests in |
This commit adds tests for passing previous-image to analyzer, with some modifications to the naming of earlier tests for passing the flag to creator. Also modifies "opts" to "Opts" in LifecycleExecution to make it accessible to the test; other changes maintain this change across the repository. Closes buildpacks#1275 Signed-off-by: Ujjwal Goyal <importujjwal@gmail.com>
See buildpacks#897, buildpacks#1275 Signed-off-by: Ujjwal Goyal <importujjwal@gmail.com>
This commit adds getters for lifecycle image and previous image, and updates the previous-image unit tests using them. Also reverts "Opts" to "opts" in LifecycleExecution across the repo where applicable (from an earlier commit). Closes buildpacks#1275 Signed-off-by: Ujjwal Goyal <importujjwal@gmail.com>
Description
#1198 added the previous-image flag to creator. According to #897, it needs to be added to analyzer as well.
Additional context
The text was updated successfully, but these errors were encountered: