Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/add python circleci #25779

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ commands:
rust_components:
description: Verify installed components
steps:
- run:
name: add python3
command: |
sudo apt update
sudo apt install python3 python3-dev
- run:
name: Verify installed components
command: |
Expand Down Expand Up @@ -101,6 +106,11 @@ jobs:
steps:
- checkout
- rust_components
- run:
name: add python3
command: |
sudo apt update
sudo apt install python3 python3-dev
- run:
name: Rust fmt
command: cargo fmt --all -- --check
Expand All @@ -118,6 +128,11 @@ jobs:
steps:
- checkout
- rust_components
- run:
name: add python3
command: |
sudo apt update
sudo apt install python3
- run:
name: Clippy
command: cargo clippy --all-targets --all-features --workspace -- -D warnings
Expand Down Expand Up @@ -171,6 +186,11 @@ jobs:
steps:
- checkout
- rust_components
- run:
name: add python3
command: |
sudo apt update
sudo apt install python3 python3-dev
- run:
name: Cargo doc
command: cargo doc --document-private-items --no-deps --workspace
Expand All @@ -197,6 +217,11 @@ jobs:
steps:
- checkout
- rust_components
- run:
name: add python3
command: |
sudo apt update
sudo apt install python3 python3-dev
- run:
name: cargo nextest
command: TEST_LOG= RUST_LOG=info RUST_LOG_SPAN_EVENTS=full RUST_BACKTRACE=1 cargo nextest run --workspace --failure-output immediate-final --no-fail-fast
Expand Down Expand Up @@ -230,6 +255,18 @@ jobs:
type: string
steps:
- checkout
- run:
name: add python3
command: |
apt-get update
apt-get install -y python3 python3-dev
- when:
condition:
equal: [ << parameters.target >>, x86_64-unknown-linux-musl ]
steps:
- run:
name: add -crt-satic flag
command: export RUSTFLAGS="-C target-feature=-crt-static"
- run:
name: Install Target
command: rustup target add << parameters.target >>
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN \
FROM debian:bookworm-slim

RUN apt update \
&& apt install --yes ca-certificates gettext-base libssl3 --no-install-recommends \
&& apt install --yes ca-certificates gettext-base libssl3 --no-install-recommends python3 python3-dev \
&& rm -rf /var/lib/{apt,dpkg,cache,log} \
&& groupadd --gid 1500 influxdb3 \
&& useradd --uid 1500 --gid influxdb3 --shell /bin/bash --create-home influxdb3
Expand Down
2 changes: 1 addition & 1 deletion influxdb3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ uuid.workspace = true
console-subscriber = { version = "0.1.10", optional = true, features = ["parking_lot"] }

[features]
default = ["jemalloc_replacing_malloc", "azure", "gcp", "aws"]
default = ["jemalloc_replacing_malloc", "azure", "gcp", "aws", "system-py"]

azure = ["influxdb3_clap_blocks/azure"] # Optional Azure Object store support
gcp = ["influxdb3_clap_blocks/gcp"] # Optional GCP object store support
Expand Down
2 changes: 2 additions & 0 deletions influxdb3_processing_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ license.workspace = true

[features]
"system-py" = ["influxdb3_py_api/system-py", "pyo3"]
default = ["system-py"]


[dependencies]
anyhow.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion influxdb3_py_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ license.workspace = true

[features]
system-py = ["pyo3"]
default = ["system-py"]

[dependencies]
arrow-array.workspace = true
Expand All @@ -23,7 +24,7 @@ tokio.workspace = true
[dependencies.pyo3]
version = "0.23.3"
# this is necessary to automatically initialize the Python interpreter
features = ["auto-initialize", "experimental-async"]
features = ["auto-initialize", "experimental-async", "abi3"]
optional = true


Expand Down
3 changes: 2 additions & 1 deletion influxdb3_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,12 @@ unicode-segmentation.workspace = true
[dependencies.pyo3]
version = "0.23.3"
# this is necessary to automatically initialize the Python interpreter
features = ["auto-initialize"]
features = ["auto-initialize", "abi3"]
optional = true

[features]
system-py = ["pyo3"]
default = ["system-py"]

[dev-dependencies]
# Core Crates
Expand Down
2 changes: 2 additions & 0 deletions influxdb3_write/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ license.workspace = true

[features]
"system-py" = ["influxdb3_py_api/system-py", "pyo3"]
default = ["system-py"]


[dependencies]
# Core Crates
Expand Down
Loading