Commit Graph

49781 Commits (97afe1a9fe48284b1f0273db307300ad088409bd)

Author SHA1 Message Date
Peter Barnett 97afe1a9fe fix: libexec 2025-08-22 17:57:28 -04:00
Peter Barnett 87f8d1c425 fix: update to require the bundled Python 2025-08-20 16:50:32 -04:00
Peter Barnett 085f2645a7 fix: clarify 2025-08-18 14:01:54 -04:00
Peter Barnett 537fafbb15 fix: update to remove warnings and follow better practices 2025-08-18 13:58:09 -04:00
Peter Barnett 2fc9742957 chore: add homebrew recipe 2025-08-17 21:22:25 -04:00
praveen-influx 277e153a44
feat: upgrade to hyper 1 (#26655)
* feat: upgrade to hyper 1

- use `hyper_util` for `TokioIo` and `ConnectionBuilder` from it
- remove `hybrid` service running grpc/http on same port to new
  `UnifiedService`, uses less generics
- swap `hyper_util::client::legacy::Client` for `hyper::Client`
- TLS changes, set ALPN protocol
- Test code changes, instead of `hyper::{StatusCode, Method}` use `reqwest::{StatusCode, Method}`
- rustls initialization (crypto provider) needs to be done explicitly now
- graceful shutdown + tidy ups
- move tokio-rustls to root Cargo.toml

helps: https://github.com/influxdata/influxdb_pro/issues/1076

* feat: upgrade all non-hyper libraries

- update arrow/datafusion/object_store/parquet related dependencies to align with `iox` (or `influxdb3_core`)
- move of `datafusion::physical_plan::memory::MemoryExec`, the actual alternative is to use `MemorySourceConfig` and `DataSourceExec` directly
- move from `use parquet_file::storage::ParquetExecInput;` to `use parquet_file::storage::DataSourceExecInput;`
- object_store life time requirement changes, mostly switch to `'static`
- object_store crate deprecating `PutMultiPartOpts` in favour of `PutMultiPartOptions`
- `Range<usize>` to `Range<u64>` move in object_store. Most of them are updates to method signatures in impls but the parquet_cache one which needed bit more attention

closes: https://github.com/influxdata/influxdb_pro/issues/1076

* refactor: address feedback
2025-08-12 20:01:23 +01:00
Trevor Hilton 01b9172bfa
chore: back-port #1114 from enterprise (#26688) 2025-08-12 07:41:31 -04:00
Jamie Strandboge 04d24b2d09
fix(py): update to python 3.13.6-20250808 for security fixes (#26686)
* fix(ci): update fetch-python to use new SHA256SUMS from upstream

* fix(py): update to python 3.13.6-20250808 for security fixes
2025-08-11 13:37:05 -05:00
Michael Gattozzi 992a2df513
fix(security): remove unsafe signal_handler code (#26685)
This commit addresses the fact that our signal_handler function on Unix
systems is not async signal safe, due to the fact that doing heap
allocation to print out the signal and stack trace as well as getting
the current thread name and grabbing a backtrace are not guaranteed to
be unsafe.

We can figure out a way to print out this information in the future
possibly, but in order to remove the possible vulnerability this commit
simply leaves a comment with context and just sets us to abort the
process.

Closes influxdb_pro/971 which contains the security report that brought
this issue to our attention.
2025-08-11 11:28:33 -04:00
Trevor Hilton 344c1a6913
chore: update Rust toolchain to 1.89.0 (#26683)
* chore: update rust toolchain to 1.89.0

* chore: fix clippy lints from 1.89.0
2025-08-11 11:27:45 -04:00
Trevor Hilton 044d57dab2
chore: add back-port claude command (#26678) 2025-08-07 18:01:27 -04:00
Trevor Hilton 5395b197bb
fix: validate tag and field names when creating tables (#26641)
* fix: validate tag and field names when creating tables

Add validation to ensure tag and field names follow line protocol rules
when creating tables via the catalog API. This prevents creating tables
with invalid column names that would be rejected by the line protocol
parser.

The validation checks that tag and field names:
- Are not empty
- Do not contain spaces
- Do not contain commas
- Do not contain equals signs

Closes #26486

* test: add tests for tag and field name validation

Add unit tests using rstest to verify that the create_table method
properly validates tag and field names according to line protocol rules.

The tests cover:
- Invalid cases: empty names
- Valid cases: simple names, underscores, numbers, and mixed alphanumeric
- Valid cases with escapes
- Verification that tables are created correctly with valid names

This ensures the validation added in the previous commit works as expected.

* test: cli integration test to verify tag/field name rules

* feat: reject control characters in tag/field keys
2025-07-30 12:32:59 -04:00
Trevor Hilton 545a51d71b
chore: update install script for 3.3.0 (#26646) 2025-07-30 09:21:46 -04:00
Trevor Hilton 75a87af3c5
chore: update Cargo.toml to 3.4.0-nightly (#26645) 2025-07-29 20:17:10 -04:00
Martin Hilton f855a8df6b
feat: influxdb_schema system table (#26640)
* feat: influxdb_schema system table

Add a system table to expose the InfluxDB schema for tables in a
database. This exposes the schema of time series tables using InfluxDB
terminology and data type definitions.
2025-07-29 07:25:19 +01:00
wayne c765d50d39
feat: introduce TableIndexSnapshot, TableIndex, and TableIndexCache (#26636)
This commit brings over `TableIndexCache` support from the enterprise
repo. It primarily focuses on efficient automatic cleanup of expired
gen1 parquet files based on retention policies and hard deletes. It

- Adds purge operations for tables and retention period expired data.
- Integrates `TableIndexCache` into `PersistedFiles` for the sake of
  parquet data deletion handling in `ObjectDeleter` impl.
- Introduces a new background loop for applying data retention polices
  with a 30m default interval.
- Includes comprehensive test coverage for cache operations, concurrent
  access, persisted snapshot to table index snapshot splits, purge
  scenario, object store path parsing, etc.

\## New Types

- `influxdb3_write::table_index::TableIndex`:
  - A new trait that tracks gen1 parquet file metadata on a per-table
    basis.

- `influxdb3_write::table_index::TableIndexSnapshot`:
  - An incremental snapshot of added and removed gen1 parquet files.
  - Created by splitting a `PersistedSnapshot` (ie a whole-database
    snapshot) into individual table snapshots.
  - Uses the existing snapshot sequence number.
  - Removed from object store after successful aggregation into
    `CoreTableIndex`.

- `influxdb3_write::table_index::CoreTableIndex`:
  - Implements of `TableIndex` trait.
  - Aggregation of `TableIndexSnapshot`s.
  - Not versioned -- assumes that we will migrate away from Parquet in
    favor of PachaTree in the medium/long term.

- `influxdb3_write::table_index_cache::TableIndexCache`
  - LRU cache
  - Configurable via CLI parameters:
    - Concurrency of object store operations.
    - Maximum number of `CachedTableIndex` to allow before evicting
      oldest entries.
  - Entrypoint for handling conversion of `PersistedSnapshot` to
    `TableIndexSnapshot` to `TableIndex`

- `influxdb3_write::table_index_cache::CachedTableIndex`
  - Implements `TableIndex` trait
  - Accessing ParquetFile or TableIndex causes last access time to be
    updated.
  - Stores a mutable `CoreTableIndex` as implementation detail.

- `influxdb3_write::retention_period_handler::RetentionPeriodHandler`
  - Runs a top-level background task that periodically applies retention
    periods to gen1 files via the `TableIndexCache`.
  - Configurable via CLI parameters:
    - Retention period handling interval

\## Updated Types

- `influxdb3_write::persisted_files::PersistedFiles`
  - Now holds an `Arc` reference to `TableIndexCache`
  - Uses its `TableIndexCache` to apply hard deletion to all historical
    gen1 files and update associated `CoreTableIndex` in the object
    store.
2025-07-28 13:23:56 -06:00
Oleksandr Natalenko e9d4f6c85b
feat: allow passing git hash via environment variable in build.rs (#26618)
This allows building from a release tarball without invoking git.

Closes: https://github.com/influxdata/influxdb/issues/25266

Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name>
2025-07-28 10:36:42 -04:00
praveen-influx a6bec9cd27
feat: admin token recovery (#26594)
* feat: additional server setup for admin token recovery

- new server to only serve admin token regeneration without an admin
  token has been added
- minor refactors to allow reuse of some of the utilities like trace
  layer for metrics moved to their own functions to allow them to be
  instantiated for both servers
- tests added to check if both the new server works right for
  regenerating token and also ensure none of the other functionalities
  are available on the admin token recovery server

closes: https://github.com/influxdata/influxdb/issues/26330

* refactor: tidy ups + extra logging

* refactor: address PR feedback

- recovery server now only starts when `--admin-token-recovery-http-bind` is passed in
- as soon as regeneration is done, the recovery server shuts itself down
- the select! macro logic has been changed such that shutting down
  recovery server does not shutdown the main server

* refactor: host url updates when regenerating token

- when `--regenerate` is passed in, `--host` still defaults to the main
  server. To get to the recovery server, `--host` with the recovery
  server address should be passed in
2025-07-18 20:03:46 +01:00
praveen-influx 2392878850
feat: additional logging in the write path to capture db and ip (#26616)
* feat: additional logging in the write path to capture db and ip

closes: https://github.com/influxdata/influxdb_pro/issues/519

* refactor: address PR feedback
2025-07-18 16:40:12 +01:00
Charles Thomas e093440d88
ci: fix `fetch-python` (#26613)
download python tarball outside of the circle working dir, and set its
ownership to prevent the tarball from changing while it's being archived

cache `python-artifacts` in a path that doesn't change between pipeline
runs
2025-07-16 16:14:33 -04:00
Trevor Hilton 26119893a0
chore: backport module documentation for influxdb3_catalog (#26606)
This backports PR #1004 from influxdb_pro which adds comprehensive
module documentation to influxdb3_catalog explaining the catalog
persistence system and version migration instructions.

The documentation covers:
- Catalog persistence using log and snapshot files
- Version management and migration patterns
- Step-by-step instructions for adding new versions
- Important considerations for maintaining backward compatibility
2025-07-14 21:22:29 -04:00
Michael Gattozzi 015933f5c1
fix: URL encoded table name failures (#26586)
This commit fixes queries that could come back as failures due to
improperly quoted table names in queries. It also fixes issues in
Enterprise where compaction would fail due to double escaped names.

The fix is relatively simple:

- Use the parse not from function for the Path type in the object_store
  crate
- Quote escape table names in queries
2025-07-14 16:05:53 -04:00
wayne 77c37f4541
fix: AWS S3 API returns object_store::Error::Generic variant when token is expired (#1013) (#26605) 2025-07-11 15:13:13 -06:00
Trevor Hilton ee2dc2603e
feat: add system.processing_engine_trigger_arguments table (#26604)
Add a new system table that allows users to inspect the arguments
configured for processing engine triggers. The table has three columns:
- trigger_name: name of the trigger
- argument_key: key of the argument
- argument_value: value of the argument

Each trigger argument appears as a separate row in the table, making
it easy to query specific triggers or arguments.

Update snapshot files to include processing_engine_trigger_arguments table

Update test snapshots to include the new processing_engine_trigger_arguments
system table in:
- Table listing outputs
- Error messages showing valid table names
- Table summaries

This ensures tests properly reflect the new system table in their
expected outputs.
2025-07-11 11:41:14 -07:00
Jamie Strandboge eb269a9e57
chore: use influxdata-archive.key in docker/Dockerfile.ci (#26595) 2025-07-09 12:09:53 -05:00
Charles Thomas 8a29f0250a
ci: use self-hosted circle runners, with workspace isolation (#26560)
also changes `PBS_DATE` & `PBS_VERSION` caching to use
`<< pipeline.parameters >>` instead of `<< checksum >>` of a file, so
that `/tmp/pbs_version` can't change if two different jobs run on the
same runner at the same time

additionally, remove as many `*` as possible in the `deb` & `rpm`
validation, because it appears it's getting interpretted in different
places between the amd & arm runners and containers
2025-07-07 14:27:56 -04:00
praveen-influx c681ea058d
refactor: remove server builder refactor (#26550)
* feat: additional endpoint to route secure request added

* feat: added server builder with options instead of generics

* feat: amend existing types to use new builder

* refactor: remove builder completely and initialize `Server` directly

closes: https://github.com/influxdata/influxdb/issues/25903

* refactor: use CreateServerArgs to address lint error
2025-07-04 12:19:37 +01:00
praveen-influx 69808c7798
chore: updates to RELEASE.md (#26589)
- changed the example branch names as they don't work verbatim
2025-07-04 11:55:30 +01:00
praveen-influx 71a80166ce
chore: update version in install script (#26588) 2025-07-03 20:40:58 +01:00
Trevor Hilton 5daca6eb7b
chore: remove README from packaged files in build (#26587) 2025-07-03 10:01:01 -07:00
Stuart Carnie 58b0725cf9
fix: Existing soft-deleted schema can be hard-deleted (#26574)
* feat: Allow hard_deleted date of deleted schema to be updated

* feat: Include hard_deletion_date in `_internal` `databases` and `tables`

* feat: Unit tests for testing deleted databases

* chore: Default is now to hard-delete with default duration

* test: Update test names and assertions for new default hard deletion behavior

- Renamed delete_table_defaults_to_hard_delete_never to delete_table_defaults_to_hard_delete_default
- Renamed delete_database_defaults_to_hard_delete_never to delete_database_defaults_to_hard_delete_default
- Updated assertions to expect default deletion duration instead of None/Never
- Aligns with the change of HardDeletionTime default from Never to Default

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: Remove TODO

* chore: PR feedback and other improvements

* Ensure system databases and tables schema specify a timezone for the
  `hard_deletion_time` Timestamp columns (otherwise they display without
  a timezone)
* `DELETE` using `default` delay is idempotent, so multiple requests
  will not continue to update the `hard_deletion_time`
* Improved test coverage for these behaviours

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-03 07:26:13 +10:00
wayne ad73deef08
fix: v1 query API should default to ns for CSV output (#26577) 2025-07-01 12:09:49 -06:00
praveen-influx 1f02b3cda6
chore: updates to Dockerfile (#26576)
- update rust version to 1.88
- remove defaulting to `file` for object store

helps: https://github.com/influxdata/influxdb_pro/issues/976
2025-07-01 18:57:14 +01:00
praveen-influx 4694c83c86
fix: --object-store is explicitly marked required (#26575)
Before this commit, although `--object-store` is mandatory it is not
reflected in the error messages. The examples are listed in the issue
976.

This commit makes `object_store` explicitly required which means error
messages include `--object-store` listed as mandatory

closes: https://github.com/influxdata/influxdb_pro/issues/976
2025-07-01 17:23:04 +01:00
Michael Gattozzi 5b038cd820
fix: Add help text for the new update subcommand (#26569)
This adds the update command to the help text output which was an
oversight from my work in #26520.
2025-06-30 12:36:37 -04:00
Stuart Carnie d396921aa0
chore: Update to Rust 1.88 (#26567)
* chore: Update to Rust 1.88

* chore: Fixes missed by Claude
2025-06-27 07:38:45 +10:00
praveen-influx 15d81fdcec
chore: version bump in Cargo.toml to 3.3.0-nightly (#26566)
* chore: version bump in Cargo.toml to 3.3.0-nightly

* chore: update install script to point to 3.2.0 version
2025-06-26 12:30:38 +01:00
praveen-influx 3fe9aa5802
chore: fix failing test (#26558) 2025-06-24 13:53:02 +01:00
Stuart Carnie 01c907de0e
fix: handle corrupt WAL files during replay without panic (#26556)
Add bounds checking to prevent panic when WAL files are empty or
truncated. Introduces `--wal-replay-fail-on-error` flag to control
behavior when encountering corrupt WAL files during replay.

- Add WalFileTooSmall error for files missing required header bytes
- Validate minimum file size (12 bytes) before attempting
  deserialization
- Make WAL replay configurable: skip corrupt files by default or fail
  on error
- Add comprehensive tests for empty, truncated, and header-only files

Closes #26549
2025-06-24 12:57:40 +01:00
Stuart Carnie 4c8283dd6f
feat: Hard delete database and table (#26553)
* feat: Hard delete database and table

* feat: Enable hard-deletion in OSS
2025-06-24 12:36:23 +01:00
wayne c205fefa17
fix: revert self-hosted runner for now (#26555)
* Revert "ci: add `sync`s for `fetch-python` (#26526)"

This reverts commit 048885e3d8.

* Revert "ci: move some circleci tasks to self-hosted runners (#26514)"

This reverts commit 2143e49ae0.
2025-06-23 16:54:48 -06:00
wayne c491110093
feat: support reloading ephemeral AWS credentials via file (#26537)
* feat: introduce re-authenticating ObjectStore adapter for AWS file credentials
* test: validate AwsCredentialReloader background update behavior
* test: add tests and fixtures to validate ReauthingObjectStore behavior
* docs: add --aws-credentials-file to manually-curated docstrings
2025-06-18 10:43:32 -06:00
wayne 8e0688912f
feat: allow users to specify lookback duration for PersistedFiles buffer (#26528) 2025-06-18 09:41:05 -06:00
praveen-influx 6bb0401c69
chore: porting some utilities that were created in pro (#26529)
- `AbortableTaskRunner` and it's friends in influxdb3_shutdown
- `ProcessUuidWrapper` and it's friends in influxdb3_process
- change sleep time in test

They're not used currently in any of the core code, but helps when
sync'ing core back to enterprise
2025-06-17 17:24:41 +01:00
Charles Thomas 048885e3d8
ci: add `sync`s for `fetch-python` (#26526)
after moving to the self-hosted runners we've seen issues before and
after creating `all.tar.gz`. add `sync` before & after creating it to
make sure the files don't change during the relevant operations
2025-06-16 16:29:07 -05:00
wayne 5882034b74
refactor: split into binary and library targets (#26521) 2025-06-16 11:37:29 -06:00
Charles Thomas 2143e49ae0
ci: move some circleci tasks to self-hosted runners (#26514)
* ci: move some circleci tasks to self-hosted runners

we have self-hosted circleci runners. migrating to them will reduce the
cost dramatically. this only moves `machine:` jobs. work needs to be
done on the hosts before migrating the `docker:` jobs

* test(ci): change some filters to run jobs that otherwise wouldn't run

in order to test them on the self-hosted runners

if / when they pass, this commit needs to be dropped before merging

* ci: cleanup package-validation, run verification in containers

run the package validation scripts in containers on the self-hosted
runners. this has the benefit of not needing terraform, and also
prevents issues cleaning up the install on the long-lived runners by
using an ephemeral container for the installation

* ci: reset filters

several filters were changed for testing. this puts them back to their
original values
2025-06-16 11:16:52 -04:00
Michael Gattozzi d07d2f75a2
feat: Add retention period to cli commands (#26520)
This commit touches quite a few things, but the main changes that need
to be taken into account are:

- An update command has been added to the CLI. This could be further
  extended in the future to update more than just Database retention
  periods. The API call for that has been written in such a
  way as to allow other qualities of the database to be updated
  at runtime from one API call. For now it only allows the retention
  period to be updated, but it could in theory allow us to rename a
  database without needing to wipe things, especially with a stable ID
  underlying everything.
- The create database command has been extended to allow
  its creation with a retention period. In tandem with the update
  command users can now assign or delete retention periods at will
- The ability to query catalog data about both databases and tables has
  been added as well. This has been used in tests added in this commit,
  but is also a fairly useful query when wanting to look at things such
  as the series key. This could be extended to a CLI command as well if
  we want to allow users to look at this data, but for now it's in the
  _internal table.

With these changes a nice UX has been created to allow our customers to
work with retention periods.
2025-06-16 10:22:45 -04:00
Jamie Strandboge 4cdf57d6dc
fix(py): update to python 3.13.5-20250612 for security fixes (#26518)
* fix(py): update to python 3.13.5-20250612 for security fixes

3.13.4 fixed various CVEs. Upgrade to 3.13.5 per upstream expedited
release to fix problems with 3.13.4.

* https://www.python.org/downloads/release/python-3133/
* https://www.python.org/downloads/release/python-3134/
* https://www.python.org/downloads/release/python-3135/

* fix(py): use equivalent x86_64-pc-windows-msvc instead of -shared variant

Per https://github.com/astral-sh/python-build-standalone/releases/tag/20250311,
"Windows artifacts with the -shared suffix will no longer be published:
this variant became the default in 20240415 and duplicate archives have
been published under the -shared suffix for backwards compatibility. Use
the equivalent archives without the suffix.

* chore: update README_processing_engine.md for latest versions
2025-06-13 14:01:30 -05:00
Jamie Strandboge bc41c04656
chore: cache python-build-standalone in CircleCI (#26513)
Closes #26013
2025-06-12 21:11:12 -05:00