Commit Graph

49493 Commits (feat/add-flag-to-disable-telemetry)

Author SHA1 Message Date
wayne warren 33284945af chore: remove explicit predicates dependency 2025-01-17 14:20:36 -07:00
wayne warren d640a93a13 test: validate telemetry flags via stdout in CLI tests 2025-01-17 11:50:01 -07:00
wayne warren 725e0e4b1d feat: --telemetry-host option to facilitate CLI testing 2025-01-17 11:50:01 -07:00
wayne warren c551e1aa44 feat: add hidden CLI option to disable sending telemetry 2025-01-17 11:50:01 -07:00
Trevor Hilton 8ea6d65f8e
chore: bring back enterprise changes (#25858) 2025-01-17 13:24:32 -05:00
Jackson Newhouse 244ac567a8
fix(processing_engine): start triggers when server is started. (#25848) 2025-01-16 16:39:42 -08:00
Paul Dix eb0b1eb8c6
feat: improve plugin logging interface (#25851)
* feat: improve plugin logging interface

Updates the plugin log functions so they can take any number of Python objects which will be converted into a single log line string.

Closes #25847

* refactor: udpate on PR feedback
2025-01-16 18:02:14 -05:00
Paul Dix daa5cbd270
feat: better plugin errors for query and line building (#25850) 2025-01-16 16:57:30 -05:00
Paul Dix 1f71750bfe
feat: return better plugin execution errors (#25842)
* feat: return better plugin execution errors

This sets up the framework for fleshing out more useful plugin execution errors that get returned to the user during testing. We'll also want to capture these for logging in system tables.

Also fixes a test that was broken in previous commit on time limits. Didn't show up because of the feature flag.

* fix: compile errors without system-py feature
2025-01-16 15:58:05 -05:00
praveen-influx 6ebbf26763
refactor: update tests for wal file removal (#25846)
* refactor: update tests for wal file removal

- update the last wal file seen first so that removal doesn't
  wait for one more cycle
- added the worked out example test
- minor tidy ups (introduce inner so that block scopes are delegated)

* refactor: address PR feedback
2025-01-16 18:47:30 +00:00
Trevor Hilton b8a94488b5
feat: support v1 query API GROUP BY semantics (#25845)
This updates the v1 /query API hanlder to handle InfluxDB v1's unique
query response structure when GROUP BY clauses are provided.

The distinction is in the addition of a "tags" field to the emitted series
data that contains a map of the GROUP BY tags along with their distinct
values associated with the data in the "values" field.

This required splitting the QueryExecutor into two query paths for InfluxQL
and SQL, as this allowed for handling InfluxQL query parsing in advance
of query planning.

A set of snapshot tests were added to check that it all works.
2025-01-16 11:59:01 -05:00
praveen-influx 4eccc38129
fix: reproducer for the empty snapshot file issue (#25835)
* fix: reproducer for the empty snapshot file issue

* fix: avoid creating empty (0 dbs) snapshot file
2025-01-15 20:01:57 +00:00
Trevor Hilton 256da6e6a0
docs: update CONTRIBUTING.md (#25837) 2025-01-15 10:58:27 -05:00
cpinflux 26bf912db2
fix: create S3 client with from_env() instead of new() to allow eks and fargate container builds (#25829)
Creates AmazonS3 object using all environmental variables for additional cases where command line parameters are not appropriate.

This makes step 4 here possible - https://docs.aws.amazon.com/sdk-for-rust/latest/dg/credproviders.html

Alternative approach may have been to add a similar command line option for AWS_CONTAINER_CREDENTIALS_RELATIVE_URI but this makes no sense to provide on a CLI given it is only to be set automatically on Fargate and EKS containers.

As from_env() looks up all relevant environmental variables, it no longer makes sense to look for them as part of the CLI option parsing, so those relevant env options are removed.

Fixes #25828
2025-01-13 17:06:59 -05:00
Jamie Strandboge caeabcf52e
chore: use an unusable url instead of localhost for token create (#25830) 2025-01-13 16:59:10 -05:00
Jackson Newhouse 5b73485bef
feat: rework when docker builds and have main builds use release profile. (#25826) 2025-01-13 11:14:47 -08:00
peterbarnett03 624e67e95c
chore: update gsg link (#25823)
* chore: update gsg link

* chore: update influxdb to influxdb3
2025-01-13 09:58:15 -05:00
Paul Dix bbda4f7b29
feat: Update README with alpha details (#25822) 2025-01-13 09:43:55 -05:00
peterbarnett03 76aee4a478
chore: Add installation script (#25821)
* chore: updating temp file name

* chore: add install scripts
2025-01-13 09:23:43 -05:00
peterbarnett03 30fcc2bf54
chore: Add hold for install script (#25817) 2025-01-12 16:19:54 -05:00
Michael Gattozzi aa8a8c560d
feat: Set 72 hour query/write limit for Core (#25810)
This commit sets InfluxDB 3 Core to have a 72 hour limit for queries and
writes. What this means is that writes that contain historical data
older than 72 hours will be rejected and queries will filter out data
older than 72 hours. Core is intended to be a recent timeseries database
and performance over data older than 72 hours will degrade without a
garbage collector, a core feature of InfluxDB 3 Enterprise. InfluxDB 3
Enterprise does not have this write or query limit in place.

Note that this does *not* mean older data is deleted. Older data is
still accessible in object storage as Parquet files that can still be
used in other services and analyzed with dataframe libraries like pandas
and polars.

This commit does a few things:
- Uses timestamps in the year 2065 for tests as these should not break
  for longer than many of us will be working in our lifetimes. This is
  only needed for the integration tests as other tests use the
  MockProvider for time.
- Filters the buffer and persisted files to only show data newer than
  3 days ago
- Fixes the integration tests to work with the fact that writes older
  than 3 days are rejected
2025-01-12 13:08:01 -05:00
Paul Dix 4bfd95d068
feat: print plugin logs to the server (#25812) 2025-01-12 12:33:09 -05:00
Trevor Hilton db24a62658
refactor: change host-id to writer-id (#25804)
This changes the CLI arg `host-id` to `writer-id` to more accurately
indicate meaning.

This changes also goes through the codebase and changes struct fields,
methods, and variables to use the term `writer_id` or `writer_identifier_prefix`
instead of `host_id` etc., to make the meaning clear in the code.

This also changes the catalog serialization to use the field `writer_id`
instead of `host_id`, which is breaking change.
2025-01-12 11:40:47 -05:00
Trevor Hilton d170f922e9
fix: package signing artifact names to use core not edge (#25808) 2025-01-12 09:11:44 -05:00
Paul Dix 674598e047
chore: only publish Docker for main (#25807) 2025-01-12 08:52:21 -05:00
Trevor Hilton 01f1f7fa35
chore: update artifact name to use core not edge (#25805) 2025-01-12 07:25:34 -05:00
Jackson Newhouse 6e942b22c6
fix: change trigger shutdown implementation to avoid deadlock. (#25806) 2025-01-12 07:24:50 -05:00
Paul Dix 491a37b0d4
feat: Update create plugin to use server file (#25803)
This updates the create plugin API and CLI so that it doesn't take the pugin code, but instead takes a file name of a file that must be in the plugin-dir of the server. It returns an error if the plugin-dir is not configured or if the file isn't there.

Also updates the WAL and catalog so that it doesn't store the plugin code directly. The code is read from disk one time when the plugin runs.

Closes #25797
2025-01-11 21:02:51 -05:00
praveen-influx 50963443a4
feat: introduce num wal files to keep (#25801)
* feat: introduce num wal files to keep

This commit allows a configurable number of wal files to be left behind
in OS. This is necessary as enterprise replicas rely on these files.

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

* refactor: address PR feedback

* refactor: address PR comment
2025-01-12 00:33:13 +00:00
Jackson Newhouse 07bddff7f4
feat: parameterize docker image name, use influxdb3-core. (#25802) 2025-01-11 15:43:33 -08:00
Paul Dix ebf78aa6c9
feat: Updates to plugin API (#25799)
* Add uint64_field to LineBuilder
* Add bool_field to LineBuilder
* Change query_rows to query in Python API
* Update error output for test wal_plugin
2025-01-11 18:03:34 -05:00
Jackson Newhouse c5a0fa736e
feat(docker): Rework docker builds to push to quay and be multi-arch. (#25800) 2025-01-11 14:39:39 -08:00
Trevor Hilton 0bdc2fa953
chore: patch enterprise back to core (#25798) 2025-01-11 17:26:41 -05:00
Paul Dix e421baf0bc
feat: include specific plugin error to http response (#25794) 2025-01-11 14:32:36 -05:00
Paul Dix bdcdb4f296
refactor: rename plugin activate/deactivate to enable/disable (#25793)
Closes #25789
2025-01-11 13:40:24 -05:00
Trevor Hilton 1ff4f76896
feat: only load wal files after most recent snapshot (#25787) 2025-01-11 10:27:58 -05:00
praveen-influx 88e10928ed
feat: 1h sum fields for telem writes/queries (#25785)
closes: https://github.com/influxdata/influxdb/issues/25713
2025-01-10 22:56:17 +00:00
Paul Dix e8422a240a
feat: Wire up arguments to wal plugin trigger (#25783)
This allows the user to specify arguments that will be passed to each execution of a wal plugin trigger. The CLI test was updated to check this end to end.

Closes #25655
2025-01-10 16:58:18 -05:00
Jackson Newhouse 954416d4d9
fix(processing_engine): enable downstream system-py feature (#25784) 2025-01-10 13:44:24 -08:00
praveen-influx 15de3863f3
feat: use custom domain name for telemetry (#25782)
closes: https://github.com/influxdata/influxdb3_hub/issues/5
2025-01-10 19:53:04 +00:00
Paul Dix 0da0785960
feat: Finish wiring up WAL plugin with trigger (#25781)
This updates the WAL so that it can have new file notifiers added that will get updated when the wal flushes. The processing engine now implements the WALNotifier trait.

I've updated the CLI test for creating a trigger to run and end-to-end test that defines a plugin, creates a trigger, writes data into the database, triggering the plugin, which writes summary statistics back into the database in a different table. The test queries the destination table to confirm that the plugin worked.
2025-01-10 12:56:49 -05:00
Trevor Hilton c71dafc313
refactor: rename metadata cache to distinct value cache (#25775) 2025-01-10 08:48:51 -05:00
Trevor Hilton 7b4703d69e
chore: add helix config dir to gitignore (#25780) 2025-01-10 08:20:36 -05:00
Paul Dix 7230148b58
feat: Update WAL plugin for new structure (#25777)
* feat: Update WAL plugin for new structure

This ended up being a very large change set. In order to get around circular dependencies, the processing engine had to be moved into its own crate, which I think is ultimately much cleaner.

Unfortunately, this required changing a ton of things. There's more testing and things to add on to this, but I think it's important to get this through and build on it.

Importantly, the processing engine no longer resides inside the write buffer. Instead, it is attached to the HTTP server. It is now able to take a query executor, write buffer, and WAL so that the full range of functionality of the server can be exposed to the plugin API.

There are a bunch of system-py feature flags littered everywhere, which I'm hoping we can remove soon.

* refactor: PR feedback
2025-01-10 05:52:33 -05:00
Paul Dix 2d18a61949
feat: Add query API to Python plugins (#25766)
This ended up being a couple things rolled into one. In order to add a query API to the Python plugin, I had to pull the QueryExecutor trait out of server into a place so that the python crate could use it.

This implements the query API, but also fixes up the WAL plugin test CLI a bit. I've added a test in the CLI section so that it shows end-to-end operation of the WAL plugin test API and exercise of the entire Plugin API.

Closes #25757
2025-01-09 20:13:20 -05:00
Trevor Hilton 63d3b867f1
chore: patch changes from enterprise (#25776)
- reduce parquet row group size to 100k
- add cli option to disable cached parquet loader
2025-01-09 16:02:12 -05:00
praveen-influx aa9213c4f4
feat: check mem and force snapshot (#25767)
This commit allows checking memory in the background and force
snapshotting if query buffer size is > mem threshold. This hooks into
the function (`force_flush_buffer`) to achieve it.

closes: https://github.com/influxdata/influxdb/issues/25685
2025-01-09 18:40:14 +00:00
Michael Gattozzi be79008fb1
fix: get create token and meta_cache (#25773)
* fix: get create token subcommand to work again

In #25737 token creation was broken as a client would attempt to be
made, but hit an unreachable branch. The fix was to just make the branch
create a Client that won't do anything. We also add a test to make sure
that if there is a regression we'll catch it in the future.

Closes #25764

* fix: make client turn a duration into seconds/u64

This commit fixes the creation of a metadata cache made via the cli by
actually sending a time in seconds as a u64 and not as a duration. With
that we can now make metadata caches again when the `--max-age` flag is
specified.

This commit also adds a regression test for the CLI so that we can catch
this again in the future.
2025-01-09 12:05:21 -05:00
Trevor Hilton 23866ef3d1
fix: /query API emits empty result as JSON (#25769) 2025-01-09 09:26:30 -05:00
praveen-influx 6e2e39cd4c
feat: snapshot when wal buffer is empty (#25765)
* feat: snapshot when wal buffer is empty

- This commit changes the functionality to allow snapshots to happen even when
  wal buffer is empty. For snapshots wal periods are still required but
  not the wal buffer. To allow this, we write a no-op into wal file with
  snapshot details. This enables force snapshotting functionality

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

* refactor: address PR feedback
2025-01-09 12:12:37 +00:00