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
Implement waitUntilCondition #989
Comments
Hi @iocanel, Right now we have this functionality in client,
So the requirement is something like
Or
Like is the way I am thinking is fine or you have something else as a prototype. I am assuming that user will provide the condition. This may be wrong also. Please guide the way this needs to be done. Thanks |
I would put it slightly different: At the moment we have:
There are people asking to add things like:
and
So, this issue actually proposes that instead of copying the same mechanism to 3 or more similar methods, to expose it as a generic method:
The all the rest For instance
|
@iocanel Thanks for your input. As explained above, lambda expressions can be used in Java 8 but our client is in Java 7. Either we need to move to Java 8 or we can use Functional Interface, in that case, the user needs to implement the function, that does not seem to be a good way to do that. @iocanel Can you provide more thoughts on this or Am I proceeding in some wrong direction? Thanks |
if we want to stick with java7 we can use the Function class that comes with the kubernetes-model (inside the builder package). Of course, in this case there will be no lambda support. I'd rather see us moving to java8 though. |
I will start working on this |
@iocanel @rohanKanojia wdyt about updating the major version and move to Java 8 ? A bit similar as we do for fmp where we also moved to Java 8 ? For sure we should skip Java 7 support asap, as they world finally fully embraced Java 8 and is moving quickly to Java 11 as it seems. |
Ah, sorry my bad. haven't checked the date and project state and tried to answer #989 (comment) I need more coffee .... |
Currently we have the
waitUntilReady()
functionality, which uses a hybrid approach with polling periodically and watches. This works great but it doesn't cover all our needs. Fro example what about waiting for builds or jobs or anything.I'd like us to introduce a new method on all resources called
waitUntil
that will accept and argument, possibly something like aFunction<KubernetesResource, Boolean>
which is going to return true when the condition is meet.Then
waitUntilReady
should be build on top of that.The text was updated successfully, but these errors were encountered: