Repository navigation
feat(software-update): auto-update trigger: a new catalog version orders the devices that keep the package updated CU-17tkuw5zc6u - #2885
Merged
Conversation
…o-update on keeps the package updated on its devices
…o-update on keeps the package updated on its devices
…log version orders the devices that keep the package updated
…ate-trigger # Conflicts: # openframe-data-mongo-common/src/main/java/com/openframe/data/document/rmm/software/PackageAutoUpdatePolicy.java # openframe-data-mongo-sync/src/main/java/com/openframe/data/repository/rmm/CustomPackageAutoUpdatePolicyRepository.java # openframe-data-mongo-sync/src/main/java/com/openframe/data/repository/rmm/CustomPackageAutoUpdatePolicyRepositoryImpl.java # openframe-data-mongo-sync/src/main/java/com/openframe/data/repository/rmm/PackageAutoUpdatePolicyRepository.java # openframe-data-mongo-sync/src/main/java/com/openframe/data/service/rmm/software/PackageAutoUpdatePolicyService.java # openframe-data-mongo-sync/src/test/java/com/openframe/data/repository/rmm/PackageAutoUpdatePolicyRepositoryIT.java # openframe-data-mongo-sync/src/test/java/com/openframe/data/service/rmm/software/PackageAutoUpdatePolicyServiceTest.java
…ly where its flag is on, with its timing from config
…d devices; no Optional in the catalog lookup, no Optional.get()
kirill-567
previously approved these changes
Oct 29, 2026
…' into feat/package-auto-update-trigger
andrii-flamingo
enabled auto-merge
October 29, 2026 20:39
kirill-567
approved these changes
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ClickUp task: CU-17tkuw5zc6u BE-3: Auto-update trigger (Outdated → AUTO order)
The trigger behind auto-update: when the package catalog has a newer version of a package, every device with an enabled policy for it gets an AUTO update order, grouped into one Software Actions job per package and version.
Change
PackageAutoUpdateTrigger, run byPackageAutoUpdateTriggerSchedulerevery 15 minutes (openframe.rmm.software.auto-update.trigger.interval, ShedLock). Per package with enabled policies:package_catalog(PackageCatalogVersions; brew type picks between formula and cask twins); a package the catalog does not carry (Chocolatey) is skipped;lastVersiondiffers and whose agent takes package-update orders; the rest stay for a later run;SoftwareActionResultjob (kind AUTO_UPDATE, the catalog version, no initiator) with a deterministic id (SoftwareExecutionId.forAutoUpdate), so devices that reach the version later join the same row;dispatchAutoUpdateper settings group under that execution id, thenlastVersionis moved (markOrdered).A failing package is logged and does not stop the others.
PackageAutoUpdatePolicy.lastVersion: set to the catalog version when the policy is turned on (the run itself brings the package there), so auto-update starts from the next release.PackageUpdateDispatchService.dispatchAutoUpdate: likedispatchAdminUpdate, with source AUTO; a policy without settings gets the WAIT / 300 s defaults.Offline devices, reruns, WAITING, deadline and FORCE come from the existing delivery engine and package-update flow.
Testing
PackageAutoUpdateTriggerTest(new version, up to date, not in catalog, ineligible device, later devices join the job, settings groups),PackageCatalogVersionsTest,PackageAutoUpdatePolicyServiceTest(starting version),PackageUpdateDispatchServiceTest(AUTO source),PackageAutoUpdatePolicyRepositoryITagainst Mongo (lastVersion from enable, markOrdered, enabled-only read).Change-Set: package-auto-update
Change set
flamingo-stack/openframe-oss-lib#2885: these pull requests are one change, reviewed together.Linked work
Linked by the
Depends-On/Change-Setlines in these descriptions; this block is maintained by the hub.