Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix reading agent version #2289

Merged
merged 5 commits into from
Nov 25, 2021
Merged

Conversation

SylvainJuge
Copy link
Member

@SylvainJuge SylvainJuge commented Nov 25, 2021

What does this PR do?

  • For agent version 1.27.0, the agent is unable to read its own version
  • This is a small regression introduced with Isolated agent classloader #2109
  • (minor) when service_version is not set, the agent will produce a (null) in the logs, which could be confusing.

Has been reported in the forum here.

For a not-yet-known reason, reading maven descriptor as resources does not seem to work as expected
with the new agent architecture where classes and resources are moved to a separate /agent folder to exclude them from classpath.

However, reading the META-INF/MANIFEST.MF works as expected as this file remains in the same location in the agent jar itself, so this PR just implements this minor change.

Checklist

  • This is a bugfix

@apmmachine
Copy link
Contributor

apmmachine commented Nov 25, 2021

💚 Build Succeeded

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: 2021-11-25T15:03:29.562+0000

  • Duration: 72 min 17 sec

  • Commit: 76c44e5

Test stats 🧪

Test Results
Failed 0
Passed 2548
Skipped 21
Total 2569

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

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

  • /test : Re-trigger the build.

  • run benchmark tests : Run the benchmark test.

  • run compatibility tests : Run the JDK Compatibility test.

  • run integration tests : Run the APM-ITs.

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

@SylvainJuge SylvainJuge self-assigned this Nov 25, 2021
@SylvainJuge SylvainJuge added the await-release Mark issues that depend on next release, or PRs that are planned to be included label Nov 25, 2021
@SylvainJuge SylvainJuge marked this pull request as ready for review November 25, 2021 10:32
@SylvainJuge SylvainJuge merged commit 721d892 into elastic:master Nov 25, 2021
@SylvainJuge SylvainJuge deleted the fix-agent-version branch November 25, 2021 20:45
@SylvainJuge SylvainJuge removed the await-release Mark issues that depend on next release, or PRs that are planned to be included label Dec 15, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants