Skip to content

fix: respect plugins_loading.enabled config in zenohd#2461

Open
varunkamath wants to merge 1 commit intoeclipse-zenoh:mainfrom
varunkamath:fix/respect-plugins-loading-config
Open

fix: respect plugins_loading.enabled config in zenohd#2461
varunkamath wants to merge 1 commit intoeclipse-zenoh:mainfrom
varunkamath:fix/respect-plugins-loading-config

Conversation

@varunkamath
Copy link
Copy Markdown

@varunkamath varunkamath commented Mar 8, 2026

Description

What does this PR do?

Makes zenohd respect the user's plugins_loading.enabled configuration setting. Previously, zenohd unconditionally called config.plugins_loading.set_enabled(true), which overrode the user's config and caused plugins to load even when plugins_loading.enabled was not set to true.

Now plugin loading is only force-enabled when CLI args require it:

  • --plugin (explicitly loading a plugin)
  • --rest-http-port (implicitly requires the REST plugin)
  • --plugin-search-dir (implies plugin usage)

Why is this change needed?

The documented behavior states that plugins are only loaded if plugins_loading: { enabled: true }, but zenohd was ignoring this and always enabling plugin loading. This caused unexpected plugin load attempts and confusing error messages.

Related Issues

Fixes #2422


🏷️ Label-Based Checklist

Based on the labels applied to this PR, please complete these additional requirements:

Labels: bug

🐛 Bug Fix Requirements

Since this PR is labeled as a bug fix, please ensure:

  • Root cause documented - Explain what caused the bug in the PR description
  • Reproduction test added - Test that fails on main branch without the fix
  • Test passes with fix - The reproduction test passes with your changes
  • Regression prevention - Test will catch if this bug reoccurs in the future
  • Fix is minimal - Changes are focused only on fixing the bug
  • Related bugs checked - Verified no similar bugs exist in related code

Why this matters: Bugs without tests often reoccur.

Instructions:

  1. Check off items as you complete them (change - [ ] to - [x])
  2. The PR checklist CI will verify these are completed

This checklist updates automatically when labels change, but preserves your checked boxes.

@diogomatsubara diogomatsubara added the bug Something isn't working label Mar 9, 2026
zenohd unconditionally set `plugins_loading.enabled = true`, ignoring
the user's configuration. Now plugin loading is only force-enabled when
CLI args require it (`--plugin`, `--rest-http-port`, or
`--plugin-search-dir`), preserving the documented behavior.

Fixes eclipse-zenoh#2422

Signed-off-by: Varun Kamath <varunkamath@gmail.com>
@varunkamath varunkamath force-pushed the fix/respect-plugins-loading-config branch from 5e5c478 to 084f0a0 Compare March 11, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugins attempt to load without plugins_loading.enabled=true

2 participants