Skip to content

feat(software-update): update settings and auto-update on the Update Software API CU-17tkuw614a6 - #2849

Merged
andrii-flamingo merged 10 commits into
mainfrom
feature/package-update-settings-api
Oct 29, 2026
Merged

andrii-flamingo merged 10 commits into
mainfrom
feature/package-update-settings-api

Conversation

@andrii-flamingo

@andrii-flamingo andrii-flamingo commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Closes https://app.clickup.com/t/9013925967/17tkuw614a6

GraphQL for Software Management 2.0. Three parts: Update Software settings and WAITING in Software Actions are implemented; the rest of the design is contract only.

1. Update Software: "Update Settings" and "Auto-update" (implemented)

  • New types: PackageUpdateMode (WAIT / FORCE), PackageUpdateSettings(Input), SoftwareAutoUpdate(Input).
  • submitSoftwareBundle, createSoftwareSchedule and updateSoftwareSchedule take updateSettings + autoUpdate; SoftwareBundle and SoftwareSchedule return them.
  • Domain: embedded PackageUpdateSettings and SoftwareAutoUpdate on SoftwareBundle and SoftwareSchedule. One PackageUpdateSettingsMapper holds the rules for both:
    • UPDATE only, rejected for INSTALL;
    • no settings → the screen's defaults: wait & notify, a countdown 7 days after the first try, 5 minutes long;
    • FORCE keeps no deadline; deadline up to 30 days, countdown up to 1 hour;
    • auto-update off drops its settings; on without settings = "Same settings for auto-update".
  • A scheduled bundle hands the settings to the schedule it creates; updateSoftwareSchedule is a full replacement.

2. Software Actions: WAITING, version, device connectivity (implemented)

  • SoftwareActionStatus.WAITING: any device waiting on the user (prompt, open app, Ask Later) makes the action WAITING. Same precedence as the package-update roll-up. Status filter and facet include it.
  • SoftwareActionRun.waitingMachineCount (the "N WAITING" chip) and version (was stored, never returned).
  • List: PackageUpdateExecutionRecorder sets waiting on the device's script_executions row on WAITING and clears it on DONE / FAILED. The aggregation counts it, with no extra lookup.
  • Device details read WAITING from package_update_device_state (one findByTenantIdAndRequestIdIn per action), so rows written before the flag existed show it too.
  • SoftwareActionDevice.deviceStatus + lastSeen for the online dot and "Last Online".
  • Test-only fix: SoftwareActionAggregationRepositoryImplIT could not start (the aggregation impl was missing from RmmIntegrationTestApplication). It now runs, with new cases for WAITING and version.

3. Contract only (schema, no resolvers yet)

  • All Software: Software.type, autoUpdate (ON / OFF / NO_PACKAGE / NEEDS_ADOPTION), adoptionCount; auto-update filter + facet; sort by adoptionCount.
  • Software → Devices: SoftwareOnDevice.installedBy, adoption { status, packageManager, error }, autoUpdate; filters + facets for installed-by, auto-update, customer and device status.
  • Software Actions: SoftwareActionKind (INSTALL / UPDATE / AUTO_UPDATE / ADOPT) on the run and per device; kinds filter + facet; deviceTagIds on the device filter.
  • adoptSoftware(input): explicit machineIds, or filter + search for "Add All Devices"; Windows manager MATCH_CUSTOMER / WINGET / CHOCOLATEY; macOS always Brew.
  • turnOffSoftwareAutoUpdate(softwareId).
  • Not in the design yet: the "…" menu on a device row.

Not in this PR

  • The dispatch still sends WAIT / 300 s / no deadline. Wiring the stored settings into SoftwareBundleOnlineDispatcher and SoftwareScheduleFireDispatcher comes next. Auto-update only stores the intent.
  • Resolvers for part 3.

Compatibility

  • Non-null fields with no resolver yet. SoftwareActionRun.kind and the new facet lists are non-null by design. Until their resolvers land, a query that selects them fails.
  • New output enum value. WAITING appears in SoftwareActionStatus, so clients must handle the new value.
  • Federation snapshots. saas-tenant needs a Federation snapshot update with the lib bump.

Change-Set: package-update-settings

Change set flamingo-stack/fix-route-styles-full-sheet: these pull requests are one change, reviewed together.

Linked work

Linked by the Depends-On / Change-Set lines in these descriptions; this block is maintained by the hub.

@github-actions

Copy link
Copy Markdown
Contributor

🦩 Flamingo Code Review

Not reviewed yet. Reviews start when you ask, so the reviewer reads this pull request when it is ready, not when it is opened.

When it is ready:

  • Review this pull request

Or comment @flamingo-review. Add the flamingo-review-always label to review every push.

Updated 2026-10-27 13:43 UTC · workflow run

@andrii-flamingo andrii-flamingo changed the title Added graphql for update feat(software-update): update settings and auto-update on the Update Software API CU-17tkuw614a6 Oct 27, 2026
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.

2 participants