-
Notifications
You must be signed in to change notification settings - Fork 88
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
Do not lower-case FQDN #231
Conversation
Complying with ECS for `host.name` and `host.hostname` (https://www.elastic.co/guide/en/ecs/current/ecs-host.html#field-host-name) should not be handled by go-sysinfo. The users of go-sysinfo should ensure compliance with ECS if necessary.
576a5a9
to
51b1697
Compare
.changelog/231.txt
Outdated
@@ -0,0 +1,4 @@ | |||
```release-note:enhancement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```release-note:enhancement | |
```release-note:breaking-change |
I would consider this to be breaking.
@AndersonQ while testing did you check that:
|
Yes, I did: |
@andrewkroh do you think it's worth adding a flag to choose to have FQDN lower-cased or not? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think it's worth adding a flag to choose to have FQDN lower-cased or not?
No, as long as this library is clear through godocs that it is leaving the value in its original format without any normalization. Going forward we'll keep the library unopinionated on hostname formats.
.changelog/231.txt
Outdated
@@ -0,0 +1,4 @@ | |||
```release-note:breaking-change | |||
The FQDN is returned as is, it isn't lowercased anymore. This reverts https://github.com/elastic/go-sysinfo/pull/180. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please specify the affected parts of the library. As a library consumer I would want to know that the value in types.HostInfo#Hostname
and the response from FQDN()
/FQDNWithContext()
are affected. It makes it easier to audit if you are affected.
IMO we could entirely omit mentions of ECS. It would suffice to say that if you want to retain the old behavior that it is your responsibility to lowercase the values.
This PR reverts #180
Complying with ECS for
host.name
andhost.hostname
(https://www.elastic.co/guide/en/ecs/current/ecs-host.html#field-host-name) should not be handled by go-sysinfo. The users of go-sysinfo should ensure compliance with ECS if necessary.Relates to elastic/beats#39993