{"record":{"id":"d1f5d8e2b6aaab12","repo":"influxdata/influxdb","slug":"plugin-environment-management-is-disabled","errorCode":null,"errorMessage":"Plugin environment management is disabled","messagePattern":"Plugin environment management is disabled","errorType":"exception","errorClass":"PluginEnvironmentError","httpStatus":null,"severity":"error","filePath":"influxdb3_processing_engine/src/environment.rs","lineNumber":19,"sourceCode":"use crate::environment::PluginEnvironmentError::PluginEnvironmentDisabled;\n\nuse crate::virtualenv::{VenvError, find_python, initialize_venv};\nuse observability_deps::tracing::debug;\nuse pyo3::prelude::PyAnyMethods;\nuse pyo3::{PyResult, Python};\nuse std::fmt::Debug;\nuse std::path::{Path, PathBuf};\nuse std::process::Command;\nuse std::sync::{Arc, OnceLock};\nuse thiserror::Error;\n\n#[derive(Error, Debug)]\npub enum PluginEnvironmentError {\n    #[error(\"Package manager not available: {0}\")]\n    PackageManagerNotFound(String),\n    #[error(\"External call failed: {0}\")]\n    InstallationFailed(#[from] std::io::Error),\n    #[error(\"Plugin environment management is disabled\")]\n    PluginEnvironmentDisabled,\n\n    #[error(\"Virtual environment error: {0}\")]\n    VenvError(#[from] VenvError),\n\n    #[error(\"Failed to list packages: {0}\")]\n    PackageListFailed(String),\n\n    #[error(\n        \"Package installation has been disabled. Contact your administrator for more information.\"\n    )]\n    PackageInstallationDisabled,\n}\n\npub trait PythonEnvironmentManager: Debug + Send + Sync + 'static {\n    fn init_pyenv(\n        &self,\n        plugin_dir: Option<&Path>,","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_processing_engine/src/environment.rs#L1-L37","documentation":"PluginEnvironmentError::PluginEnvironmentDisabled is thrown when plugin environment management operations are requested while the processing engine's environment management feature is explicitly disabled in configuration. It carries no payload; it is a pure configuration/state guard.","triggerScenarios":"A plugin requests environment setup (installing packages, creating a venv) while the server was started with environment management disabled (e.g. a config flag like plugin-env-management off).","commonSituations":"Operators disable environment management in production for security (no arbitrary package installs); a plugin that needs dependencies is deployed to a locked-down instance; config differs between staging (enabled) and prod (disabled).","solutions":["Enable plugin environment management in the influxdb3 processing engine configuration","Pre-install the plugin's dependencies manually and skip environment setup for that plugin","Bake dependencies into a custom image and keep management disabled","Confirm with the administrator whether the feature is intentionally off"],"exampleFix":"# before\ntomlq -i '.processing_engine.environment_management = false' influxdb3.conf\n# after\ntomlq -i '.processing_engine.environment_management = true' influxdb3.conf","handlingStrategy":"validation","validationCode":"# check the flag before deploying a plugin that needs env setup\nenabled=$(tomlq -r '.processing_engine.environment_management // false' influxdb3.conf)\n[ \"$enabled\" = \"true\" ] || { echo 'env management disabled'; exit 1; }","typeGuard":null,"tryCatchPattern":"match env_manager.setup(plugin).await {\n    Err(PluginEnvironmentError::PluginEnvironmentDisabled) => {\n        eprintln!(\"env management disabled; pre-install deps for this plugin\");\n        use_preinstalled_env(plugin)\n    }\n    other => other,\n}","preventionTips":["Align config between staging and production regarding env management","Pre-install plugin dependencies when the feature is disabled","Ask the operator before shipping plugins that require runtime env setup","Document the enabling flag in deployment runbooks"],"tags":["rust","plugin-environment","disabled","configuration"],"backgroundTag":"feature-not-enabled","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}