Skip to content

fix(plugin): inconsistent name handling in addConfig/removeConfig prevents updates and orphans config on deletion#236

Merged
poiana merged 2 commits intofalcosecurity:mainfrom
c2ndev:fix/plugin-addconfig-removeconfig-name-handling
Feb 13, 2026
Merged

fix(plugin): inconsistent name handling in addConfig/removeConfig prevents updates and orphans config on deletion#236
poiana merged 2 commits intofalcosecurity:mainfrom
c2ndev:fix/plugin-addconfig-removeconfig-name-handling

Conversation

@c2ndev
Copy link
Contributor

@c2ndev c2ndev commented Feb 11, 2026

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area falco-operator

/area artifact-operator

/area pkg

/area api

/area docs

What this PR does / why we need it:

Fixes two bugs in PluginsConfig.addConfig() and removeConfig() caused by inconsistent name handling:

  1. Plugin config updates silently ignored: addConfig() used isSame() (full equality) to find existing entries instead of matching by name. When initConfig or openParams changed, the old entry was not found/removed and the name check prevented the new one from being added.
  2. Orphaned config on deletion: addConfig() stored plugins[].name using spec.config.name but load_plugins[] using the CR metadata.name. On deletion, removeConfig() compared both lists against metadata.name, failing to remove the plugins[] entry when spec.config.name differed.

Which issue(s) this PR fixes:

Fixes #235

Special notes for your reviewer:

…dd testify tests

Signed-off-by: cannarelladev <cannarella.dev@gmail.com>
…act resolveConfigName helper

Signed-off-by: cannarelladev <cannarella.dev@gmail.com>
@c2ndev c2ndev force-pushed the fix/plugin-addconfig-removeconfig-name-handling branch from 6d7118f to 0da36a9 Compare February 11, 2026 16:11
Copy link
Member

@alacuku alacuku left a comment

Choose a reason for hiding this comment

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

/lgtm

@poiana
Copy link

poiana commented Feb 13, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alacuku, c2ndev

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana
Copy link

poiana commented Feb 13, 2026

LGTM label has been added.

DetailsGit tree hash: 7980a2489c5469ee7cfd65d084bd090a1da7d2eb

@poiana poiana merged commit ab6fdf5 into falcosecurity:main Feb 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(plugin): inconsistent name handling in addConfig/removeConfig prevents updates and orphans config on deletion

3 participants