Skip to content

feat: validate observe-agent config instead of simply parsing the yaml #115

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

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

obs-gh-mattcotter
Copy link
Collaborator

Description

OB-31850 Add validation of observe-agent config on top of simple YAML parsing.

Checklist

  • Created tests which fail without the change (if possible)
  • Extended the README / documentation, if necessary

{{- if .Passed }}
Config file is valid YAML.
Copy link
Collaborator

Choose a reason for hiding this comment

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

feels like if it errors for invalid yaml vs. erroring for failing validation those should be reflected separately in the template

"strings"
)

type HostMonitoringLogsConfig struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

a lot of these I defined already in https://github.com/observeinc/observe-agent/blob/main/internal/commands/initconfig/configschema.go i like it being in config/configschema.go can you remove the definitions I have then and rework those references?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did that! internal/commands/initconfig/configschema.go is removed in this diff (not sure why git didn't register it as a move).

Base automatically changed from OB-37310-config-as-templates to main October 28, 2024 16:53
@obs-gh-mattcotter obs-gh-mattcotter force-pushed the OB-31850-diagnose-config-issues branch from 966ba0d to a200f55 Compare October 28, 2024 16:54
@obs-gh-mattcotter obs-gh-mattcotter merged commit dadc4ec into main Oct 28, 2024
8 checks passed
@obs-gh-mattcotter obs-gh-mattcotter deleted the OB-31850-diagnose-config-issues branch October 28, 2024 17:28
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