Check App CR creation when CreateInstalledPackage #3970
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
This PR simply adds a polling mechanism (interval/timeouts are harcoded, but could be split out into separate params if required) before sending OK when creating an installed package.
Benefits
Since the App CR has to be created by kapp automatically before something can be considered as "installed", this active wait will ensure the App is present in the cluster; that is, no more UI errors after accessing to the installed view.
Possible drawbacks
Can't think of; I mean, if the App CR is not created... that means something is wrong, so we better catch this error when executing the creation operation.
Applicable issues
Additional information
I want to DRY the tests up. Now we have the whole test suite and know what we need, we can refactor it and reduce the number of lines for creating the data. But it should be a follow-up PR (I've added it as a pending thing in the parent task).
It is possibly my last PR of the year before going on PTO 馃尨 馃槃