Skip to content

Clarify maintained app download timeout errors - #50104

Merged
cdcme merged 2 commits into
mainfrom
fix-48416-large-installer-errors
Jul 30, 2026
Merged

Clarify maintained app download timeout errors#50104
cdcme merged 2 commits into
mainfrom
fix-48416-large-installer-errors

Conversation

@cdcme

@cdcme cdcme commented Jul 29, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #48416

When adding a Fleet-maintained app, a large-installer download that's canceled or times out now returns a clear message pointing at the likely proxy/load-balancer timeout, instead of a raw context canceled.

Checklist for submitter

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

Summary by CodeRabbit

  • Bug Fixes
    • Improved error messages when adding Fleet-maintained apps times out or is canceled during large installer downloads.
    • Added clearer guidance for configuring server, proxy, and load balancer timeouts.
    • Properly handles additional timeout and upstream cancellation responses, including HTTP 408, 499, and 504.

Copilot AI review requested due to automatic review settings July 29, 2026 00:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

  • Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.

Pull request overview

Improves the user-facing error experience when adding Fleet-maintained apps by translating large-installer download timeouts/cancellations into clearer, actionable messages (especially for proxy/load balancer timeouts).

Changes:

  • Translate context.DeadlineExceeded and context.Canceled errors from Fleet-maintained app downloads into dedicated Gateway Timeout messages.
  • Add backend and frontend tests to ensure timeout/cancel scenarios show the friendly timeout copy (including 499 handling on the frontend).
  • Refresh the shared frontend “request timed out” copy to better reference proxies/load balancers and large installer transfers.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
server/service/maintained_apps.go Adds error translation for timeout/canceled download failures when adding Fleet-maintained apps.
server/service/maintained_apps_test.go Adds unit test coverage for the endpoint error translation behavior.
server/fleet/errors.go Introduces backend constants for clearer maintained-app timeout/cancel messages.
frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareFleetMaintained/FleetMaintainedAppDetailsPage/helpers.tsx Treats 499/408/504 uniformly as timeout/cancel and shows friendly timeout copy.
frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareFleetMaintained/FleetMaintainedAppDetailsPage/helpers.tests.tsx Adds tests asserting friendly timeout messaging for 504/499/408 paths.
frontend/pages/SoftwarePage/SoftwareAddPage/helpers.tsx Updates the shared timeout message text shown in the UI.
changes/48416-maintained-app-timeout-error-message User-visible changelog entry (content not available in this review).
Files excluded by content exclusion policy (1)
  • changes/48416-maintained-app-timeout-error-message

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/service/maintained_apps.go
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.06%. Comparing base (0504e59) to head (cf4925c).
⚠️ Report is 35 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #50104      +/-   ##
==========================================
+ Coverage   67.98%   68.06%   +0.08%     
==========================================
  Files        3923     3932       +9     
  Lines      250102   250550     +448     
  Branches    13361    13276      -85     
==========================================
+ Hits       170022   170543     +521     
+ Misses      64779    64694      -85     
- Partials    15301    15313      +12     
Flag Coverage Δ
backend 69.39% <100.00%> (+0.01%) ⬆️
frontend 60.96% <100.00%> (+0.52%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI review requested due to automatic review settings July 29, 2026 00:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

  • Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

Files excluded by content exclusion policy (1)
  • changes/48416-maintained-app-timeout-error-message
Comments suppressed due to low confidence (2)

frontend/pages/SoftwarePage/SoftwareAddPage/helpers.tsx:5

  • Grammar: the subject is plural ("your server, and any proxy or load balancer"), so the verb should be "allow" instead of "allows".
export const REQUEST_TIMEOUT_ERROR_MESSAGE = `${ADD_SOFTWARE_ERROR_PREFIX} The request timed out. Make sure your server, and any proxy or load balancer in front of Fleet, allows enough time to transfer large installers.`;

frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareFleetMaintained/FleetMaintainedAppDetailsPage/helpers.tsx:62

  • The inline comment says 499 is an upstream proxy/LB cancel, but Fleet uses 499 to mean the client disconnected (nginx "Client Closed Request" convention). Clarifying the comment will avoid confusion when debugging.
  const isTimeout =
    responseStatus === 504 || responseStatus === 408 || responseStatus === 499; // upstream proxy/LB canceled the request
  const reason = getErrorReason(err);

@cdcme
cdcme marked this pull request as ready for review July 29, 2026 00:48
@cdcme
cdcme requested review from a team as code owners July 29, 2026 00:48
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0eab2ea1-b4f5-43d5-8b10-c4f176a37495

📥 Commits

Reviewing files that changed from the base of the PR and between 3a78739 and cf4925c.

📒 Files selected for processing (8)
  • changes/48416-maintained-app-timeout-error-message
  • frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareFleetMaintained/FleetMaintainedAppDetailsPage/helpers.tests.tsx
  • frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareFleetMaintained/FleetMaintainedAppDetailsPage/helpers.tsx
  • frontend/pages/SoftwarePage/SoftwareAddPage/helpers.tsx
  • server/fleet/errors.go
  • server/service/integration_enterprise_test.go
  • server/service/maintained_apps.go
  • server/service/maintained_apps_test.go

Walkthrough

Updated Fleet-maintained app installation error handling for installer download timeouts and cancellations. The server now returns distinct gateway timeout messages for deadline exceeded and canceled contexts. The frontend recognizes status codes 504, 499, and 408, and displays a more specific timeout message referencing server, proxy, and load balancer transfer timeouts. Tests cover the new server mappings and frontend responses.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: improving maintained app download timeout errors.
Description check ✅ Passed The description includes the related issue, user-facing summary, and completed changes/testing checklist items.
Linked Issues check ✅ Passed The PR matches #48416 by clarifying canceled and timed-out maintained app download errors with a proxy/load-balancer-focused message.
Out of Scope Changes check ✅ Passed The changes stay focused on maintained app timeout handling, messaging, and tests, with no clear unrelated additions.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-48416-large-installer-errors

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.45.0)
server/service/integration_enterprise_test.go

ast-grep timed out on this file


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@RachelElysia RachelElysia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

@cdcme
cdcme merged commit 294a172 into main Jul 30, 2026
48 checks passed
@cdcme
cdcme deleted the fix-48416-large-installer-errors branch July 30, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

POST /api/latest/fleet/software/fleet_maintained_apps times out downloading large installers from vendor CDN

4 participants