Skip to content

Conversation

@beniwohli
Copy link
Contributor

What does this pull request do?

this will allow putting new features behind version guards, e.g.
only sending histogram metrics to server versions that understand
it

this will allow putting new features behind version guards, e.g.
only sending histogram metrics to server versions that understand
it
@ghost
Copy link

ghost commented Jul 16, 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-07-20T08:50:59.692+0000

  • Duration: 27 min 23 sec

  • Commit: 146606f

Test stats 🧪

Test Results
Failed 0
Passed 9577
Skipped 8604
Total 18181

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 9577
Skipped 8604
Total 18181

this allows us to set the server version in test fixtures.
Without this, a lot of tests would need to be updated
with updated request counts etc.
@beniwohli
Copy link
Contributor Author

@basepi are you 👍 with how I implemented an option to disable version fetching in tests? See e83866a

Without the change, a bunch of tests would need to be updated, as they have assertions on number of requests or similar that would change with this initial http request.

@basepi
Copy link
Contributor

basepi commented Jul 19, 2021

@basepi are you 👍 with how I implemented an option to disable version fetching in tests? See e83866a

Yep! LGTM.

This has the effect that even old versions of APM Server
reply with a flat JSON map, instead of nesting
it under an "ok" key.

Tested with APM Server 6.5
@beniwohli beniwohli merged commit 080ddab into elastic:master Jul 20, 2021
@beniwohli beniwohli deleted the fetch-server-version branch July 20, 2021 10:20
beniwohli added a commit to beniwohli/apm-agent-python that referenced this pull request Sep 14, 2021
* fetch server version on transport thread start

this will allow putting new features behind version guards, e.g.
only sending histogram metrics to server versions that understand
it

* add option to set server version explicitly on client init

this allows us to set the server version in test fixtures.
Without this, a lot of tests would need to be updated
with updated request counts etc.

* use Accept: text/plain for server info endpoint

This has the effect that even old versions of APM Server
reply with a flat JSON map, instead of nesting
it under an "ok" key.

Tested with APM Server 6.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants