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.
This PR fixes some errors in error handling. I found it when testing other changes and in fact we have 3 fixes here:
onFailedAttempt
which is run every after failed attempt.pRetry
does not retry afterTypeError
s so I rethrow any activation errors as generic ones (and why it is important see next point).TypeError: Cannot read properties of undefined (reading 'addSchema')
. When retried, it worked fine (that's way previous point). But more interestingly, this issue is a bit puzzling, it was caused by the fact that when validation was run, it tried to loadprometheus
schema (K8s schema plugin) viaajv
butajv
instance was not initialized yet (thusCannot read properties of undefined (reading 'addSchema')
forthis.ajv.addSchema...
erro) from here https://github.com/kubeshop/monokle-core/blob/f1c616d6dec28f74d9ca6005be1a8fdade4fc2b3/packages/validation/src/validators/kubernetes-schema/validator.ts#L118). My assumption was that it should load automatically on first validation run (should it?), if yes it seems there might be an issue in core somewhere (will report a task there then) 🤔Changes
Fixes
Checklist