Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(kubernetes): Move generation checks to be object-specific (#4313)
* fix(kubernetes): Replace null status with false When the observed generation in the status does not match the object's generation, we set the stable and failed conditions to null. This should not be treated any differently than if the status generation did match but the object had not fully rolled out---it just means we need to wait a bit longer to see the new status. The recent changes to orca have explicitly made it so that from orca's perspective there is no different beteween stable/failed being null and stable/failed being false. Make things more clear (and null-safe) by removing the ability to null these conditions. * fix(kubernetes): Move generation checks to be object-specific We have a generic function in KubernetesManifest to determine whether the status generation is correct. It has a lot of type-safety and null-safety issues as it's operating on an untyped map. As each status handler already converts the manifest to a strongly-typed representation of its handled object, let's move the status checks to happen on that object. This in particular fixes some null-pointer issues that were documented in the tests. * test(kubernetes): Fix observed generation in stateful set test One of the stateful set tests incorrectly had the observed generation newer than the metadata one; fix this. * fix(kubernetes): Fix pod phase status reporting This was the last remaining TODO I had noted when adding tests to all of the handlers. * refactor(kubernetes): Pull unknown status to factory method We frequently create an unknown status with the same text; pull it up to a factory method so we don't keep repeating the same text. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
2c7c9cd
commit fe6cb54
Showing
15 changed files
with
148 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.