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

[7.x](backport #27509) Add a header round tripper option to httpcommon #27788

Merged
merged 3 commits into from
Sep 8, 2021

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 7, 2021

This is an automatic backport of pull request #27509 done by Mergify.
Cherry-pick of 8a5dac6 has failed:

On branch mergify/bp/7.x/pr-27509
Your branch is up to date with 'origin/7.x'.

You are currently cherry-picking commit 8a5dac67f9.
  (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:   dev-tools/cmd/dashboards/export_dashboards.go
	modified:   filebeat/beater/filebeat.go
	modified:   heartbeat/monitors/active/http/http.go
	modified:   heartbeat/monitors/active/http/http_test.go
	modified:   libbeat/cmd/instance/beat.go
	modified:   libbeat/common/transport/httpcommon/httpcommon.go
	modified:   libbeat/dashboards/dashboards.go
	modified:   libbeat/dashboards/kibana_loader.go
	modified:   libbeat/esleg/eslegclient/connection.go
	modified:   libbeat/kibana/client.go
	modified:   libbeat/kibana/client_test.go
	modified:   libbeat/monitoring/report/elasticsearch/elasticsearch.go
	modified:   libbeat/outputs/elasticsearch/client.go
	modified:   libbeat/outputs/elasticsearch/elasticsearch.go
	modified:   metricbeat/helper/http.go
	modified:   metricbeat/helper/http_test.go
	modified:   x-pack/elastic-agent/pkg/agent/cmd/container.go
	modified:   x-pack/filebeat/input/httpjson/input.go
	modified:   x-pack/filebeat/input/httpjson/requester.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   heartbeat/monitors/active/http/task.go
	both modified:   heartbeat/monitors/active/http/task_test.go
	both modified:   libbeat/cmd/export/dashboard.go

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


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

* Add a header round tripper option to httpcommon

Add a new TransportOption to add a set of headers to each HTTP request
through a custom http.RoundTripper. It will set the passed headers to
each request if the header key is not present. Use the new transport
option to add User-Agent headers to heartbeat, metricbeat, and filebeat.

* Fix useragent injection in heartbeat IPMonitor jobs

* Add User-Agent header to kibana and eslegclient

Add the User-Agent header with the RoundTripper to requests made by the
Kibana and eslegclient. The value for the User-Agent will be constructed
from what is returned by the os executable name.

* Fix syntax errors

* Get user agent from existing ingo

Get user-agent values for the Kibana and eslegclient from existing
config settings that get passed into the clients.

* change from settings.Name to b.Info.Name

* Fix missing param

* Rename export dashboard useragent value

* Review feedback

* Change beat.Info.Name to beat.Info.Beat

* Fix typo

(cherry picked from commit 8a5dac6)

# Conflicts:
#	heartbeat/monitors/active/http/task.go
#	heartbeat/monitors/active/http/task_test.go
#	libbeat/cmd/export/dashboard.go
@mergify mergify bot requested a review from a team as a code owner September 7, 2021 23:01
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Sep 7, 2021
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 7, 2021
@botelastic
Copy link

botelastic bot commented Sep 7, 2021

This pull request doesn't have a Team:<team> label.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 7, 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-09-08T18:33:55.272+0000

  • Duration: 150 min 19 sec

  • Commit: 9a30039

Test stats 🧪

Test Results
Failed 0
Passed 53310
Skipped 5268
Total 58578

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 53310
Skipped 5268
Total 58578

@michel-laterman michel-laterman merged commit e0a5ac1 into 7.x Sep 8, 2021
@michel-laterman michel-laterman deleted the mergify/bp/7.x/pr-27509 branch September 8, 2021 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport conflicts There is a conflict in the backported pull request needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants