-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Elastic Agent] Pick up version from libbeat #18350
[Elastic Agent] Pick up version from libbeat #18350
Conversation
Pinging @elastic/ingest-management (Team:Ingest Management) |
go.sum
Outdated
@@ -221,6 +221,7 @@ github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= | |||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= | |||
github.com/eclipse/paho.mqtt.golang v1.2.1-0.20200121105743-0d940dd29fd2 h1:DW6WrARxK5J+o8uAKCiACi5wy9EK1UzrsCpGBPsKHAA= | |||
github.com/eclipse/paho.mqtt.golang v1.2.1-0.20200121105743-0d940dd29fd2/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= | |||
github.com/elastic/beats v7.6.2+incompatible h1:jHdLv83KURaqWUC6f55iMyVP6LYZrgElfeqxKWcskVE= |
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.
oops
💚 Build SucceededExpand to view the summary
Build stats
|
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.
Code looks good.
I am curious why it's rather different than all the other beats, at least from what I can tell. Seems that the other beats get this with libbeat/cmd.GenVersionCmd
, could we just change to using that instead for consistency.
we started out in a separate repo without libbeat so we implemented everything from scratch without dependencies we dont need. even this small version command instantiates a beat Instance,something agent does not use. |
@blakerouse We have instead started out outside of beats and we wanted minimal dependencies on libbeat, after a few iterations maybe this was not the best decision because. We should try to converge on beats on behavior. Its something we should discuss moving forward. One thing that might also happens is us to move to a separate repository. |
x-pack/elastic-agent/magefile.go
Outdated
fmt.Sprintf(`-X "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/release.buildTime=%s"`, ts), | ||
fmt.Sprintf(`-X "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/release.commit=%s"`, commitID), | ||
fmt.Sprintf(`-X "github.com/elastic/beats/v7/libbeat/version.buildTime=%s"`, ts), | ||
fmt.Sprintf(`-X "github.com/elastic/beats/v7/libbeat/version.commit=%s"`, commitID), | ||
fmt.Sprintf(` -X "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/release.snapshot=%s"`, isSnapshot), |
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 we really need this now? I would assume this would be handled by the libbeat part?
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.
you're right i will try it to make sure
brought even with libbeat which removed the ability to override version using dev subcommand, i dont think we need that anymore with restrictions from kibana removed |
@michalpristas I think this breaks the packaging?
|
@ph LDFlags vs Vars sorry, fixed |
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.
LGTM I have added need_backport
, we should backport it to the 7.x and 7.8 but the 7.8 is frozen and I don't think it's worth the risk to merge it to 7.8 because it impacts the packaging.
[Elastic Agent] Pick up version from libbeat (elastic#18350)
…w-oss * upstream/master: (27 commits) Disable host fields for "cloud", panw, cef modules (elastic#18223) [docs] Rename monitoring collection from legacy internal collection to legacy collection (elastic#18504) Introduce auto detection of format (elastic#18095) Add additional fields to address issue elastic#18465 for googlecloud audit log (elastic#18472) Fix libbeat import path in seccomp policy template (elastic#18418) Address Okta input issue elastic#18530 (elastic#18534) [Ingest Manager] Avoid Chown on windows (elastic#18512) Fix Cisco ASA/FTD msgs that use a host name as NAT address (elastic#18376) [CI] Optimise stash/unstash performance (elastic#18473) Libbeat: Remove global loggers from libbeat/metric and libbeat/cloudid (elastic#18500) Fix PANW bad mapping of client/source and server/dest packets and bytes (elastic#18525) Add a file lock to the data directory on startup to prevent multiple agents. (elastic#18483) Followup to 12606 (elastic#18316) changed input from syslog to tcp/udp due to unsupported RFC (elastic#18447) Improve ECS field mappings in Sysmon module. (elastic#18381) [Elastic Agent] Cleaner output of inspect command (elastic#18405) [Elastic Agent] Pick up version from libbeat (elastic#18350) Update communitybeats.asciidoc (elastic#18470) [Metricbeat] Change visualization interval from 15m to >=15m (elastic#18466) docs: Fix typo in kerberos docs (elastic#18503) ...
[Elastic Agent] Pick up version from libbeat (elastic#18350)
What does this PR do?
For historical reasons we were keeping track of our version ourselves which creates overhead for releases. Picking up version from libbeat keeps us in par with other beats we're releasing with
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.