--chaos should warn instead of error on recipe lint checks #497
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Deep in the hacking mines - it feels like the intention of specifying
--chaosshould turn recipe lint errors into warnings@3wordchant True!
The
LintForErrorslogic errors out on first linting error, would you like to see all errors turned into warnings and outputted? That might be a good change to make in general, to see all possible errors/warnings at once instead of running into them one by one?Altho, probably the simplest thing to do on the code side would be to warn and skip linting altogether when
--chaos. Unless you think it's handy & worth it to see your potential errors while--chaos'in ❔OK I think I have it, in
calix/497:Multi-line display of the linting errors is a little wacky, but functional. @decentral1se what do you reckon UI-wise?
Looking good @3wordchant! I'm not actually sure why we even do
lint error in test configs: ...? It seems like double logging since we have the line above it already? Sure do whatever is handiest on your side. I'll be happy to review whatever.Yeah, down to remove duplication. So you reckon the output should be like this (1):
Or like this (2):
Sorry, yeh this is going a bit into refactor territory... but all these outputs seem really noisy to me now that I see them again. No strong feelings on it though, so proceed as you see fit. I'm also looking into the code, I'm like of course saying to myself: "why did I do this" 😂
I was thinking why can it not just be:
So, just detect that there is a critical failure and fail without further duplicate logging. And actually, now that I look at
LintForErrorsinpkg/lint/recipe.go, I see that it bails out on the first error and doesn't show all the possible errors, so that could even be a bonus?Slipping out the backdoor now...
Because my output has two different lint errors:
Because you said:
And I thought "yes that would be neat".
I agree having 2x "failed lint checks" is nonideal, how about:
@3wordchant ah sorry, going in circles 😅 that bullet-point one looks legit!
OK makingitso
@decentral1se am I correct that we still want to just unconditionally bail in
upgradeandrollbackwhich have no--chaosoption?@3wordchant i believe so? If the code is doing that then probably that is what people expect 🤔