-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add poll_timeout attribute to checkin endpoint (#2491)
* Add poll timeout to checkin requests Add poll_timeout attribute to checkin request bodies that allow the client to inform fleet-server of when the request will time out so that fleet-server can alter the request poll duration and write deadline to respond before then. If the attribute is not filled, or has a zero value such as "0s" the configured timeouts are used instead. * Use errors.Join in instrumentation setup * Fix linter * fix test * Apply suggestions from code review Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co> * Update dependencies (#2483) * Update dependencies Update all dependencied excluding: - github.com/elastic/elastic-agent-client/v7 - github.com/gofrs/uuid As they would require code changes. * Update elastic-agent-system-metrics to 0.6.1 to fix scanner * Add timeout.checkin_max_poll config * Change CheckinMaxPoll default to 1h --------- Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
- Loading branch information
1 parent
7c28955
commit 2d8dcb3
Showing
11 changed files
with
234 additions
and
23 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
changelog/fragments/1681246555-Add-poll_duration-to-checkin-requests.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Kind can be one of: | ||
# - breaking-change: a change to previously-documented behavior | ||
# - deprecation: functionality that is being removed in a later release | ||
# - bug-fix: fixes a problem in a previous version | ||
# - enhancement: extends functionality but does not break or fix existing behavior | ||
# - feature: new functionality | ||
# - known-issue: problems that we are aware of in a given version | ||
# - security: impacts on the security of a product or a user’s deployment. | ||
# - upgrade: important information for someone upgrading from a prior version | ||
# - other: does not fit into any of the other categories | ||
kind: enhancement | ||
|
||
# Change summary; a 80ish characters long description of the change. | ||
summary: Add poll_timeout to checkin requests | ||
|
||
# Long description; in case the summary is not enough to describe the change | ||
# this field accommodate a description without length limits. | ||
description: | | ||
Add a poll_duration attribute to checkin requests that the client can use to | ||
inform fleet-server of how long the client will hold the polling connection | ||
open for. If specified fleet-server will return a checkin response within | ||
the specified duration. | ||
# Affected component; a word indicating the component this changeset affects. | ||
component: checkin | ||
|
||
# PR number; optional; the PR number that added the changeset. | ||
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added. | ||
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number. | ||
# Please provide it if you are adding a fragment for a different PR. | ||
pr: 2491 | ||
|
||
# Issue number; optional; the GitHub issue related to this changeset (either closes or is part of). | ||
# If not present is automatically filled by the tooling with the issue linked to the PR number. | ||
issue: 2337 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/elastic/fleet-server/v7 | ||
|
||
go 1.19 | ||
go 1.20 | ||
|
||
require ( | ||
github.com/Pallinder/go-randomdata v1.2.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ inputs: | |
timeouts: | ||
read: 20s | ||
write: 5s | ||
checkin_max_poll: 10m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters