Commit graph

8 commits

Author SHA1 Message Date
Ian Littman
8509b18c46
🤖 Add fallback for FMA manifest URL pulls (#43312)
**Related issue:** Resolves #42754

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements), JS
inline code is prevented especially for url redirects, and untrusted
data interpolated into shell scripts/commands is validated against shell
metacharacters.

## Testing

- [x] Added/updated automated tests

- [x] QA'd all new/changed functionality manually

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved app manifest retrieval with automatic fallback to hosted
copies when the primary source is unavailable, reducing sync failures.

* **Documentation**
* Clarified that Fleet will fall back to hosted manifest copies if the
new manifest site is inaccessible.

* **New Features**
* Streamlined maintained-app synchronization to use a simpler sync
entrypoint and unified primary/fallback fetch logic.

* **Tests**
* Added comprehensive tests for primary/fallback fetch flows, error
handling, large-response truncation, and environment-based overrides.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-09 17:36:18 -05:00
Victor Lyuboslavsky
4236363522
Next set of slog migration changes for MDM (#39981)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #38889

Incremental set of slog migration changes for MDM packages.

# Checklist for submitter
- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
  - already added in a previous PR

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Standardized logging to Go's structured slog across MDM (Apple,
Windows), DEP/ABM flows, maintained app sync, and related
tests—improving log consistency and contextual diagnostics without
changing user-facing behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-19 11:40:52 -06:00
Ian Littman
2f25580c3a
Only allow FLEET_DEV_* env vars when --dev is passed, allow overriding configs one at a time in dev (#38652)
Resolves #38484. This includes a CI job change to make sure we don't
introduce any more env vars that don't get proxied (and thus turned off
outside `--dev`).

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [x] Added/updated automated tests

Manual QA touched hot paths, but did _not_ manually test every
FLEET_DEV_* environment variable change.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Centralized dev-mode environment management for consistent FLEET_DEV_*
handling and test-friendly overrides.
* Dev-mode allows targeted overrides for certain dev-only configuration
when running with --dev.

* **Chores**
* Migrated environment access to the centralized dev-mode helper across
the codebase.
  * Added CI checks to enforce proper usage of FLEET_DEV_* variables.

* **Documentation**
  * Added guidance on dev-mode environment variable rules and overrides.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Victor Lyuboslavsky <2685025+getvictor@users.noreply.github.com>
2026-01-27 14:32:56 -06:00
Konstantin Sykulev
300c263430
fixing ordering issue on maintained apps test (#36530)
```
--- FAIL: TestMaintainedApps (33.88s)
    --- FAIL: TestMaintainedApps/UpsertMaintainedApps (5.74s)
```

```
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -147,20 +147,20 @@
        	            	   ID: (uint) 0,
        	            	+  Name: (string) (len=22) "Adobe Digital Editions",
        	            	+  Slug: (string) (len=29) "adobe-digital-editions/darwin",
        	            	+  Version: (string) "",
        	            	+  Platform: (string) (len=6) "darwin",
        	            	+  TitleID: (*uint)(<nil>),
        	            	+  InstallerURL: (string) "",
        	            	+  SHA256: (string) "",
        	            	+  UniqueIdentifier: (string) "",
        	            	+  InstallScript: (string) "",
        	            	+  UninstallScript: (string) "",
        	            	+  AutomaticInstallQuery: (string) "",
        	            	+  Categories: ([]string) <nil>,
        	            	+  UpgradeCode: (string) ""
        	            	+ },
        	            	+ (fleet.MaintainedApp) {
        	            	+  ID: (uint) 0,
        	            	   Name: (string) (len=14) "Android Studio",
        	            	   Slug: (string) (len=21) "android-studio/darwin",
        	            	-  Version: (string) "",
        	            	-  Platform: (string) (len=6) "darwin",
        	            	-  TitleID: (*uint)(<nil>),
        	            	-  InstallerURL: (string) "",
        	            	-  SHA256: (string) "",
        	            	-  UniqueIdentifier: (string) "",
        	            	-  InstallScript: (string) "",
        	            	-  UninstallScript: (string) "",
        	            	-  AutomaticInstallQuery: (string) "",
        	            	-  Categories: ([]string) <nil>,
        	            	-  UpgradeCode: (string) ""
        	            	- },
        	            	- (fleet.MaintainedApp) {
        	            	-  ID: (uint) 0,
        	            	-  Name: (string) (len=22) "Adobe Digital Editions",
        	            	-  Slug: (string) (len=29) "adobe-digital-editions/darwin",
        	            	   Version: (string) "",
        	Test:       	TestMaintainedApps/UpsertMaintainedApps
```
# Checklist for submitter

- [x] Added/updated automated tests
2025-12-01 16:54:45 -06:00
Jahziel Villasana-Espinoza
2802cf57d5
Update FMA refreshing logic to remove apps that were removed upstream (#27594)
> No issue, we noticed this while testing FMA for Windows

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality
2025-03-28 14:04:08 -04:00
Ian Littman
4a1e5340f0
Switch Fleet-maintained apps to use manifest-based structure (#27201)
For #26082.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For database migrations:
- [x] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [x] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [x] Added/updated automated tests
- [x] A detailed QA plan exists on the associated ticket (if it isn't
there, work with the product group's QA engineer to add it)
- [x] Manual QA for all new/changed functionality
2025-03-20 21:21:56 -05:00
Dante Catalfamo
b45c8b02c9
List Available Fleet Managed Apps (#22059)
#21777
2024-09-19 10:43:40 -04:00
Martin Angers
9abd5a59d0
Maintained Apps: define app list, implement ingestion (#21946) 2024-09-10 13:55:13 -04:00