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

Inconsistent use of nullable fields in config #531

Closed
Tratcher opened this issue Nov 10, 2020 · 2 comments · Fixed by #596
Closed

Inconsistent use of nullable fields in config #531

Tratcher opened this issue Nov 10, 2020 · 2 comments · Fixed by #596
Labels
help wanted We will welcome a contribution Type: Clean-Up Clean-up task that applies to shipping code but doesn't affect behavior.

Comments

@Tratcher
Copy link
Member

Tratcher commented Nov 10, 2020

The config classes like Cluster are inconsistent about the use of nullable fields.

public bool DangerousAcceptAnyServerCertificate { get; set; } = true;
public X509Certificate2 ClientCertificate { get; set; }
public int? MaxConnectionsPerServer { get; set; }

This makes it hard for the various parts of the implementation to tell if they're being given a default value or if the user actually specified that value. Since many parts of the implementations are supposed to be replaceable components, it would help if they could distinguish so they could provide their own defaults while still respecting explicit user config.

Proposal: Make most/all config fields nullable and only specify the default in the implementations.

@Tratcher Tratcher added the Type: Idea This issue is a high-level idea for discussion. label Nov 10, 2020
@karelz karelz added Type: Enhancement New feature or request Type: Clean-Up Clean-up task that applies to shipping code but doesn't affect behavior. and removed Type: Idea This issue is a high-level idea for discussion. Type: Enhancement New feature or request labels Dec 3, 2020
@karelz karelz added this to the YARP 1.0.0 milestone Dec 3, 2020
@karelz
Copy link
Member

karelz commented Dec 3, 2020

Triage: Affects base object model, therefore v1

@karelz karelz added the help wanted We will welcome a contribution label Dec 3, 2020
@karelz
Copy link
Member

karelz commented Dec 3, 2020

Should be fairly straightforward to do ... we would welcome help here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We will welcome a contribution Type: Clean-Up Clean-up task that applies to shipping code but doesn't affect behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants