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

Remove assumption of toml in variables factor #2676

Closed
wants to merge 4 commits into from
Closed

Conversation

rylev
Copy link
Collaborator

@rylev rylev commented Jul 23, 2024

Mirrors other factors in that it is not tied to a specific layout in toml for runtime configuration.

@rylev rylev requested a review from lann July 23, 2024 10:17
@@ -31,7 +31,7 @@ async fn disallowed_host_fails() -> anyhow::Result<()> {
networking: OutboundNetworkingFactor,
pg: OutboundPgFactor,
};
factors.variables.add_provider_type(StaticVariables)?;
factors.variables.add_provider_resolver(StaticVariables)?;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're using resolver for two types of resolution now: variable resolution and runtime config resolution. Both of these usages have precedence in other places so it's hard to make an argument for getting rid of one or the other. I personally don't find it confusing, but I've also been staring at this code for a while...

Copy link
Collaborator

@lann lann Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be in favor of using a different name here even if it's a little less obvious than "resolver".

Maybe we could pick a name for this general pattern of delegating from a factor to one of several impls like "subfactors"?

Signed-off-by: Ryan Levick <[email protected]>
Signed-off-by: Ryan Levick <[email protected]>
@rylev
Copy link
Collaborator Author

rylev commented Jul 29, 2024

Closed in favor of #2685

@rylev rylev closed this Jul 29, 2024
@rylev rylev deleted the untoml-variables branch July 29, 2024 13:00
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

Successfully merging this pull request may close these issues.

2 participants