squakez commented on issue #6943: URL: https://github.com/apache/camel-k/issues/6943#issuecomment-6851787203
I think the behavior described makes sense, at least, from the original design point of view. We don't expect a deployment update to fail, if it fails it's because there is some problem likely at kube level. However, we should question ourselves if any error happening at that level is something we should raise in order to stop completely any further post-action. With the actual design, a "post-action" is a generic func, so, we don't have a way to understand if the error is fatal, like it seems to be for the deployer func. We could introduce a flag to mark it and stop the processing. However, this would pose another important situation as we may be in an inconsistent status as the deployer may have already updated partially the list of resources. In definitive, I think the work we have is compliant with how Kubernetes declarative way works. If we try to update resources with a given new generation, and those are suffering some platform problem, then we will report it. Even if we stop the execution we'll be in a potential inconsistent status, which I believe may be even worse as it could swallow some important inconsistency. A way to solve this could be for the deployer func to track the status of any previous resource and rollback in case a failure happen in the middle. In that case we can track the post action func as fatal and stop any further post action to avoid the gc to kick in. In that case the error should also be reported up and clarify that the Integration upgrade did not go through, but the application is still running with the previous generation. WDYT? It sounds a bit challenging development, but if you want to give it a try, feel free to issue a draft PR so we can reason around it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
