-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Change StepsRunner to be more of a builder to prepare for assigning Allocations. #1312
Conversation
jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/builder/BuildSteps.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java
Outdated
Show resolved
Hide resolved
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.
IMHO, in this case, I think it's easier to understand when passing StepsRunner
instead of a (basically) Callable
(I mean ImageBuildRunnable
). Using Callable
makes sense if you need to invoke some logic later, but knowing that by design having a StepsRunner
instance does not kick off running its steps, it is sort of like StepsRunner
embeds a Callable
in itself, so I think it's OK to have a separate "run" method in StepsRunner
(like the previous runStepsRunners()
). I think this will almost feel like StepsRunner
is implementing Callable
. Then BuildSteps
could just call the "run" method.
Part of #1297
This defers running the steps till the end and allows for
StepsRunner
to know how many steps there are before running them all.