Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erroneous condition for Trace/Metric/Log Pipelines evaluates to TLSCertificateInvalid by default #1571

Open
TeodorSAP opened this issue Oct 29, 2024 · 2 comments
Labels
area/logs LogPipeline area/metrics MetricPipeline area/traces TracePipeline good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.

Comments

@TeodorSAP
Copy link
Member

TeodorSAP commented Oct 29, 2024

Description
When there's an error returned within the status.go evaluateConfigGeneratedCondition function, if its type is not handled within the function, it gets by default handled by the conditions.EvaluateTLSCertCondition() function, which evaluates it to a TLSConfigurationInvalid error reason.

Criterias
Find some alternative method of defaulting the condition reason in case of error, maybe by introducing a new UnknownError reason, or something that would signal the developer that the specific error type is not handled anywhere, rather than setting it to TLSConfigurationInvalid and further confusing the developer.

Reasons

It's time-consuming during debugging to figure out what really happened in such a scenario, and might confuse customers as well if some unknown error reaches production, getting evaluated, handled, and alerted as a TLSConfigurationInvalid type of error.

Attachments

return conditions.EvaluateTLSCertCondition(err)

return metav1.ConditionFalse, ReasonTLSConfigurationInvalid, fmt.Sprintf(commonMessages[ReasonTLSConfigurationInvalid], errValidation)

Release Notes


@TeodorSAP TeodorSAP added kind/bug Categorizes issue or PR as related to a bug. area/logs LogPipeline area/metrics MetricPipeline area/traces TracePipeline labels Oct 29, 2024
@TeodorSAP TeodorSAP changed the title Default erroneous condition for Trace/Metric/Log Pipelines evaluates to TLSCertificateInvalid Erroneous condition for Trace/Metric/Log Pipelines evaluates to TLSCertificateInvalid by default Oct 29, 2024
@TeodorSAP TeodorSAP added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Oct 29, 2024
@cosmastech
Copy link

Would you suggest returning the new error (UnknownError) from evaluateConfigGeneratedCondition() or from EvaluateTLSCertCondition()?

@TeodorSAP
Copy link
Member Author

I think from evaluateConfigGeneratedCondition(), but we need to refactor the code accordingly. Sorry for the delay @cosmastech, I have not received any notification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logs LogPipeline area/metrics MetricPipeline area/traces TracePipeline good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants