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

AgentSettingsResolver cleanups and spec improvements #1931

Merged
merged 7 commits into from
Mar 21, 2022

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Mar 7, 2022

I'm working on a change to the AgentSettingsResolver and decided to extract these cleanups/fixes out of that branch to make it easier to review and have them merged sooner.

See the individual commits for details on each change.

Note that this PR does not change any observable behavior.

Because we know that the result of `try_parsing_as_integer` is
always going to be used to create a `DetectedConfiguration`, let's do
that directly, rather than requiring the caller to take an extra hop.
Previously, we had specs for the port priority spread out which made
it hard to change priority or add new items.

By extracting the priority to a single set of specs, it's clear
what the entire priority is, and there's a single place to change
and add to it.
This mirrors the same refactor that was done to the port specs:
rather than having the host spec priority specs spread out, we have
a single set of specs that validate the priority.
@delner delner added core Involves Datadog core libraries dev/refactor Involves refactoring existing components labels Mar 18, 2022
@delner delner added this to the 1.0.0.beta2 milestone Mar 18, 2022
@delner delner added this to Reviewer approved in 1.0 Mar 18, 2022
@ivoanjo
Copy link
Member Author

ivoanjo commented Mar 21, 2022

I thank thee for thee reviews! Merging ^^

@ivoanjo ivoanjo merged commit c0bca5a into master Mar 21, 2022
@ivoanjo ivoanjo deleted the ivoanjo/agent-settings-resolver-cleanups branch March 21, 2022 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries dev/refactor Involves refactoring existing components
Projects
1.0
Reviewer approved
Development

Successfully merging this pull request may close these issues.

None yet

3 participants