Skip to content

CFE-4550: Added findlocalgroups() policy function#5882

Merged
olehermanse merged 2 commits into
cfengine:masterfrom
victormlg:findlocalgroups
Oct 3, 2025
Merged

CFE-4550: Added findlocalgroups() policy function#5882
olehermanse merged 2 commits into
cfengine:masterfrom
victormlg:findlocalgroups

Conversation

@victormlg

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread libpromises/evalfunction.c Fixed
Comment thread libpromises/evalfunction.c Fixed
Comment thread libpromises/evalfunction.c Fixed
Comment thread libpromises/evalfunction.c Fixed

@larsewi larsewi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There should be a changelog entry in the commit message.

This function does not work as described in CFE-4550. Did you guys agree to change the scope?

Comment thread libpromises/evalfunction.c Outdated
Comment thread libpromises/evalfunction.c Outdated
Comment thread libpromises/evalfunction.c Outdated
Comment thread libpromises/evalfunction.c
Comment thread libpromises/evalfunction.c Outdated
Comment thread libpromises/evalfunction.c Fixed
Comment thread libpromises/evalfunction.c Fixed
Comment thread libpromises/evalfunction.c Fixed
@victormlg victormlg force-pushed the findlocalgroups branch 3 times, most recently from 2f96295 to a243d85 Compare September 30, 2025 11:28
@victormlg victormlg requested a review from larsewi September 30, 2025 11:30
Comment thread libpromises/evalfunction.c
Comment thread libpromises/evalfunction.c Outdated
Comment thread libpromises/evalfunction.c Outdated

@craigcomstock craigcomstock left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, looks good with a few comments.

Comment thread libpromises/evalfunction.c Outdated
Comment thread tests/acceptance/01_vars/02_functions/findlocalgroups.cf Outdated

# using regex
"simple_regex" slist => { "name=roo.*" };
"number_regex" slist => { "gid=0.*" };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see the number regex, what about character classes like [0-9] and such?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The test is very limited because I want it to be predictable. For now the only matching group is root

Comment thread tests/acceptance/01_vars/02_functions/findlocalgroups.cf Outdated
Comment thread tests/acceptance/01_vars/02_functions/findlocalgroups.cf Outdated
Ticket: CFE-4550
Changelog: Title
Signed-off-by: Victor Moene <victor.moene@northern.tech>

@larsewi larsewi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

Comment thread libpromises/evalfunction.c

@larsewi larsewi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like you have a failing acceptance test

Ticket: CFE-4550
Signed-off-by: Victor Moene <victor.moene@northern.tech>
@larsewi

larsewi commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

@cf-bottom Jenkins please :)

@cf-bottom

Copy link
Copy Markdown

@olehermanse olehermanse changed the title CFE-4550: Findlocalgroups CFE-4550: Added findlocalgroups() policy function Oct 3, 2025
@olehermanse olehermanse merged commit 77573d7 into cfengine:master Oct 3, 2025
38 of 40 checks passed
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.

6 participants