Skip to content

Influxdb2 write mode - #15

Merged
forestmvey merged 4 commits into
integ-influxdb2-write-modefrom
influxdb2-write-mode
Aug 10, 2026
Merged

Influxdb2 write mode#15
forestmvey merged 4 commits into
integ-influxdb2-write-modefrom
influxdb2-write-mode

Conversation

@forestmvey

@forestmvey forestmvey commented Aug 7, 2026

Copy link
Copy Markdown

Summary

Adds an operator-controlled INFLUXDB_WRITE_MODE environment variable that governs whether write-producing Flux operations (to(), experimental.to(), wideTo()) are permitted through the InfluxDBQuery tool. When disabled (the default), queries containing these functions are rejected before reaching InfluxDB.

Changes

  • New INFLUXDB_WRITE_MODE environment variable (default: false). Operator-controlled and not overridable by tool callers.
  • validate_flux_query() function that detects write-producing Flux patterns and rejects them when write mode is disabled. Handles pipe-forward syntax, qualified calls, aliased imports, and ignores commented-out code.
  • Validation integrated into InfluxDBQuery before any network call is made.
  • 21 new tests covering blocked patterns, false-positive avoidance, write-mode opt-in, and normal read queries passing through.

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Is this a breaking change? (Y/N)

N

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

@forestmvey
forestmvey force-pushed the influxdb2-write-mode branch from ebf7b0f to 00ad6dd Compare August 7, 2026 23:46
Signed-off-by: Forest Vey <veforest@amazon.com>
@forestmvey
forestmvey force-pushed the influxdb2-write-mode branch from 00ad6dd to 984e4f6 Compare August 7, 2026 23:54
Signed-off-by: Forest Vey <veforest@amazon.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
Signed-off-by: forestmvey <forestv@bitquilltech.com>
@forestmvey
forestmvey merged commit 740e6d1 into integ-influxdb2-write-mode Aug 10, 2026
139 of 140 checks passed
@forestmvey
forestmvey deleted the influxdb2-write-mode branch August 10, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants