Skip to content

[8.18](backport #5176) Fix download_rate as string on checkin handling#5189

Merged
michel-laterman merged 3 commits into8.18from
mergify/bp/8.18/pr-5176
Jul 30, 2025
Merged

[8.18](backport #5176) Fix download_rate as string on checkin handling#5189
michel-laterman merged 3 commits into8.18from
mergify/bp/8.18/pr-5176

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Jul 29, 2025

What is the problem this PR solves?

Fix fleet-server to properly handle when an agent sends the upgrade downloading detail's download_rate as a string instead of float64.

How does this PR solve the problem?

Fleet-server will parse the string into a float representing bps and re-marshal the metadata.

Design Checklist

  • I have ensured my design is stateless and will work when multiple fleet-server instances are behind a load balancer.
  • I have or intend to scale test my changes, ensuring it will work reliably with 100K+ agents connected.
  • I have included fail safe mechanisms to limit the load on fleet-server: rate limiting, circuit breakers, caching, load shedding, etc.

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool

Related issues

Fix fleet-server to properly handle when an agent sends the upgrade downloading detail's download_rate as a string instead of float64.

(cherry picked from commit c94d8d9)

# Conflicts:
#	testing/e2e/scaffold/scaffold.go
@mergify mergify Bot added backport conflicts There is a conflict in the backported pull request labels Jul 29, 2025
@mergify mergify Bot requested a review from a team as a code owner July 29, 2025 23:20
@mergify mergify Bot added the backport label Jul 29, 2025
@mergify mergify Bot requested review from michalpristas and pchila July 29, 2025 23:20
@mergify mergify Bot added the conflicts There is a conflict in the backported pull request label Jul 29, 2025
@mergify
Copy link
Copy Markdown
Contributor Author

mergify Bot commented Jul 29, 2025

Cherry-pick of c94d8d9 has failed:

On branch mergify/bp/8.18/pr-5176
Your branch is up to date with 'origin/8.18'.

You are currently cherry-picking commit c94d8d9.
  (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:
	new file:   changelog/fragments/1753372819-Fix-download_rate-as-string-handling.yaml
	modified:   dev-tools/integration/docker-compose.yml
	modified:   internal/pkg/api/handleCheckin.go
	modified:   internal/pkg/api/handleCheckin_test.go
	modified:   internal/pkg/api/metadata_test.go
	modified:   testing/e2e/api_version/client_api_current.go
	modified:   testing/e2e/stand_alone_api_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   testing/e2e/scaffold/scaffold.go

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

@prodsecmachine
Copy link
Copy Markdown

prodsecmachine commented Jul 29, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@github-actions github-actions Bot added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Jul 29, 2025
@elastic-sonarqube
Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

@michel-laterman michel-laterman merged commit f63de93 into 8.18 Jul 30, 2025
7 of 8 checks passed
@michel-laterman michel-laterman deleted the mergify/bp/8.18/pr-5176 branch July 30, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport bug Something isn't working conflicts There is a conflict in the backported pull request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

2 participants