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

Hygienic errors for connectors with tls configuration sections #1983

Open
darach opened this issue Sep 23, 2022 · 4 comments
Open

Hygienic errors for connectors with tls configuration sections #1983

darach opened this issue Sep 23, 2022 · 4 comments
Labels
bug Something isn't working connector Connectors productivity usability

Comments

@darach
Copy link
Member

darach commented Sep 23, 2022

Problem

Bad configuration for the tls field in connector configuration such as:

"tls": "true" // should be a boolean not string encoded

Resulting in the confusing termination and error:

2022-09-23T07:16:29.206050376+00:00 ERROR tremor::server - We are SHUTTING DOWN due to errors during initialization!
Error: An error occurred while loading the file `/etc/tremor/config/main.troy`: Error deploying Flow main: data did not match any variant of untagged enum Either
We are SHUTTING DOWN due to errors during initialization!

This is not hygienic and is bad user experience.

Possible Solution(s)

Provide a hygienic error when "tls" is neither bool nor a valid tls record. The check should be coded defensively
and applied to all connectors that have a tls section.

Note

Discovered by a novice tremor production user and the error was very puzzling for them!

@darach darach added bug Something isn't working good first issue Good for newcomers hacktoberfest usability productivity _complexity:low A task with a low complexity that should be easy to understand _size:small A small task that should be quick to do connector Connectors labels Sep 23, 2022
@vishal-chdhry
Copy link

/assign

@0xquark
Copy link
Contributor

0xquark commented Jan 25, 2023

Hey @darach and @Licenser, I came across this issue and it caught my attention. I would love to contribute and work on it. Could you provide more information and guidance on where exactly the check needs to be performed?

@Licenser
Copy link
Member

Heya,

sure thing, a fair warnings so I think the issue got miss tagged it's probably not simple or small.

The underlying "problem" here is that when we parse the definition for the TLS configuration serde doesn't provide a helpful error. To be fair it's not serdes fault either since it doesn't know the context which is what makes it so tough

Error deploying Flow main: data did not match any variant of untagged enum Either

kind of doesn't provide much information to the user.

I'm not 100% sure how to handle this to be honest so it'd require a fair bit of R&D to come up with a solution.

That all said if you're up to jumping into something more complex happy to help :)

@Licenser Licenser removed good first issue Good for newcomers hacktoberfest _complexity:low A task with a low complexity that should be easy to understand _size:small A small task that should be quick to do labels Jan 26, 2023
@0xquark
Copy link
Contributor

0xquark commented Jan 28, 2023

Hey @Licenser, I am currently working on another issue ( stdlib url one ). I'll like to give this issue a try once i fix the one which i am working on. Thanks for the information :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working connector Connectors productivity usability
Projects
None yet
Development

No branches or pull requests

4 participants