This pull request improves the reliability and efficiency of the Winget ingester by introducing robust retry logic for fetching manifest files and directory contents, switching to CDN-backed raw file downloads, and updating tests to cover these changes. The main focus is on handling transient errors (like rate limits and server errors) gracefully, preventing ingestion failures due to temporary issues with GitHub's API or file servers. **Reliability improvements for manifest fetching:** * Added `getRawManifestFile` method to fetch manifest files directly from `raw.githubusercontent.com` (or a testable override), avoiding GitHub API rate limits and using CDN-backed downloads. This method implements retry logic for transient HTTP errors (e.g., 429, 5xx), with exponential backoff, and returns a specific error for missing files. (`ee/maintained-apps/ingesters/winget/ingester.go`) * Introduced `getRepoDirContents` method to list repository directories via the GitHub API with retry logic for transient errors, improving resilience against API throttling. (`ee/maintained-apps/ingesters/winget/ingester.go`) **Ingestion logic updates:** * Updated `ingestOne` to use the new retry-enabled methods for both directory listing and manifest file fetching, ensuring that only true missing files are skipped and transient errors cause a controlled failure, not silent downgrades. (`ee/maintained-apps/ingesters/winget/ingester.go`) [[1]](diffhunk://#diff-eb6c4ae7be41e61a2292c4240de750809d40c0686fb01f80f52df056ebc9c2a8L143-R270) [[2]](diffhunk://#diff-eb6c4ae7be41e61a2292c4240de750809d40c0686fb01f80f52df056ebc9c2a8L182-R324) **Test enhancements:** * Modified test server and test cases to simulate the new raw file fetching logic, including scenarios for retries, maximum attempts, and handling of 404 errors. Added comprehensive tests for both `getRawManifestFile` and `getRepoDirContents` retry behavior. (`ee/maintained-apps/ingesters/winget/ingester_test.go`) [[1]](diffhunk://#diff-c68f0564df3c6e38ad333d4ca6e1040305eb079eb0d168d29c95b1b250463055L509-R512) [[2]](diffhunk://#diff-c68f0564df3c6e38ad333d4ca6e1040305eb079eb0d168d29c95b1b250463055L529-R678) * Improved test reliability by reducing retry intervals for faster test execution and using assertions for YAML marshaling and writing. (`ee/maintained-apps/ingesters/winget/ingester_test.go`) **Dependency and setup changes:** * Added necessary imports for new functionality (`io`, `net/http`, `net/url`, `time`, and `github.com/fleetdm/fleet/v4/pkg/retry`) and updated struct initialization to support the new fields. (`ee/maintained-apps/ingesters/winget/ingester.go`, `ee/maintained-apps/ingesters/winget/ingester_test.go`) [[1]](diffhunk://#diff-eb6c4ae7be41e61a2292c4240de750809d40c0686fb01f80f52df056ebc9c2a8R7-R25) [[2]](diffhunk://#diff-eb6c4ae7be41e61a2292c4240de750809d40c0686fb01f80f52df056ebc9c2a8R52-R53) [[3]](diffhunk://#diff-c68f0564df3c6e38ad333d4ca6e1040305eb079eb0d168d29c95b1b250463055R474-R475) These changes make the Winget ingestion process more robust against transient infrastructure issues and provide better test coverage for error handling and retry logic. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved app ingestion resilience when GitHub returns transient rate-limit or server errors, so a single failure no longer stops the full import run. * Added clearer handling for missing installer data: only genuine “not found” responses now fall back to an older version, while other errors are surfaced properly. * **Tests** * Added coverage for version fallback behavior and transient error handling during ingestion. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
News · Report a bug · Docs · Why open source? · Art
Open-source platform for IT and security teams with thousands of computers. Designed for APIs, GitOps, webhooks, YAML, and humans.
What's it for?
Fleet gives you a single system to secure and maintain all your computing devices over the air. You can do MDM, patch stuff, deploy software, and verify anything, all from one place, across every OS your organization uses.
Fleet works directly with data and events from the native operating system, down to the bare metal. Strong diagnostics let you investigate errors on end-user devices and collect accurate audit evidence in minutes.
Get started
You can try Fleet out for yourself, or grab time with one of the maintainers to chat.
Is it any good?
Fleet is used in production by IT and security teams managing thousands of devices. Many deployments support tens of thousands of hosts, and a few large organizations manage 400,000 or more.
Supported platforms
- Linux (all distros)
- macOS
- Windows
- Chromebooks
- iOS and Android (BYOD or corporate-owned)
- Amazon Web Services (AWS)
- Google Cloud (GCP)
- Azure (Microsoft cloud)
- Data centers
- Containers (kube, etc)
- Linux-based IoT devices
Infrastructure as code
Manage your fleet with GitOps, or use the GUI, REST API, webhook events, and the fleetctl command-line tool.
Linux support
First-class support for all major distros. Linux gets the same attention and visibility as macOS and Windows.
Visibility and compliance
Fleet can report on hundreds of attributes across your devices and ships with CIS benchmarks for macOS and Windows and comprehensive operating system, hardware, and software data. Check out the table reference documentation to see what's available.
Open by design
Fleet is open source and transparent about what it can and can't see. End users can verify exactly how the agent works and what data their company collects. Fleet collects only the data needed to manage and secure devices, not private activity like keystrokes, emails, or webcams.
Good neighbors
Ready-to-use, enterprise-friendly integrations exist for Snowflake, Splunk, GitHub Actions, Vanta, Elastic Jira, Zendesk, and more. Fleet also works with tools such as Munki, Chef, Puppet, Ansible, CrowdStrike, and SentinelOne.
Lighter than air
Fleet is lightweight and modular. You can use it for MDM without using it for security, and vice versa. You can turn off features you are not using.
Free as in free
The free version of Fleet will always be free. Fleet is independently backed and actively maintained with the help of many amazing contributors.
Longevity
The company behind Fleet is founded (and majority-owned) by true believers in open source. The company's business model is influenced by GitLab (NYSE: GTLB), with great investors, happy customers, and the capacity to become profitable at any time.
Fleet Device Management's company handbook is public and open source. You can read about the history of Fleet and our commitment to improving the product.
Chat
The Fleet community is full of kind and helpful people. Whether or not you are a paying customer, if you need help, just reach out.
Contributing
Contributions are welcome, whether you answer questions on Slack / GitHub / LinkedIn, improve the documentation or website, write a tutorial, give a talk at a conference or local meetup, give an interview on a podcast, troubleshoot reported issues, or submit a patch. The Fleet code of conduct is on GitHub.
License
The free version of Fleet is available under the MIT license. The commercial license is also designed to allow contributions to paid features for users whose employment agreements allow them to contribute to open source projects. (See LICENSE.md for details.)
Fleet is built on osquery, nanoMDM, Nudge, and swiftDialog.