Commit Graph

49571 Commits (chore/fix-build-20250304)

Author SHA1 Message Date
Praveen Kumar 2d23be39ce
chore: rust ci job fix to address rustup 1.28.0 changes
- activate toolchain explicitly
- add clippy and rustfmt components
2025-03-04 10:17:11 +00:00
wayne 750387912e
fix: ensure active toolchain installation in Dockerfile (#26097) 2025-03-04 09:31:29 +00:00
wayne d1711d284a
fix: test case introduced by #26094 (#26096) 2025-03-03 17:27:23 -07:00
wayne e00e0f1a86
fix: allow equal sign in plugin trigger arguments (#26094) 2025-03-03 13:06:35 -07:00
wayne e2c3e7c8c8
feat: improve CLI list arg consistency (always use commas) (#26088)
* chore: eliminate SeparateList, use comma-delimited flag list options everywhere
* fix: remove num_args attribute from comma-delimited args
2025-03-03 12:52:13 -07:00
wayne a84c4a9a8b
fix: ensure "local" ObjectStore.list returns ordered elements (#26081) 2025-02-28 10:46:44 -07:00
Jackson Newhouse 208b82a32d
fix(processing_engine): Use default globals so that builtins are automatically included. (#26072) 2025-02-27 16:11:08 -08:00
Jamie Strandboge a82c13c260
chore: update to python 3.11.11+20250212 for libssl (#26049)
References:
- https://github.com/astral-sh/python-build-standalone/releases/tag/20250212
- https://github.com/astral-sh/python-build-standalone/commits/20250212/
2025-02-27 10:21:05 -06:00
Trevor Hilton d8efdb4024
Revert "chore: fix shellcheck lints (#25956)" (#26067)
This reverts commit 891da53382.
2025-02-26 16:29:05 -05:00
Jamie Strandboge aa09d761a0
chore: clean up runtime code for python setup (#26042)
* chore: clean up runtime code for python setup

ccd5d22aab introduced working but temporary code for setting up the
python runtime environment. This cleans that up:

* refactor various find_python() functionality into virtualenv.rs
* refactor PYTHONHOME calculation to virtualenv.rs:find_python_install()
* adjust init_pyo3() to temporarily set PYTHONHOME based on
  virtualenv.rs:find_python_install() as this is the only place it is
  needed (indeed, venv activation scripts try to remove it)

Importantly, virtualenv.rs:find_python_install() tries to find the
python build standalone runtime based on a few heuristics. This function
could be improved in the fullness of time to, eg, be configured via a
build parameter.

Also, virtualenv.rs:find_python() can be used pre and post venv
activation. Before entering the venv, it will use find_python_install()
which is useful for things like setting up the initial venv. After
entering the venv, it will honor VIRTUAL_ENV (as set by
virtualenv.rs:initialize_venv()) to find python, which is important for
install packages with pip and having them installed into the venv.

* chore: update README_processing_engine.md for default venv

* chore: add bug reference for venv migrations with python minor releases

* chore: add security URLs to README_processing_engine.md

* chore: find_python_home() returns Option<PathBuf>. Thanks Jackson Newhouse

* fix: manually set sys.prefix, exec_prefix and sys.path

When activating a venv in the shell, sys.base_prefix and
sys.base_exec_prefix should be set to the installation location while
sys.prefix and sys.exec_prefix should be set to the venv dir.
Unfortunately, when initialize_venv() and init_pyo3() are called, we
can't use Py_InitializeFromConfig() to set any of these and certain
platforms are unable to find python-build-standalone. For now, we'll
temporarily set PYTHONHOME in init_pyo3() to the installation location
to make python work. By setting it at this point in the code, sys.prefix
and sys.exec_prefix end up also being set to the installation location,
which is fine when not under a venv, but is different from when entering
an venv.

To address this, in PYTHON_INIT.call_once() and when VIRTUAL_ENV is set
(which initialize_venv() will have set at this point), manually set
sys.prefix and sys.exec_prefix to what is in VIRTUAL_ENV.

Similarly, when activating a venv in the shell, sys.path is appended to
have the venv's site-packages dir. Previously we were setting PYTHONPATH
in initialize_venv() which ensures that the venv's site-packages dir is
in sys.path, but this ends up having the venv's site-packages dir first
in sys.path. To correct this, don't set PYTHONPATH any more and instead
adjust PYTHON_INIT.call_once() to append the venv's site-packages dir to
sys.path when VIRTUAL_ENV is set.

Finally, when exiting init_pyo3(), unconditionally unset PYTHONHOME when
VIRTUAL_ENV is set (like activation scripts do) and restore/unset when
it isn't.

Prior to these changes, all target incorrectly had the venv's
site-packages first in sys.path and OSX and Windows additionally had an
incorrect sys.prefix and sys.exec_prefix. With these initialization
changes in place, the runtime environment for the plugins is much closer
to that of a shell activated venv.
2025-02-26 12:06:23 -06:00
Adam Curtis 891da53382
chore: fix shellcheck lints (#25956)
Removed all of the shellcheck complaints that were showing up in my
editor.

Where possible, I just fixed them directly but I just told it to ignore
this one in the install scripts https://www.shellcheck.net/wiki/SC2059

Happy to go and fix that lint too I just wasn't sure if we prefer the
current approach, since it doesn't seem to be causing any problems.
2025-02-23 14:01:46 +13:00
wayne 044c051aaa
chore: update Dockerfile to RUST_VERSION=1.85, install libz-dev (#26053) 2025-02-21 14:41:04 -07:00
Jackson Newhouse f4b3fae186
feat(processing_engine): Have automatic plugin dir at /plugins for docker. (#26047) 2025-02-21 10:09:51 -08:00
Michael Gattozzi 1f72bfcc33
feat: Update to Rust 1.85 and 2024 Edition (#26046) 2025-02-20 14:58:07 -05:00
praveen-influx f1fc498dbf
feat: updates to default memory settings (#26023)
- breaking change, replaced `--parquet-mem-cache-size-mb` and env var for
  it with `--parquet-mem-cache-size` (takes value now in percentage or
  MB), now defaults to 20% of total available memory
- force snapshotting is set at 50%
- datafusion mem pool is set to 20%

closes: https://github.com/influxdata/influxdb/issues/26009
2025-02-20 16:03:30 +00:00
Jamie Strandboge 1d35695951
fix: prefer pip over over uv (#26039)
Official builds build with python build standalone currently only work
with pip. Until https://github.com/influxdata/influxdb/issues/26016 is
decided upon, prefer pip instead of uv.
2025-02-19 13:49:22 -06:00
Jamie Strandboge 42117701c0
fix: properly perform venv activation on windows (#26038) 2025-02-19 10:40:08 -06:00
Jamie Strandboge f5ae1bc64e
fix: detect python runtime for PipManager and venv setup (#26029)
* fix: consider PYTHONHOME when detecting PipManager

* fix: consider VIRTUAL_ENV when setting path to python from venv
2025-02-18 10:58:17 -05:00
peterbarnett03 692ae08900
chore: slight wording update (#26033) 2025-02-18 09:06:51 -06:00
Jamie Strandboge d9f4a8811e
fix: rename install_influxdb3.sh to install_influxdb.sh (#26032)
While the url is https://www.influxdata.com/d/install_influxdb3.sh, what
is copied over to this url must (currently) be named install_influxdb.sh
from this repo otherwise we get a 404. Thanks Pete Barnett for
troubleshooting.
2025-02-18 08:54:57 -06:00
wayne 8daccb7ee8
fix: add SpanContext with TraceCollector to query_sql call (#26006) 2025-02-13 18:43:25 -07:00
Jamie Strandboge 7192aae536
fix: download aarch64 python with docker/arm64 (#26021)
https://github.com/influxdata/influxdb/issues/26020
2025-02-13 16:55:29 -06:00
Jamie Strandboge ccd5d22aab
feat: build and use python-build-standalone with official builds (#25969)
* feat(ci): fetch and configure for python-build-standalone binaries

* fix: make the process engine usable on windows

* feat(ci): build with python-build-standalone (and drop musl)

* fix(ci): set rpath on Linux and libpath on OSX in ci

* fix: set PYTHONHOME everywhere and PYTHONPATH on Windows

* chore(ci): update to use more recent ci-packager-next

* fix(ci): adjust validate to allow certain dynamically linked libraries

* chore: remove install_influxdb.sh (using install_influxdb3.sh instead)

* chore(install_influxdb3.sh): update for processing engine and release builds

* fix: temporarily use rpm --nodeps until compile with old GLIBC

* feat(ci): build docker with python-build-standalone

* chore: add README_processing_engine.md

* chore: add a few more details to README_processing_engine.md

* fix(ci): use patchelf --set-rpath

Not all patchelf versions support --add-rpath for appending to the
RPATH, but --set-path can be used with a colon-separated list. Use
--set-rpath first for maximum compatibility.

* chore: update README_processing_engine.md for standalone local builds

* fix(Dockerfile): also use patchelf --set-rpath

* chore: update code comment for accuracy

* chore: typos, grammar and formatting change in README_processing_engine.md

* chore: update README_processing_engine.md for Docker arm64 (thanks Jackson)
2025-02-13 16:16:05 -06:00
Jackson Newhouse 962e31df47
feat(processing_engine): Ensure that plugin errors are logged, not thrown. (#26019) 2025-02-13 12:07:18 -08:00
Jackson Newhouse b0a24220c0
feat(processing_engine): Allow async plugin execution. (#25994) 2025-02-13 09:08:19 -08:00
Trevor Hilton 8548410d67
test: query distinct cache via flight sql (#26014) 2025-02-13 11:13:09 -05:00
Jackson Newhouse 80de52f15f
fix(processing_engine): Update Dockerfile and pip installer so pip works. (#25987) 2025-02-11 09:08:01 -08:00
Trevor Hilton 9646691d96
fix: serialize distinct cache in catalog (#25990)
The distinct cache info for tables was not serialized in the catalog.
This fixes it, but also updates the catalog serialization to use the
snapshot type serialization from the Catalog type all the way down.

The Eq and PartialEq impls were removed from Catalog and InnerCatalog
as they were only used in tests, and wer replaced by pure insta snapshot
tests.

A test was added to check that the distinct cache serializes/deserializes
2025-02-11 11:04:31 -05:00
Trevor Hilton 04f10ad290
fix: distinct cache panic on projection pushdown (#25988)
Fixed a bug in the distinct cache where projection that skipped column
in the cache hierarchy caused a panic.

This simplifies the display of the projection in the DistinctCacheExec
in EXPLAIN output to not include the column index, and only the name.
2025-02-11 09:22:54 -05:00
peterbarnett03 dca5350b10
fix: docker command was wrong (#25984) 2025-02-10 15:13:29 -05:00
Trevor Hilton f5b561b6c9
refactor: use macro to define id types (#25986)
* refactor: use macro to define catalog id types

* refactor: make catalog table limit test faster
2025-02-10 14:30:17 -05:00
clia c94237942e
fix: typo in influxdb3 client docs (#25977) 2025-02-09 21:10:33 -05:00
Michael Gattozzi cf1dd5c831
fix: broken format for JSON queries and add tests (#25980)
In #25927 we missed that JSON queries were broken despite having some
tests use the format. This fixes JSON queries such that they now
properly contain a comma between RecordBatches. This commit also
includes tests for the formats that now stream data back (CSV, JSON, and
JSON Lines) so that we won't run into this issue again.
2025-02-06 20:25:18 -05:00
Trevor Hilton 1ac67a3ca1
fix: remove request uri from error log (#25981) 2025-02-06 14:47:22 -05:00
Trevor Hilton c9f4d45937
chore: backport change from enterprise (#25978) 2025-02-06 12:42:50 -05:00
praveen-influx 6ca3411862
chore: remove log line (#25976) 2025-02-05 22:23:46 +00:00
praveen-influx 5b2354c7ab
feat: port changes back to core from enterprise (#25975)
Includes 2 main changes
- update the function signature for `cache_parquet_files`
- bring in `Evict` variant for parquet `CacheRequest`
2025-02-05 22:22:04 +00:00
praveen-influx 3058140faf
feat: remove unnecessary item in log (#25974) 2025-02-05 21:45:46 +00:00
praveen-influx fa69045f5b
chore: fixes for the build (#25973)
- missing clone/copy impl for NoProcessingEngine
- scope the visibility of a method
2025-02-05 17:44:24 +00:00
Jackson Newhouse fbcb9403c4
feat(processing_engine): log processing engine logging calls to sys events. (#25939) 2025-02-04 15:16:04 -08:00
wayne fa18b6d8da
refactor: DRY up influxdb3_client code (#25962)
* deduplicate QueryParams->QueryRequest and Format->QueryFormat
* move WriteParams into influxdb3_types crate
* DRY up client HTTP request handling code in *RequestBuilder.send
  methods.
* DRY up a bunch of other non-Builder http request handling
2025-02-04 08:54:37 -07:00
wayne 27653f5a76
fix: enable workspace lints on all crates, fix all lints (#25961) 2025-02-03 17:38:20 -07:00
wayne ca25ab6f70
fix: remove accidentally-commited dbg! macro (#25958) 2025-02-03 15:48:35 -07:00
Jackson Newhouse f58f3439cd
fix(processing_engine): ensure default SIGINT behavior from python. (#25957) 2025-02-03 14:31:04 -08:00
wayne 0fffcc8c37
refactor: introduce influxdb3_types crate (#25946)
Partially fixes https://github.com/influxdata/influxdb/issues/24672

* move most HTTP req/resp types into `influxdb3_types` crate
* removes the use of locally-scoped request type structs from the `influxdb3_client` crate
* fix plugin dependency/package install bug
  * it looks like the `DELETE` http method was being used where `POST` was expected for `/api/v3/configure/plugin_environment/install_packages` and `/api/v3/configure/plugin_environment/install_requirements`
2025-02-03 11:28:47 -07:00
Jackson Newhouse 1dab1707ce
fix(processing_engine): Don't set current_dir to plugin_dir when creating virtual environment. (#25931) 2025-02-03 09:43:35 -08:00
praveen-influx 911ba92ab4
feat: clear query buffer incrementally when snapshotting (#25948)
* feat: clear query buffer incrementally when snapshotting

This commit clears the query buffer incrementally as soon as a table's
data in buffer is written into parquet file and cached. Previously,
clearing the buffer happened at the end in the background

* refactor: only clear buffer after adding to persisted files

* refactor: rename function
2025-02-02 16:51:53 +00:00
Trevor Hilton 23b77946f4
refactor: remove buffer index and literal guarantee analysus in filter (#25949)
This removes the buffer index from the write buffer in core and lifts the
literal guarantee analysis from the ChunkFilter.
2025-01-31 14:43:10 -05:00
Jackson Newhouse d9dd8a32a2
fix(processing_engine): Use the configured request path for Request plugins. (#25945) 2025-01-31 10:36:47 -08:00
Michael Gattozzi 20fdc7b51b
feat: stream data back for CSV and JSON queries (#25927)
This commit allows us to stream data back for CSV and JSON formatted
queries. Prior to this we would buffer up all of the data in memory
before sending it back. Now we can make it so that we only buffer in
one RecordBatch at a time to reduce memory overhead.

Note that due to the way the APIs for writers work and for how Body in
hyper 0.14 works we can't use a streaming body that we can write too.
This in turn means we have to use a manually written Future state
machine, which works but is far from ideal.

Note this does not include the pretty and parquet files as streamable.
I'm attempting to get the pretty one to be streamable, but I don't think
that this one and parquet are as likely to be streamable back to the
user. In general we might want to discourage these formats from being
used.
2025-01-31 13:25:30 -05:00