feat: resolve relative config paths via server-derivable fallbacks#103
Open
caterryan wants to merge 22 commits into
Open
feat: resolve relative config paths via server-derivable fallbacks#103caterryan wants to merge 22 commits into
caterryan wants to merge 22 commits into
Conversation
…tion When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…resolution When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…olution When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tion When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…solution When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tion When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…h resolution When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… resolution When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…olution When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…h resolution When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…olution When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv). Fallback candidates are accepted only if the file exists. Existing behavior is unchanged when PLUGIN_DIR is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…solution sagemaker already consults INFLUXDB3_PLUGIN_DIR in addition to PLUGIN_DIR; keep that precedence and append the remaining server-derivable fallback: the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv), accepted only if the file exists. Existing behavior is unchanged when either env var is set or the path is absolute. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When PLUGIN_DIR is unset, fall back to server-derivable locations: INFLUXDB3_PLUGIN_DIR (env-var form of --plugin-dir) and the parent of VIRTUAL_ENV (the processing engine's default venv is <plugin-dir>/.venv), accepted only if the file exists, before the original current-directory default. Existing behavior is unchanged when PLUGIN_DIR is set, and the _resolve_config signature used by the unit tests is preserved. Refs #99 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
22253b1 to
7383610
Compare
Aliaksei-Kharlap
approved these changes
Jun 11, 2026
All 21 plugins gained backward-compatible config path resolution fallbacks (#99), a semver-minor change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #99.
All 21 plugins that support TOML configuration resolve a relative
config_file_pathagainst thePLUGIN_DIRenvironment variable — which the InfluxDB 3 server never sets. This breaks the API-only workflow of uploading a config viaPOST /api/v3/plugins/filesand referencing it by the same relative path intrigger_arguments.This PR extends the resolution in all 21 plugins with two fallbacks consulted only when
PLUGIN_DIRis unset:PLUGIN_DIR— unchanged, keeps highest precedence (existing behavior).INFLUXDB3_PLUGIN_DIR— the documented env-var form of--plugin-dir; visible to plugin code when the operator configures the server that way (e.g. the official Docker image).Path(os.environ["VIRTUAL_ENV"]).parent— the processing engine activates a venv at startup whose default location is<plugin-dir>/.venv, so its parent is the plugin directory.Fallback candidates are accepted only if the resolved file actually exists; otherwise resolution fails with an error listing every location tried.
One commit per plugin (21 commits), identical treatment adapted to each plugin's existing style (
_resolve_pathhelpers in the subscriber/OPC UA plugins, inline blocks elsewhere). Two notes on the recently merged plugins:sagemakeralready consultedINFLUXDB3_PLUGIN_DIRalongsidePLUGIN_DIR; that precedence is kept and only theVIRTUAL_ENVfallback is appended.valuecounterpreviously defaulted to the current directory whenPLUGIN_DIRwas unset; that default is preserved as the final fallback, and the_resolve_configsignature used by its unit tests is unchanged (82/82 tests pass).Why this is non-breaking
PLUGIN_DIRset: unchanged result; fallbacks never consulted — verified by pointingPLUGIN_DIRat a different directory than--plugin-dirand observing identical resolution before/after.PLUGIN_DIRunset: previously always an error; the fallbacks only turn some of those errors into successes. The remaining failure case gains a clearer message.system_metricskeeps its original continue-without-config behavior when resolution fails (it never aborted the run, and still doesn't).Verification
python3 -m py_compileclean on all 21 modified files; valuecounter's unit suite passes (82/82).downsampler, noPLUGIN_DIRexported: uploadedconfigs/downsampler.tomlviaPOST /api/v3/plugins/files, created a trigger withconfig_file_path=configs/downsampler.toml, and observedReading config file/Config file loaded successfullyin the server log. The same setup previously failed withFailed to get PLUGIN_DIR env var.PLUGIN_DIRexported,INFLUXDB3_PLUGIN_DIR-configured server) verified live with a side-by-side probe plugin; details and observed output in Support API-only TOML config workflow: resolve relative config_file_path without requiring the operator to export PLUGIN_DIR #99.🤖 Generated with Claude Code