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

Agentbeat: remove unused files from package and silence new error message #39064

Merged
merged 4 commits into from Apr 23, 2024

Conversation

cmacknz
Copy link
Member

@cmacknz cmacknz commented Apr 18, 2024

Removes the individual beat configuration files and the README from the agentbeat package. Beats don't read their configuration files when running under agent since 8.6, and the README is wrong for agentbeat (but not the other beats it is templated for).

I also silenced a new error log I noticed that results because the modules sub-directory is no longer present.

The package contents after this change are:

❯ ls agentbeat-8.15.0-darwin-aarch64/
LICENSE.txt           agentbeat             certs                 osquery-extension.ext
NOTICE.txt            agentbeat.spec.yml    lenses                osquery.app

The certs and lenses directories are osquery specific.

What is included in an 8.14.0 agent is (Notice the presence of the readme and beat config files):

❯ ls elastic-agent-8.14.0-SNAPSHOT-darwin-aarch64/data/elastic-agent-883cf0/components
LICENSE.txt                     checksum.yml                    heartbeat.yml
NOTICE.txt                      endpoint-security               lenses
README.md                       endpoint-security-resources.zip metricbeat.yml
agentbeat                       endpoint-security.spec.yml      osquery-extension.ext
agentbeat.spec.yml              filebeat.yml                    osquery.app
auditbeat.yml                   fleet-server                    osquerybeat.yml
certs                           fleet-server.spec.yml           packetbeat.yml

Tested by extracting the new package into the components directory of a new agent and making sure the Beats start. I don't know that we have a better way to test agentbeat in this repository yet.

Beats no longer reads config files at startup when run as part of agent.
@cmacknz cmacknz added the Team:Elastic-Agent Label for the Agent team label Apr 18, 2024
@cmacknz cmacknz requested a review from blakerouse April 18, 2024 20:29
@cmacknz cmacknz self-assigned this Apr 18, 2024
@cmacknz cmacknz requested a review from a team as a code owner April 18, 2024 20:29
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Apr 18, 2024
Copy link
Contributor

mergify bot commented Apr 18, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @cmacknz? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@cmacknz cmacknz added the backport-v8.14.0 Automated backport with mergify label Apr 18, 2024
@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 18, 2024

💔 Build Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2024-04-22T15:55:25.740+0000

  • Duration: 171 min 0 sec

Test stats 🧪

Test Results
Failed 0
Passed 29392
Skipped 2061
Total 31453

Steps errors 3

Expand to view the steps failures

libbeat-goIntegTest - mage goIntegTest
  • Took 3 min 13 sec . View more details here
  • Description: mage goIntegTest
metricbeat-unitTest - mage build unitTest
  • Took 5 min 3 sec . View more details here
  • Description: mage build unitTest
Building Beats » Beats Packaging » PR-39064
  • Took 34 min 17 sec . View more details here
  • Description: null

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@cmacknz
Copy link
Member Author

cmacknz commented Apr 22, 2024

[2024-04-22T18:30:04.025Z] docker: Error response from daemon: Head "https://docker.elastic.co/v2/beats-dev/golang-crossbuild/manifests/1.21.9-darwin-arm64-debian10": dial tcp 34.68.230.202:443: i/o timeout.

@cmacknz
Copy link
Member Author

cmacknz commented Apr 22, 2024

/package

@cmacknz cmacknz requested a review from belimawr April 22, 2024 21:13
@cmacknz cmacknz enabled auto-merge (squash) April 22, 2024 21:13
@rdner
Copy link
Member

rdner commented Apr 23, 2024

@cmacknz should we fix the linter issues?

@cmacknz cmacknz disabled auto-merge April 23, 2024 12:53
@cmacknz
Copy link
Member Author

cmacknz commented Apr 23, 2024

The latest packaging run succeeded but didn't update the PR status here, https://beats-ci.elastic.co/job/Beats/job/packaging/job/PR-39064/6/. Merging.

@cmacknz cmacknz merged commit e6cae46 into elastic:main Apr 23, 2024
216 of 220 checks passed
@cmacknz cmacknz deleted the cleanup-agentbeat-package branch April 23, 2024 12:54
mergify bot pushed a commit that referenced this pull request Apr 23, 2024
…sage (#39064)

* Remove Beat config files from agentbeat.

Beats no longer reads config files at startup when run as part of agent.

* Silence new error message with agentbeat.

* Add comment to log line.

(cherry picked from commit e6cae46)
cmacknz added a commit that referenced this pull request Apr 23, 2024
…sage (#39064) (#39159)

* Remove Beat config files from agentbeat.

Beats no longer reads config files at startup when run as part of agent.

* Silence new error message with agentbeat.

* Add comment to log line.

(cherry picked from commit e6cae46)

Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co>
@mamccorm
Copy link

mamccorm commented May 2, 2024

Any plans to cut a v7 and v8 release with this change?

@cmacknz
Copy link
Member Author

cmacknz commented May 2, 2024

Not as part of this change. Some time ago it was decided that we would avoid creating a v8 to avoid the toil of updating the import paths across 100s of repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.14.0 Automated backport with mergify Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants