Skip to content

AgentSettingsResolver cleanups and spec improvements#1931

Merged
ivoanjo merged 7 commits into
masterfrom
ivoanjo/agent-settings-resolver-cleanups
Mar 21, 2022
Merged

AgentSettingsResolver cleanups and spec improvements#1931
ivoanjo merged 7 commits into
masterfrom
ivoanjo/agent-settings-resolver-cleanups

Conversation

@ivoanjo

@ivoanjo ivoanjo commented Mar 7, 2022

Copy link
Copy Markdown
Member

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.

ivoanjo added 7 commits March 7, 2022 11:34
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
@ivoanjo

ivoanjo commented Mar 21, 2022

Copy link
Copy Markdown
Member Author

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

None yet

Development

Successfully merging this pull request may close these issues.

3 participants