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.
victormlg
force-pushed
the
ENT-14463-part-3
branch
2 times, most recently
from
September 29, 2026 11:26
b7d8916 to
33ee80a
Compare
| VarRefDestroy(ref); | ||
| } | ||
|
|
||
| static PromiseResult KeepAgentPromise(EvalContext *ctx, const Promise *pp, ARG_UNUSED void *param) |
| DataType value_type = CF_DATA_TYPE_NONE; | ||
| const void *value = NULL; | ||
| { | ||
| VarRef *ref = VarRefParseFromScope(pp->promiser, "this"); |
| } | ||
|
|
||
| { | ||
| VarRef *ref = VarRefParseFromBundle(pp->promiser, PromiseGetBundle(pp)); |
|
|
||
| static void LogVariableValue(const EvalContext *ctx, const Promise *pp) | ||
| { | ||
| VarRef *ref = VarRefParseFromBundle(pp->promiser, PromiseGetBundle(pp)); |
| /* TODO is CF_DATA_TYPE_NONE acceptable? Today all meta variables | ||
| * are of this type. */ | ||
| /* UnexpectedError("Variable '%s' is of unknown type %d", */ | ||
| /* pp->promiser, type); */ |
| { | ||
| Log(LOG_LEVEL_VERBOSE, "A: Promises kept in '%s' = %.0lf", bundle->name, delta_pr_kept); | ||
| Log(LOG_LEVEL_VERBOSE, "A: Promises not kept in '%s' = %.0lf", bundle->name, delta_pr_notkept); | ||
| Log(LOG_LEVEL_VERBOSE, "A: Promises repaired in '%s' = %.0lf", bundle->name, delta_pr_repaired); |
| bundle_compliance = (delta_pr_kept + delta_pr_repaired) / (delta_pr_kept + delta_pr_notkept + delta_pr_repaired); | ||
|
|
||
| Log(LOG_LEVEL_VERBOSE, "A: Aggregate compliance (promises kept/repaired) for bundle '%s' = %.1lf%%", | ||
| bundle->name, bundle_compliance * 100.0); |
| if (LogGetGlobalLevel() >= LOG_LEVEL_INFO) | ||
| { | ||
| char name[CF_MAXVARSIZE]; | ||
| snprintf(name, CF_MAXVARSIZE, "%s:%s", bundle->ns, bundle->name); |
| if (LogGetGlobalLevel() >= LOG_LEVEL_INFO) | ||
| { | ||
| char name[CF_MAXVARSIZE]; | ||
| snprintf(name, CF_MAXVARSIZE, "%s:%s", bundle->ns, bundle->name); |
|
|
||
| void EvalContextPromiseLockCacheClear(EvalContext *ctx) | ||
| { | ||
| StringSetClear(ctx->promise_lock_cache); |
| { | ||
| cfPS(ctx, LOG_LEVEL_ERR, PROMISE_RESULT_FAIL, pp, a, | ||
| "Reactor events promise '%s' refers to unknown bundle '%s'", | ||
| pp->promiser, (name != NULL) ? name : "(invalid)"); |
| if (then_constraint == NULL) | ||
| { | ||
| cfPS(ctx, LOG_LEVEL_ERR, PROMISE_RESULT_FAIL, pp, a, | ||
| "Reactor events promise '%s' does not specify a 'then' bundle", pp->promiser); |
| static char *EventsPromiseKey(const Promise *pp) | ||
| { | ||
| const Bundle *bp = PromiseGetBundle(pp); | ||
| return StringFormat("%s:%s:%s", bp->ns, bp->name, pp->promiser); |
victormlg
force-pushed
the
ENT-14463-part-3
branch
from
September 29, 2026 12:12
6e92c35 to
26c8c65
Compare
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Signed-off-by: Victor Moene <victor.moene@northern.tech>
victormlg
force-pushed
the
ENT-14463-part-3
branch
from
September 30, 2026 07:06
26c8c65 to
f98bd05
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.
No description provided.