Closed tmckayus closed 4 years ago
@elmiko @jkremser ptal
This is to fix inifinite loops in SparkApplication and SparkHistoryServer caused by updates to the status block. They did not overload onModify from the super class, and so every status write caused "delete/add" to be done.
The tracking of existing objects is based on the RunningClusters code for the SparkCluster type, here we just have a local map so we can compare objects. The comparison works because the status blocks are not actually part of the formal types generated from the json, they are inserted directly into the CRDs in the AbstractOperator and so they exist outside of the internal SparkApplication and SparkHistoryServer classes.
this is kind of urgent, since the last build spark-operator image (1.0.5) has this bug for SparkApplication and SparkHistoryServer (SparkCluster is okay)/
TODO
comment in 05c53fdc874ec722f714793854c7a1f1bd6f0e64 in #283. cc @tmckayus.
Description
add overloads in SparkApplication and SparkHistoryServer for onModify and test whether the object has actually changed before calling the super method.
Types of changes
:bug: Bug fix (non-breaking change which fixes an issue)