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

[8.15](backport #40324) use go-sysinfo v1.14.1 and elastic-agent-system-metrics v0.10.6 #40523

Closed
wants to merge 15 commits into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 14, 2024

Proposed commit message

use go-sysinfo v1.14.1 and elastic-agent-system-metrics v0.10.6

go-sysinfo was lower-casing FQDN by default, this new version does not. Not its user should do it if necessary. elastic-agent-system-metrics is also upgraded to a version that lowercase the FQDN when it's used as host.name

Checklist

  • My code follows the style guidelines of this project
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

It might cause the FQDN or anything using it to be reported with mixed case instead of lower case

How to test this PR locally

The same idea as described on #39993
Ingest data, ensure the host metadata is added and check them on kibana

Screenshots

Screenshot from 2024-07-23 18-11-13


This is an automatic backport of pull request #40324 done by Mergify.

Related issues

* use go-sysinfo v1.14.1 and elastic-agent-system-metrics v0.10.6

go-sysinfo was lower-casing FQDN by default, this new version does not. Not its user should do it if necessary. elastic-agent-system-metrics is also upgraded to a version that lowercase the FQDN when it's used as `host.name`

(cherry picked from commit a4568f9)

# Conflicts:
#	go.mod
#	go.sum
@mergify mergify bot requested review from a team as code owners August 14, 2024 14:05
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Aug 14, 2024
@mergify mergify bot requested review from mauri870 and leehinman and removed request for a team August 14, 2024 14:05
Copy link
Contributor Author

mergify bot commented Aug 14, 2024

Cherry-pick of a4568f9 has failed:

On branch mergify/bp/8.15/pr-40324
Your branch is up to date with 'origin/8.15'.

You are currently cherry-picking commit a4568f918c.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   CHANGELOG.next.asciidoc
	modified:   NOTICE.txt
	modified:   libbeat/cmd/instance/beat.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   go.mod
	both modified:   go.sum

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 14, 2024
@AndersonQ AndersonQ enabled auto-merge (squash) August 15, 2024 07:46
@AndersonQ AndersonQ added Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team and removed needs_team Indicates that the issue/PR needs a Team:* label conflicts There is a conflict in the backported pull request labels Aug 15, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

Copy link
Contributor Author

mergify bot commented Aug 15, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b mergify/bp/8.15/pr-40324 upstream/mergify/bp/8.15/pr-40324
git merge upstream/8.15
git push upstream mergify/bp/8.15/pr-40324

@cmacknz
Copy link
Member

cmacknz commented Aug 15, 2024

This is a sort of maybe breaking change even though it makes us ECS compliant. Putting it in a patch release might surprise some people.

@pierrehilbert is there a reason we can't just let this go out in 8.16 instead?

@fearful-symmetry
Copy link
Contributor

fearful-symmetry commented Aug 15, 2024

@cmacknz the justification here is that #40507 needs the update to elastic-agent-system metrics, but elastic-agent-system-metrics contains a breaking change that's fixed by this PR. I figured it would be better to just backport this PR than re-implement that portion that allows us to update elastic-agent-system metrics, but if you disagree I can just copy-and-paste the handful of lines in beats.go into #40507

@AndersonQ AndersonQ disabled auto-merge August 15, 2024 14:39
@cmacknz
Copy link
Member

cmacknz commented Aug 15, 2024

Yeah we frequently have to backport system metrics updates to get updates that mitigate CVEs so coupling breaking changes into them is a pain.

It looks like the original PR would have made 8.15.0 if we had backported at the same time it merged to main and we just missed it. I don't think we should put potential breaking changes in patch releases.

Let's add a flag to opt in to the lowercasing, and set it to false in 8.15 and true on main. That gets around this problem (alternative solutions with the same result also work for me).

Copy link
Member

@cmacknz cmacknz left a comment

Choose a reason for hiding this comment

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

Requesting changes since I don't think we want approved breaking changes in patch releases.

Copy link
Contributor Author

mergify bot commented Aug 19, 2024

This pull request has not been merged yet. Could you please review and merge it @AndersonQ? 🙏

Copy link
Contributor Author

mergify bot commented Aug 21, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b mergify/bp/8.15/pr-40324 upstream/mergify/bp/8.15/pr-40324
git merge upstream/8.15
git push upstream mergify/bp/8.15/pr-40324

@AndersonQ
Copy link
Member

Yeah we frequently have to backport system metrics updates to get updates that mitigate CVEs so coupling breaking changes into them is a pain.

It looks like the original PR would have made 8.15.0 if we had backported at the same time it merged to main and we just missed it. I don't think we should put potential breaking changes in patch releases.

Let's add a flag to opt in to the lowercasing, and set it to false in 8.15 and true on main. That gets around this problem (alternative solutions with the same result also work for me).

not the most elegant solution, but it fixes the problem with minimal changes and impact:

* use go-sysinfo v1.14.1 and elastic-agent-system-metrics v0.10.6

go-sysinfo was lower-casing FQDN by default, this new version does not. Not its user should do it if necessary. elastic-agent-system-metrics is also upgraded to a version that lowercase the FQDN when it's used as `host.name`

(cherry picked from commit a4568f9)

# Conflicts:
#	go.mod
#	go.sum
@AndersonQ AndersonQ requested review from a team as code owners August 23, 2024 14:52
Copy link
Contributor Author

mergify bot commented Aug 26, 2024

This pull request has not been merged yet. Could you please review and merge it @AndersonQ? 🙏

Copy link
Contributor Author

mergify bot commented Aug 27, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b mergify/bp/8.15/pr-40324 upstream/mergify/bp/8.15/pr-40324
git merge upstream/8.15
git push upstream mergify/bp/8.15/pr-40324

@AndersonQ
Copy link
Member

closing it as elastic/go-sysinfo#236 was closed

@AndersonQ AndersonQ closed this Aug 30, 2024
@mergify mergify bot deleted the mergify/bp/8.15/pr-40324 branch August 30, 2024 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants