Skip to content

Add InfluxDB importer - #170

Merged
Gerrrr merged 5 commits into
apache:masterfrom
adambernier:add-influxdb-importer-clean
Aug 24, 2026
Merged

Add InfluxDB importer#170
Gerrrr merged 5 commits into
apache:masterfrom
adambernier:add-influxdb-importer-clean

Conversation

@adambernier

Copy link
Copy Markdown
Contributor

Add InfluxDB 3 configuration, query importing, Arrow result normalization, tests,
documentation, and CLI help snapshots.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds InfluxDB 3 as an import source across configuration, querying, CLI, tests, and documentation.

Changes:

  • Adds InfluxDB connection and test configuration.
  • Imports and normalizes Arrow query results.
  • Adds dependencies, tests, CLI snapshots, and documentation.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
uv.lock Locks InfluxDB client dependencies.
pyproject.toml Adds the InfluxDB client dependency.
otava/influxdb.py Implements the client wrapper.
otava/importer.py Adds InfluxDB result importing.
otava/config.py Wires connection configuration into the CLI.
otava/test_config.py Parses InfluxDB test definitions.
tests/influxdb_test.py Tests configuration and importing.
tests/cli_help_test.py Updates CLI help snapshots.
README.md Lists InfluxDB support.
docs/README.md Links the InfluxDB guide.
docs/INFLUXDB.md Documents InfluxDB usage.
examples/influxdb/otava.yaml Provides an example configuration.
Suppressed comments (1)

otava/importer.py:885

  • InfluxDB 3 returns its Arrow time column as a timezone-less timestamp, and to_pylist() therefore yields a naive datetime. DataSelector boundaries are timezone-aware, so this comparison raises TypeError: can't compare offset-naive and offset-aware datetimes for real query results. Normalize naive InfluxDB timestamps as UTC before filtering and converting to epoch seconds; the test currently constructs a timezone-aware Arrow schema and misses this production shape.
            timestamp = row[time_index]
            if timestamp < since_time or timestamp >= until_time:

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread otava/importer.py Outdated

@Gerrrr Gerrrr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the contribution! This PR looks good overall, but needs a few changes to get ready for merge. Please also rebase against latest master - I had to update dependencies to fix CI.

Comment thread otava/importer.py
Comment thread tests/influxdb_test.py
Comment thread examples/influxdb/otava.yaml
@adambernier
adambernier force-pushed the add-influxdb-importer-clean branch from a53da17 to 0e5b49f Compare August 24, 2026 04:02
@adambernier

adambernier commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@Gerrrr thanks for the comments, just now seeing your add'l notes. i'll update the PR with changes to account for those

@adambernier

adambernier commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up commits 8757974 and 61dc2d6 are pushed. Local validation is green (204 tests, including the new authenticated InfluxDB SQL/InfluxQL E2E test; Ruff, Autoflake, isort, Flake8, license hooks, Compose config, and the Docker build/example workflow).

Whenever is convenient, a maintainer would need to re-approve/run the Python 3.10–3.14 matrix and dependent docker-build job. The prior 3.14 failure was the version-specific list.index() ValueError text; 61dc2d6 now constructs the stable Otava missing-column error directly.

@Gerrrr Gerrrr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 more minor changes + fix rebase conflict and it will be ready to merge.

Comment thread tests/influxdb_e2e_test.py Outdated
Comment thread docs/INFLUXDB.md
@adambernier
adambernier force-pushed the add-influxdb-importer-clean branch from 61dc2d6 to 7c47ab5 Compare August 24, 2026 15:27
@adambernier

Copy link
Copy Markdown
Contributor Author

Rebased onto 19882e9 and addressed the two latest review comments in 7c47ab5. Local validation is green: 220 tests (including the public-CLI SQL/InfluxQL Docker E2E), all configured lint/license checks, Compose config/build/example and seed idempotence, plus locked installs on Python 3.10–3.14. The refreshed Python application workflow is awaiting maintainer approval at https://github.com/apache/otava/actions/runs/32744967567; @Gerrrr, when convenient, please approve it so the Python matrix and dependent docker-build job can run.

@Gerrrr
Gerrrr merged commit de46ddf into apache:master Aug 24, 2026
6 checks passed
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.

3 participants