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

buildACLConfigRoutersAndServices in pkg/provider/provider.go does not return an error #585

Open
dtomcej opened this issue May 15, 2020 · 1 comment

Comments

@dtomcej
Copy link
Contributor

dtomcej commented May 15, 2020

Feature Request

Proposal

upcoming buildACLConfigRoutersAndServices in pkg/provider/provider.go should return an error. The non-ACL version returns an error if it is unable to build config pieces.

Background

Consistent behaviour makes debugging easier.

@jspdown
Copy link
Contributor

jspdown commented May 19, 2020

The only reason why buildConfigRoutersAndServices returns an error is because it's checking if the traffic-type is something valid. buildACLConfigRoutersAndServices is checking that too but we can't interrupt the traffic-target loop on the first error we encounter. We still want to evaluate the configuration in a best effort fashion.

As a quick fix, I suggest we check the traffic-type and scheme once and for all as a first step when we process a service.
In the long run I would love to see this code being restructured. Right now it's just a bunch of functions which call other functions (really deep) without any appearing logic. If would be pleased have a conversation with you an @kevinpollet about how we could improve this structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants