Repository navigation
Conversation
Signed-off-by: Victor Moene <victor.moene@northern.tech>
GetProcessStat() asserted on unexpected open() errors, e.g. when the process exited in the meantime. Release builds would loop forever instead. Now logs the error and returns false. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Ticket: CFE-4285 Changelog: Title Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
CFE-4285: Fixed cf-agent assertion failure when reading /proc/<pid>/stat
…ions.c Linked TODOs to new tickets to fix old bugs/TODOs that were already in cf-agent before moving the code. Signed-off-by: Victor Moene <victor.moene@northern.tech>
Better concurrency for cf-reactor static state - No need for map anymore, since watcher keeps track of the promise - No need to keep key as variable anymore, since we do not use a map - No need to run bundle inside watcher.c - No risk of running a bundle from a wrong key between policy reads Signed-off-by: Victor Moene <victor.moene@northern.tech>
Promises are skipped to prevent running them several times. However, on event, we want to run them every single time: - we clear the promise lock cache - we set the default if_elapsed time for bundles run from an events promise to be 0, so it doesn't skip the promises. Fixed also connection cache and custom promise prologue and epilogue. Clear function cache before "then" bundle run Signed-off-by: Victor Moene <victor.moene@northern.tech>
Signed-off-by: Victor Moene <victor.moene@northern.tech>
- Moved mod_methods.c's MethodsParseTreeCheck implementation to PromiseCheckBundleCallArity in policy.c, and made it more generic - Now, MethodsParseTreeCheck and EventsParseTreeCheck both call this new function when calling bundles Signed-off-by: Victor Moene <victor.moene@northern.tech>
ENT-14194: Run policy on event
RecordPkgOperationInChroot() wrote the architecture before the version, the reverse of the order its readers expect. Ticket: none Changelog: Title Signed-off-by: Daniel JB Clark <djbclark@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A recorded removal with a version was only reported when it cancelled a recorded installation of the same version. Ticket: none Changelog: Title Signed-off-by: Daniel JB Clark <djbclark@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…talls DiffPkgOperations() compared the versions of two recorded installations of the same package without checking that both were set, which PkgVersionIsGreater() asserts. The diff report now keeps the record the way the manifest report does: a versioned record over an unversioned one, otherwise the higher version, otherwise the first one recorded. Ticket: none Changelog: Title Signed-off-by: Daniel JB Clark <djbclark@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
With --simulate-json=FILE, cf-agent also writes the files and renames of a --simulate run to FILE as one JSON document, together with whether the run fell back to the failsafe policy or was aborted. Under manifest-full the JSON lists only the changed files, not the kept ones. Ticket: none Changelog: Title Signed-off-by: Daniel JB Clark <djbclark@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
PkgOperationRecord now stores the package fields and the simulate modes format their messages when printing, so that the reduction can be reused by other renderers. Ticket: none Changelog: None Signed-off-by: Daniel JB Clark <djbclark@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The "packages" array lists each package that a --simulate run would install or remove, with its version and architecture when known. It always carries that install/remove reduction, under --simulate=manifest as well. Ticket: none Changelog: Title Signed-off-by: Daniel JB Clark <djbclark@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
djbclark
force-pushed
the
simulate-json-packages
branch
from
October 9, 2026 04:50
312c466 to
e00b899
Compare
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.


CI only; the reviewed PR is #41.
Replaces #42, which GitHub cannot reopen because the head branch was force-pushed. Upstream's workflows run only on PRs into
master, so the stacked #41 (basesimulate-json-files) gets no full run. Close once CI is green.🤖 Generated with Claude Code