Repository navigation
Conversation
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
b7d8916 to
33ee80a
Compare
| VarRefDestroy(ref); | ||
| } | ||
|
|
||
| static PromiseResult KeepAgentPromise(EvalContext *ctx, const Promise *pp, ARG_UNUSED void *param) |
f98bd05 to
36fa38f
Compare
Signed-off-by: Victor Moene <victor.moene@northern.tech>
36fa38f to
0f805bb
Compare
larsewi
left a comment
There was a problem hiding this comment.
Please do a review with Claude. For me it found a few things that seem plausible:
- A remote
copy_fromin athenbundle crashes cf-reactor - State builds up across repeated runs of the same bundle
- The
EvalAbortedbranch is dead code
1bb39a3 to
5a8c477
Compare
craigcomstock
left a comment
There was a problem hiding this comment.
looks good generally
58f4f25 to
d02b0bb
Compare
|
@cf-bottom jenkins, please |
|
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/14750/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-14750/ |
Added a fix for the windows failure in enterprise. Restarted it |
|
@victormlg for a rebuild in jenkins, it would be nice if we updated the PR with the links... so here I will do it manually: Jenkins: https://ci.cfengine.com/job/pr-pipeline/14753/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-14753/ |
craigcomstock
left a comment
There was a problem hiding this comment.
a bit more, will continue later today
craigcomstock
left a comment
There was a problem hiding this comment.
here's the last of my comments on the refactored-code-as-new-code... I would say my intention was mostly to have you add comments where needed in a separate commit and create tickets/todos for things I mention that you feel are valid.
…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>
d02b0bb to
bcace8d
Compare
Follow-up PR: #6375
Depends on: https://github.com/cfengine/enterprise/pull/1004