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

Pass previous-image to analyzer #1279

Merged
merged 4 commits into from
Oct 22, 2021

Conversation

importhuman
Copy link
Member

See #897, #1275

Signed-off-by: Ujjwal Goyal importujjwal@gmail.com

Summary

Initial commit for passing previous-image to analyzer. I wasn't completely sure how to provide it to analyzer, so I've added it to the slice of arguments.

Documentation

  • Should this change be documented?
    • Yes
    • No

@importhuman importhuman requested a review from a team as a code owner September 9, 2021 17:53
@github-actions github-actions bot added the type/enhancement Issue that requests a new feature or improvement. label Sep 9, 2021
@github-actions github-actions bot added this to the 0.22.0 milestone Sep 9, 2021
@codecov
Copy link

codecov bot commented Sep 9, 2021

Codecov Report

Merging #1279 (8b39564) into main (9dd9f8f) will decrease coverage by 0.90%.
The diff coverage is 86.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1279      +/-   ##
==========================================
- Coverage   81.07%   80.18%   -0.89%     
==========================================
  Files         143      143              
  Lines        8737     8760      +23     
==========================================
- Hits         7083     7023      -60     
- Misses       1216     1281      +65     
- Partials      438      456      +18     
Flag Coverage Δ
os_linux 78.76% <86.96%> (-0.92%) ⬇️
os_macos 76.01% <86.96%> (-0.88%) ⬇️
os_windows 80.07% <86.96%> (-0.89%) ⬇️
unit 80.18% <86.96%> (-0.89%) ⬇️

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

Copy link
Member

@dfreilich dfreilich left a comment

Choose a reason for hiding this comment

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

Thanks for the help, @importhuman! This looks super neat.

Can you just validate this with a unit test? 🚀

@importhuman
Copy link
Member Author

importhuman commented Sep 14, 2021

@dfreilich yup, tests are still to come!

@importhuman
Copy link
Member Author

@dfreilich just to confirm, we don't need to do anything in this PR to check if the builder is trusted or not, correct?
Based on this slack thread

@importhuman
Copy link
Member Author

I'll check if any more tests are required in internal/commands/build_test.go

See buildpacks#897, buildpacks#1275

Signed-off-by: Ujjwal Goyal <importujjwal@gmail.com>
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>
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>
@importhuman
Copy link
Member Author

@jromero implemented it like you said, and have reverted the changes I'd made earlier from LifecycleExecution.

@importhuman
Copy link
Member Author

@buildpacks/platform-maintainers can you please let me know if something else is needed?

@jromero jromero self-assigned this Oct 20, 2021
@jromero
Copy link
Member

jromero commented Oct 22, 2021

Apologies for the delay. LGTM.

@jromero jromero merged commit 8f7dc19 into buildpacks:main Oct 22, 2021
@jromero
Copy link
Member

jromero commented Oct 22, 2021

🙏 Thank you for the contribution! Keep it up!

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.

3 participants