Open dexhorthy opened 10 months ago
I believe this is related to https://github.com/replicatedhq/troubleshoot/issues/1312
Analysis will fail if the analyser given is deemed non-existent, say it has been misspelled, or the binary executing the analysis is old and does not include the implementation of the given analyser
Describe the rationale for the suggested feature.
Right now, simple YAML errors like missing an indent result in
nonexistent analyzer
errors.Describe the feature
I picked up some code and ran support-bundle, only to find that It output
nonexistent analyzer
The code in the file is
but should be
Proposal: Detect likely format errors To whatever extent we can, which may be "not much", try to hint that this may be a yaml/parse error when the body of an analyzer evaluates to
null
.A proposed error message might look like
Proposal: Strict format requirements it seems like the YAML parser that consumes the list element evaluates to
distribution = nil
and then just drops theoutcomes
block on the floor since it can't be unmarshalled onto any known struct field of type Analyze. Y'all could consider failing or warning whenever unrecognized fields are provided, but this has some backwards-compatibility issues and probably needs some kind ofstrict-parsing
opt-in. For example in the actual failed analyzer UI, could show something likeDescribe alternatives you've considered
I suppose I could make fewer yaml mistakes 😅
Additional context