feat: --skip-appset-generation-errors to tolerate ungeneratable ApplicationSets - #453
Conversation
|
Hi again @szhekpisov-katanox :) I do not doubt that this can be a real problem, but would you mind sharing a concrete ApplicationSet example that fails when running this tool? In my experience, most generators that do not find anything simply generate zero Applications instead of returning an error. That would make it much easier to understand the failure type and add an integration test for it later. |
The GitHub |
|
Again, thank you so much for the effort and thoughts you have put into your PRs. I really like when people are willing to discuss this tool with me! That is the only way we can make it better. I have been thinking a bit about this feature. My overall philosophy is that I want users to trust the tool and never feel like: "Why didn't it catch that???". In general, I would rather be pessimistic when filtering Applications and so on. Better to render too many Applications than accidentally miss one. I want to avoid false negatives at basically all cost. I believe this builds trust in the tool, even if it makes the tool a bit slower or some features a bit more cumbersome. With that in mind, I usually prefer not to create any kind of So in general, I would always suggest that people add However, if we know that there are certain Applications/ApplicationSets that are problematic, then we should maybe add a flag (or simply make it the default) that ignores errors for that type of Application. For example, it might be a good idea to always skip ApplicationSet What do you think? :) Let me know if there are other cases we need to handle, or if you have other examples of problematic ApplicationSets that we may need to handle. Otherwise, we may simply end up creating the |
|
Hi @dag-andersen! Thank you for your response on that. So far the And I agree, making exclusion specific makes sense to me — let's drop this PR then. The only thing I would suggest in that case is to add a hint in the error: if an ApplicationSet like the one above fails, it can simply be excluded from evaluation with the |
Adds
--skip-appset-generation-errors(defaultfalse). When enabled, an ApplicationSet that fails to generate logs a warning and is skipped instead of aborting the whole run.This is useful for ApplicationSets whose generators need cluster secrets or live data that isn't available in the ephemeral cluster — e.g.
pullRequest/scmProvidergenerators — which would otherwise fail the entire diff.Split out of #452 per review.