Skip to content

ENT-10199: Fixed a bug where some functions would not understand current namespace#6213

Open
SimonThalvorsen wants to merge 1 commit into
cfengine:masterfrom
SimonThalvorsen:master
Open

ENT-10199: Fixed a bug where some functions would not understand current namespace#6213
SimonThalvorsen wants to merge 1 commit into
cfengine:masterfrom
SimonThalvorsen:master

Conversation

@SimonThalvorsen

Copy link
Copy Markdown
Contributor

Ticket: ENT-10199
Changelog: Title

Comment thread libpromises/fncall.c Fixed
Comment thread libpromises/fncall.c Fixed
…ent namespace

Ticket: ENT-10199
Changelog: Title

Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
@SimonThalvorsen

Copy link
Copy Markdown
Contributor Author

@cf-bottom Jenkins please :)

@cf-bottom

Copy link
Copy Markdown

@olehermanse olehermanse self-requested a review July 2, 2026 23:09
@nickanderson

Copy link
Copy Markdown
Member

In your commit message I think it would be nice to enumerate the functions for which this is now fixed.

@olehermanse

Copy link
Copy Markdown
Member

In your commit message I think it would be nice to enumerate the functions for which this is now fixed.

Also, functions is a bit vague, i assume it means policy functions (not internal C functions).

@olehermanse olehermanse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please look into the NULL scope / bundle, and also improve the changelog entry.

Comment thread libpromises/fncall.c
rval = ExpandPrivateRval(ctx, NULL, NULL, rp->val.item, rp->val.type);
const Bundle *caller_bundle = fp->caller ? PromiseGetBundle(fp->caller) : NULL;
const char *caller_ns = caller_bundle ? caller_bundle->ns : NULL;
rval = ExpandPrivateRval(ctx, caller_ns, NULL, rp->val.item, rp->val.type);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is scope / bundle NULL here? If that is indeed correct, it deserves a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants