From e4fc0a8a6bb39ee0f6e09613f0655b29157da928 Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Tue, 15 Nov 2022 11:47:08 -0500 Subject: [PATCH 01/26] Improve CI/CD by checking the CLI commands This commit improve the CI/CD by testing the newly added CLI commands: - `up` - `list` - `check` - `destroy` - `start` - `stop` This commit also removes not needed anymore capnp dependencies to simplify the CI. Use python as source for `python` example add binaries to `$GITHUB_PATH` Add up command in test Remove not necessary change Add CLI start and stop test Add removed iceoryx test --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9e5624a..38488fba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,16 +66,63 @@ jobs: - name: "C++ Dataflow example" timeout-minutes: 15 run: cargo run --example cxx-dataflow - - name: "Start RouDi (iceoryx)" if: runner.os != 'Windows' run: find target -type f -wholename "*/iceoryx-install/bin/iox-roudi" -exec {} \; & - - name: "Rust iceoryx example" if: runner.os != 'Windows' timeout-minutes: 30 run: cargo run --example iceoryx + CLI: + name: "CLI Test" + strategy: + matrix: + platform: [ubuntu-latest] + fail-fast: false + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v3 + + - name: Install libacl-dev (Linux) + if: runner.os == 'Linux' + run: | + export DEBIAN_FRONTEND=noninteractive + sudo apt-get install -y libacl1-dev + + - name: "Build cli and binaries" + timeout-minutes: 30 + run: cargo build --all + + - name: "Test dora `up`" + run: | + echo "$(pwd)/target/debug" >> $GITHUB_PATH + find $(pwd) -type f -wholename "*/iceoryx-install/bin/iox-roudi" | head -n 1 | xargs dirname >> $GITHUB_PATH + cargo run -p dora-cli -- up + + - name: "Test dora `check`" + run: cargo run -p dora-cli -- check + + - name: "Test dora `list" + run: cargo run -p dora-cli -- list + + - name: "Test new command" + run: | + cargo run -p dora-cli -- new test_project + cd test_project + + - name: "Test start and stop command" + timeout-minutes: 30 + run: | + cargo build --all + UUID=$(../target/debug/dora-cli start dataflow.yml) + sleep 10 + ../target/debug/dora-cli stop $UUID + cd .. + + - name: "Test dora `destroy" + run: cargo run -p dora-cli -- destroy + examples-remote: name: "Examples (Remote)" runs-on: ubuntu-latest From 05eca0c8ab717483898cddc2ce86591f6bd056b8 Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Mon, 26 Dec 2022 18:10:17 -0500 Subject: [PATCH 02/26] Removing `up` command due to path issues --- .github/workflows/ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38488fba..8a082a87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,7 +78,7 @@ jobs: name: "CLI Test" strategy: matrix: - platform: [ubuntu-latest] + platform: [ubuntu-latest, macos-latest] fail-fast: false runs-on: ${{ matrix.platform }} steps: @@ -94,11 +94,9 @@ jobs: timeout-minutes: 30 run: cargo build --all - - name: "Test dora `up`" + - name: "Test dora-coordinator" run: | - echo "$(pwd)/target/debug" >> $GITHUB_PATH - find $(pwd) -type f -wholename "*/iceoryx-install/bin/iox-roudi" | head -n 1 | xargs dirname >> $GITHUB_PATH - cargo run -p dora-cli -- up + cargo run -p dora-coordinator & - name: "Test dora `check`" run: cargo run -p dora-cli -- check From a01be88a7c33ff0ec9c00108da290a191bfb1f7f Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Mon, 26 Dec 2022 20:13:15 -0500 Subject: [PATCH 03/26] Remove dora check --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a082a87..5786219a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,9 +98,6 @@ jobs: run: | cargo run -p dora-coordinator & - - name: "Test dora `check`" - run: cargo run -p dora-cli -- check - - name: "Test dora `list" run: cargo run -p dora-cli -- list From 100a4396b7245b1aee25ff3e1f44ecd57e683530 Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Wed, 28 Dec 2022 11:55:26 -0500 Subject: [PATCH 04/26] use cargo install to fix path issue in GH runner --- .github/workflows/ci.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5786219a..fde1b741 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,31 +92,34 @@ jobs: - name: "Build cli and binaries" timeout-minutes: 30 - run: cargo build --all + run: | + cargo install --path binaries/coordinator + cargo install --path binaries/runtime + cargo install --path binaries/cli - name: "Test dora-coordinator" run: | - cargo run -p dora-coordinator & + dora-coordinator & - name: "Test dora `list" - run: cargo run -p dora-cli -- list + run: dora-cli list - name: "Test new command" run: | - cargo run -p dora-cli -- new test_project + dora-cli new test_project cd test_project - name: "Test start and stop command" timeout-minutes: 30 run: | cargo build --all - UUID=$(../target/debug/dora-cli start dataflow.yml) + UUID=$(dora-cli start dataflow.yml) sleep 10 - ../target/debug/dora-cli stop $UUID + dora-cli stop $UUID cd .. - name: "Test dora `destroy" - run: cargo run -p dora-cli -- destroy + run: dora-cli destroy examples-remote: name: "Examples (Remote)" From 68c689094ab03d9756b0bdbd1d6e11d5f8df2ba1 Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Wed, 28 Dec 2022 15:32:23 -0500 Subject: [PATCH 05/26] Change folder of process --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fde1b741..92ed7cae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,11 +107,11 @@ jobs: - name: "Test new command" run: | dora-cli new test_project - cd test_project - name: "Test start and stop command" timeout-minutes: 30 run: | + cd test_project cargo build --all UUID=$(dora-cli start dataflow.yml) sleep 10 From 55605c73b19ba6bbbcbe89b377a44c0cf27bd303 Mon Sep 17 00:00:00 2001 From: Haixuan Xavier Tao Date: Thu, 29 Dec 2022 10:03:00 -0500 Subject: [PATCH 06/26] Rename task in CI Co-authored-by: Philipp Oppermann --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92ed7cae..58dadc14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,7 +97,7 @@ jobs: cargo install --path binaries/runtime cargo install --path binaries/cli - - name: "Test dora-coordinator" + - name: "Start dora-coordinator" run: | dora-coordinator & From ae161e644c75d4ce6890d81344a8330ee83ae31e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Jan 2023 10:55:33 +0000 Subject: [PATCH 07/26] Bump tokio from 1.21.2 to 1.23.1 Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.21.2 to 1.23.1. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.21.2...tokio-1.23.1) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.lock | 63 ++++++++++++++++++- Cargo.toml | 2 +- apis/c++/operator/Cargo.toml | 2 +- apis/rust/node/Cargo.toml | 2 +- binaries/coordinator/Cargo.toml | 2 +- binaries/runtime/Cargo.toml | 2 +- examples/iceoryx/sink/Cargo.toml | 2 +- examples/rust-dataflow/node/Cargo.toml | 2 +- libraries/extensions/download/Cargo.toml | 2 +- .../extensions/telemetry/metrics/Cargo.toml | 2 +- .../extensions/telemetry/tracing/Cargo.toml | 2 +- 11 files changed, 70 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8e6c67ad..9c537380 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3866,9 +3866,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.21.2" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" +checksum = "38a54aca0c15d014013256222ba0ebed095673f89345dd79119d912eb561b7a8" dependencies = [ "autocfg 1.1.0", "bytes", @@ -3881,7 +3881,7 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "winapi", + "windows-sys 0.42.0", ] [[package]] @@ -4578,6 +4578,27 @@ dependencies = [ "windows_x86_64_msvc 0.36.1", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + [[package]] name = "windows_aarch64_msvc" version = "0.32.0" @@ -4590,6 +4611,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + [[package]] name = "windows_i686_gnu" version = "0.32.0" @@ -4602,6 +4629,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + [[package]] name = "windows_i686_msvc" version = "0.32.0" @@ -4614,6 +4647,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + [[package]] name = "windows_x86_64_gnu" version = "0.32.0" @@ -4626,6 +4665,18 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + [[package]] name = "windows_x86_64_msvc" version = "0.32.0" @@ -4638,6 +4689,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + [[package]] name = "winreg" version = "0.10.1" diff --git a/Cargo.toml b/Cargo.toml index d04d0faf..d16a98c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ license = "Apache-2.0" [dev-dependencies] eyre = "0.6.8" -tokio = "1.20.1" +tokio = "1.23.1" dora-coordinator = { path = "binaries/coordinator" } dunce = "1.0.2" diff --git a/apis/c++/operator/Cargo.toml b/apis/c++/operator/Cargo.toml index 6e3a4a82..ecdb6023 100644 --- a/apis/c++/operator/Cargo.toml +++ b/apis/c++/operator/Cargo.toml @@ -12,7 +12,7 @@ dora-operator-api = { workspace = true } eyre = "0.6.8" futures = "0.3.21" rand = "0.8.5" -tokio = { version = "1.20.1", features = ["rt", "macros"] } +tokio = { version = "1.23.1", features = ["rt", "macros"] } [build-dependencies] cxx-build = "1.0.73" diff --git a/apis/rust/node/Cargo.toml b/apis/rust/node/Cargo.toml index e4064cb9..3f92bbf6 100644 --- a/apis/rust/node/Cargo.toml +++ b/apis/rust/node/Cargo.toml @@ -26,4 +26,4 @@ dora-message = { path = "../../../libraries/message" } dora-core = { path = "../../../libraries/core" } [dev-dependencies] -tokio = { version = "1.17.0", features = ["rt"] } +tokio = { version = "1.23.1", features = ["rt"] } diff --git a/binaries/coordinator/Cargo.toml b/binaries/coordinator/Cargo.toml index e0379ab6..b625c30f 100644 --- a/binaries/coordinator/Cargo.toml +++ b/binaries/coordinator/Cargo.toml @@ -13,7 +13,7 @@ eyre = "0.6.7" futures = "0.3.21" serde = { version = "1.0.136", features = ["derive"] } serde_yaml = "0.8.23" -tokio = { version = "1.21.2", features = ["full"] } +tokio = { version = "1.23.1", features = ["full"] } tokio-stream = { version = "0.1.8", features = ["io-util"] } tokio-util = { version = "0.7.1", features = ["codec"] } clap = { version = "3.1.8", features = ["derive"] } diff --git a/binaries/runtime/Cargo.toml b/binaries/runtime/Cargo.toml index 71600cde..ecf0f5e4 100644 --- a/binaries/runtime/Cargo.toml +++ b/binaries/runtime/Cargo.toml @@ -27,7 +27,7 @@ futures = "0.3.21" futures-concurrency = "2.0.3" libloading = "0.7.3" serde_yaml = "0.8.23" -tokio = { version = "1.17.0", features = ["full"] } +tokio = { version = "1.23.1", features = ["full"] } tokio-stream = "0.1.8" zenoh = { git = "https://github.com/eclipse-zenoh/zenoh.git", rev = "79a136e4fd90b11ff5d775ced981af53c4f1071b" } zenoh-config = { git = "https://github.com/eclipse-zenoh/zenoh.git", rev = "79a136e4fd90b11ff5d775ced981af53c4f1071b" } diff --git a/examples/iceoryx/sink/Cargo.toml b/examples/iceoryx/sink/Cargo.toml index 5774709e..69e06c7a 100644 --- a/examples/iceoryx/sink/Cargo.toml +++ b/examples/iceoryx/sink/Cargo.toml @@ -9,4 +9,4 @@ edition = "2021" dora-node-api = { workspace = true, features = ["iceoryx"] } eyre = "0.6.8" futures = "0.3.21" -tokio = { version = "1.20.1", features = ["macros"] } +tokio = { version = "1.23.1", features = ["macros"] } diff --git a/examples/rust-dataflow/node/Cargo.toml b/examples/rust-dataflow/node/Cargo.toml index 20f36222..c6f742a9 100644 --- a/examples/rust-dataflow/node/Cargo.toml +++ b/examples/rust-dataflow/node/Cargo.toml @@ -10,4 +10,4 @@ dora-node-api = { workspace = true, features = ["zenoh"] } eyre = "0.6.8" futures = "0.3.21" rand = "0.8.5" -tokio = { version = "1.20.1", features = ["rt", "macros"] } +tokio = { version = "1.23.1", features = ["rt", "macros"] } diff --git a/libraries/extensions/download/Cargo.toml b/libraries/extensions/download/Cargo.toml index 6155a6e4..a179dd89 100644 --- a/libraries/extensions/download/Cargo.toml +++ b/libraries/extensions/download/Cargo.toml @@ -10,5 +10,5 @@ license = "Apache-2.0" eyre = "0.6.8" tempfile = "3.3.0" reqwest = "0.11.12" -tokio = { version = "1.17.0" } +tokio = { version = "1.23.1" } tracing = "0.1.36" diff --git a/libraries/extensions/telemetry/metrics/Cargo.toml b/libraries/extensions/telemetry/metrics/Cargo.toml index 57d31315..effaec67 100644 --- a/libraries/extensions/telemetry/metrics/Cargo.toml +++ b/libraries/extensions/telemetry/metrics/Cargo.toml @@ -11,4 +11,4 @@ futures = "0.3.21" opentelemetry = { version = "0.17", features = ["rt-tokio", "metrics"] } opentelemetry-otlp = { version = "0.10", features = ["tonic", "metrics"] } opentelemetry-system-metrics = "0.1.1" -tokio = { version = "1.17.0", features = ["full"] } +tokio = { version = "1.23.1", features = ["full"] } diff --git a/libraries/extensions/telemetry/tracing/Cargo.toml b/libraries/extensions/telemetry/tracing/Cargo.toml index 2dd5ae4e..1cc5f820 100644 --- a/libraries/extensions/telemetry/tracing/Cargo.toml +++ b/libraries/extensions/telemetry/tracing/Cargo.toml @@ -9,4 +9,4 @@ license = "Apache-2.0" [dependencies] opentelemetry = { version = "0.17", features = ["rt-tokio", "metrics"] } opentelemetry-jaeger = { version = "0.16", features = ["rt-tokio"] } -tokio = { version = "1.17.0", features = ["full"] } +tokio = { version = "1.23.1", features = ["full"] } From 71078bd9f2e742c7703edca4057ddaac6cffc544 Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Tue, 3 Jan 2023 13:35:17 -0500 Subject: [PATCH 08/26] Force removal of Pyo3 Object to avoid memory leak This commit fix the memory leak happening in the dora API operator. This is seemingly due to pyo3 leaking memory on object created in Rust. Using standard `drop` did not drop the memory on the `PyBytes` included in the `PyDict`. See: https://github.com/PyO3/pyo3/issues/1801 Fixes https://github.com/dora-rs/dora/issues/163 --- binaries/runtime/src/operator/python.rs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/binaries/runtime/src/operator/python.rs b/binaries/runtime/src/operator/python.rs index b4849cca..a00f1755 100644 --- a/binaries/runtime/src/operator/python.rs +++ b/binaries/runtime/src/operator/python.rs @@ -12,10 +12,10 @@ use dora_operator_api_python::metadata_to_pydict; use dora_operator_api_types::DoraStatus; use eyre::{bail, eyre, Context}; use pyo3::{ - pyclass, + ffi, pyclass, types::IntoPyDict, types::{PyBytes, PyDict}, - Py, Python, + AsPyPointer, Py, Python, }; use std::{ borrow::Cow, @@ -139,14 +139,21 @@ pub fn spawn( let status_enum = Python::with_gil(|py| { let input_dict = PyDict::new(py); + let bytes = PyBytes::new(py, &input.data()); input_dict.set_item("id", input.id.as_str())?; - input_dict.set_item("data", PyBytes::new(py, &input.data()))?; + input_dict.set_item("data", bytes)?; input_dict.set_item("metadata", metadata_to_pydict(input.metadata(), py))?; - operator + let status_enum = operator .call_method1(py, "on_input", (input_dict, send_output.clone())) - .map_err(traceback) + .map_err(traceback); + + unsafe { + ffi::Py_DECREF(bytes.as_ptr()); + ffi::Py_DECREF(input_dict.as_ptr()); + } + status_enum })?; let status_val = Python::with_gil(|py| status_enum.getattr(py, "value")) .wrap_err("on_input must have enum return value")?; From 5ad69cda876ea977d867656b6cd19ae3f94ef445 Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Tue, 3 Jan 2023 16:21:52 -0500 Subject: [PATCH 09/26] Update requirements and fix `malloc` in plot --- apis/python/node/Cargo.toml | 2 +- examples/python-dataflow/plot.py | 3 --- examples/python-dataflow/requirements.txt | 10 +++++----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/apis/python/node/Cargo.toml b/apis/python/node/Cargo.toml index fdffc278..7de836e7 100644 --- a/apis/python/node/Cargo.toml +++ b/apis/python/node/Cargo.toml @@ -1,6 +1,6 @@ [package] +version = "0.1.2" name = "dora-node-api-python" -version.workspace = true edition = "2021" license = "Apache-2.0" diff --git a/examples/python-dataflow/plot.py b/examples/python-dataflow/plot.py index 57a2a293..0161f93b 100644 --- a/examples/python-dataflow/plot.py +++ b/examples/python-dataflow/plot.py @@ -81,6 +81,3 @@ class Operator: return DoraStatus.STOP return DoraStatus.CONTINUE - - def __del__(self): - cv2.destroyAllWindows() diff --git a/examples/python-dataflow/requirements.txt b/examples/python-dataflow/requirements.txt index 55f71178..3245eada 100644 --- a/examples/python-dataflow/requirements.txt +++ b/examples/python-dataflow/requirements.txt @@ -2,17 +2,20 @@ # Usage: pip install -r requirements.txt # Base ---------------------------------------- +gitpython +ipython # interactive notebook matplotlib>=3.2.2 numpy>=1.18.5 opencv-python>=4.1.1 Pillow>=7.1.2 +psutil # system resources PyYAML>=5.3.1 requests>=2.23.0 scipy>=1.4.1 -torch>=1.7.0 +thop>=0.1.1 # FLOPs computation +torch>=1.7.0 # see https://pytorch.org/get-started/locally (recommended) torchvision>=0.8.1 tqdm>=4.64.0 -protobuf<=3.20.1 # https://github.com/ultralytics/yolov5/issues/8012 # Logging ------------------------------------- tensorboard>=2.4.1 @@ -35,9 +38,6 @@ seaborn>=0.11.0 # openvino-dev # OpenVINO export # Extras -------------------------------------- -ipython # interactive notebook -psutil # system utilization -thop>=0.1.1 # FLOPs computation # albumentations>=1.0.3 # pycocotools>=2.0 # COCO mAP # roboflow From d45f9373fd6ae2edb3347517959cdb91848c849f Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Tue, 10 Jan 2023 12:11:12 +0100 Subject: [PATCH 10/26] Use `py.new_pool()` to bound pyo3 variable To alievate the unbounded memory growth, we're replacing variable dereferencing with scoped `GILPool` as described in the pyo3 documentation recently updated. See: https://github.com/PyO3/pyo3/pull/2864 --- binaries/runtime/src/operator/python.rs | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/binaries/runtime/src/operator/python.rs b/binaries/runtime/src/operator/python.rs index a00f1755..975eb2ae 100644 --- a/binaries/runtime/src/operator/python.rs +++ b/binaries/runtime/src/operator/python.rs @@ -10,7 +10,7 @@ use dora_message::uhlc; use dora_node_api::communication::Publisher; use dora_operator_api_python::metadata_to_pydict; use dora_operator_api_types::DoraStatus; -use eyre::{bail, eyre, Context}; +use eyre::{bail, eyre, Context, Result}; use pyo3::{ ffi, pyclass, types::IntoPyDict, @@ -137,7 +137,9 @@ pub fn spawn( }; input.metadata.parameters.open_telemetry_context = Cow::Owned(string_cx); - let status_enum = Python::with_gil(|py| { + let status = Python::with_gil(|py| -> Result { + let pool = unsafe { py.new_pool() }; + let py = pool.python(); let input_dict = PyDict::new(py); let bytes = PyBytes::new(py, &input.data()); @@ -147,18 +149,15 @@ pub fn spawn( let status_enum = operator .call_method1(py, "on_input", (input_dict, send_output.clone())) - .map_err(traceback); - - unsafe { - ffi::Py_DECREF(bytes.as_ptr()); - ffi::Py_DECREF(input_dict.as_ptr()); - } - status_enum + .map_err(traceback)?; + + let status_val = status_enum + .getattr(py, "value") + .wrap_err("on_input must have enum return value")?; + status_val + .extract(py) + .wrap_err("on_input has invalid return value") })?; - let status_val = Python::with_gil(|py| status_enum.getattr(py, "value")) - .wrap_err("on_input must have enum return value")?; - let status: i32 = Python::with_gil(|py| status_val.extract(py)) - .wrap_err("on_input has invalid return value")?; match status { s if s == DoraStatus::Continue as i32 => {} // ok s if s == DoraStatus::Stop as i32 => break StopReason::ExplicitStop, From a841577e101e406c1c58a93007e57ff2ea71beb8 Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Tue, 10 Jan 2023 17:27:41 +0100 Subject: [PATCH 11/26] add documentation of scoped unsage `GILPool` --- binaries/runtime/src/operator/python.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/binaries/runtime/src/operator/python.rs b/binaries/runtime/src/operator/python.rs index 975eb2ae..900a3024 100644 --- a/binaries/runtime/src/operator/python.rs +++ b/binaries/runtime/src/operator/python.rs @@ -12,10 +12,10 @@ use dora_operator_api_python::metadata_to_pydict; use dora_operator_api_types::DoraStatus; use eyre::{bail, eyre, Context, Result}; use pyo3::{ - ffi, pyclass, + pyclass, types::IntoPyDict, types::{PyBytes, PyDict}, - AsPyPointer, Py, Python, + Py, Python, }; use std::{ borrow::Cow, @@ -138,6 +138,15 @@ pub fn spawn( input.metadata.parameters.open_telemetry_context = Cow::Owned(string_cx); let status = Python::with_gil(|py| -> Result { + // We need to create a new scoped `GILPool` because the dora-runtime + // is currently started through a `start_runtime` wrapper function, + // which is annotated with `#[pyfunction]`. This attribute creates an + // initial `GILPool` that lasts for the entire lifetime of the `dora-runtime`. + // However, we want the `PyBytes` created below to be freed earlier. + // creating a new scoped `GILPool` tied to this closure, will free `PyBytes` + // at the end of the closure. + // See https://github.com/PyO3/pyo3/pull/2864 and + // https://github.com/PyO3/pyo3/issues/2853 for more details. let pool = unsafe { py.new_pool() }; let py = pool.python(); let input_dict = PyDict::new(py); From 160472ee0c74c2ebb70af4ebc3412b056d820de8 Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Mon, 16 Jan 2023 16:20:46 +0100 Subject: [PATCH 12/26] Package `DoraStatus` into dora python package. To prepare for future feature, this commit initiate a `__init__.py` file that makes the dora python node api, a mixed python/rust project. Any python function or variable included in the `__init__.py` will be distributed along rust function declared in `src/lib.rs`. https://github.com/dora-rs/dora/issues/163 has shown the limitation on depending too much on `pyo3`. --- apis/python/node/dora/__init__.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 apis/python/node/dora/__init__.py diff --git a/apis/python/node/dora/__init__.py b/apis/python/node/dora/__init__.py new file mode 100644 index 00000000..aa697707 --- /dev/null +++ b/apis/python/node/dora/__init__.py @@ -0,0 +1,17 @@ +from enum import Enum + +from .dora import * + + +class DoraStatus(Enum): + """Dora status to indicate if operator `on_input` loop + should be break + + Args: + Enum (u8): Status signaling to dora operator to + stop or continue the operator. + """ + + CONTINUE = 0 + STOP = 1 + STOP_ALL = 2 From 9f66ac17066164fb208aa474b563e9068f70e2c6 Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Mon, 16 Jan 2023 16:33:52 +0100 Subject: [PATCH 13/26] Remove self defined `DoraStatus` in example --- examples/python-dataflow/object_detection.py | 6 +----- examples/python-dataflow/plot.py | 11 ++--------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/examples/python-dataflow/object_detection.py b/examples/python-dataflow/object_detection.py index 05c66b1b..338cac40 100644 --- a/examples/python-dataflow/object_detection.py +++ b/examples/python-dataflow/object_detection.py @@ -1,14 +1,10 @@ -from enum import Enum from typing import Callable import cv2 import numpy as np import torch - -class DoraStatus(Enum): - CONTINUE = 0 - STOP = 1 +from dora import DoraStatus class Operator: diff --git a/examples/python-dataflow/plot.py b/examples/python-dataflow/plot.py index 0161f93b..a06892db 100644 --- a/examples/python-dataflow/plot.py +++ b/examples/python-dataflow/plot.py @@ -1,22 +1,15 @@ import os -from enum import Enum from typing import Callable import cv2 import numpy as np - from utils import LABELS +from dora import DoraStatus + CI = os.environ.get("CI") font = cv2.FONT_HERSHEY_SIMPLEX - - -class DoraStatus(Enum): - CONTINUE = 0 - STOP = 1 - - class Operator: """ Plot image and bounding box From f1dcdf27ffb75c1f8b77bfa69acfad5c4c543e37 Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 18 Jan 2023 11:25:31 +0100 Subject: [PATCH 14/26] fix typo --- apis/python/node/dora/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/python/node/dora/__init__.py b/apis/python/node/dora/__init__.py index aa697707..2893b7ee 100644 --- a/apis/python/node/dora/__init__.py +++ b/apis/python/node/dora/__init__.py @@ -5,7 +5,7 @@ from .dora import * class DoraStatus(Enum): """Dora status to indicate if operator `on_input` loop - should be break + should be stopped. Args: Enum (u8): Status signaling to dora operator to From 531052439ba36807fdc75678248292d93bee04d7 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Wed, 18 Jan 2023 12:27:45 +0100 Subject: [PATCH 15/26] Create a changelog file --- Changelog.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Changelog.md diff --git a/Changelog.md b/Changelog.md new file mode 100644 index 00000000..cda0b86e --- /dev/null +++ b/Changelog.md @@ -0,0 +1,30 @@ +# Changelog + +## Unreleased + +* Package `DoraStatus` into dora python package: https://github.com/dora-rs/dora/pull/172 +* Force removal of Pyo3 Object to avoid memory leak: https://github.com/dora-rs/dora/pull/168 +* Bump tokio from 1.21.2 to 1.23.1: https://github.com/dora-rs/dora/pull/171 + +## v0.1.2 (2022-12-15) + +- Fix infinite loop in the coordinator: https://github.com/dora-rs/dora/pull/155 +- Simplify the release process: https://github.com/dora-rs/dora/pull/157 +- Use generic linux distribution: https://github.com/dora-rs/dora/pull/159 + +## v0.1.1 (2022-12-05) + +This release contains fixes for: +- Python linking using pypi release but also a redesigned python thread model within the runtime to avoid deadlock of the `GIL`. This also fix an issue with `patchelf`. +- A deployment separation for `ubuntu` as the `20.04` version of `dora` and `22.04` version of dora are non-compatible. +- A better tagging of api for `dora` Rust API. + +## v0.1.0 (2022-11-15) + +This is our first release of `dora-rs`! + +The current release includes: +- `dora-cli` which enables creating, starting and stopping dataflow. +- `dora-coordinator` which is our control plane. +- `dora-runtime` which is manage the runtime of operators. +- `custom-nodes` API which enables bridges from different languages. From 6f642984841e76b7699e5f5a156388f6d6ab8f96 Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 18 Jan 2023 11:59:36 +0100 Subject: [PATCH 16/26] Release dora-rs version 0.1.3 --- Cargo.lock | 54 ++++++++++++++++----------------- Cargo.toml | 2 +- apis/python/node/Cargo.toml | 2 +- apis/python/node/pyproject.toml | 2 +- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9c537380..dc40956c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -529,7 +529,7 @@ dependencies = [ [[package]] name = "communication-layer-pub-sub" -version = "0.1.2" +version = "0.1.3" dependencies = [ "eyre", "iceoryx-rs", @@ -540,7 +540,7 @@ dependencies = [ [[package]] name = "communication-layer-request-reply" -version = "0.1.2" +version = "0.1.3" dependencies = [ "eyre", ] @@ -891,7 +891,7 @@ dependencies = [ [[package]] name = "dora-cli" -version = "0.1.2" +version = "0.1.3" dependencies = [ "atty", "clap 4.0.3", @@ -911,7 +911,7 @@ dependencies = [ [[package]] name = "dora-coordinator" -version = "0.1.2" +version = "0.1.3" dependencies = [ "bincode", "clap 3.2.20", @@ -941,7 +941,7 @@ dependencies = [ [[package]] name = "dora-core" -version = "0.1.2" +version = "0.1.3" dependencies = [ "eyre", "once_cell", @@ -954,7 +954,7 @@ dependencies = [ [[package]] name = "dora-download" -version = "0.1.2" +version = "0.1.3" dependencies = [ "eyre", "reqwest", @@ -975,7 +975,7 @@ dependencies = [ [[package]] name = "dora-message" -version = "0.1.2" +version = "0.1.3" dependencies = [ "capnp", "capnpc", @@ -984,7 +984,7 @@ dependencies = [ [[package]] name = "dora-metrics" -version = "0.1.2" +version = "0.1.3" dependencies = [ "futures", "opentelemetry", @@ -995,7 +995,7 @@ dependencies = [ [[package]] name = "dora-node-api" -version = "0.1.2" +version = "0.1.3" dependencies = [ "capnp", "communication-layer-pub-sub", @@ -1015,7 +1015,7 @@ dependencies = [ [[package]] name = "dora-node-api-c" -version = "0.1.2" +version = "0.1.3" dependencies = [ "dora-node-api", "eyre", @@ -1025,7 +1025,7 @@ dependencies = [ [[package]] name = "dora-node-api-cxx" -version = "0.1.2" +version = "0.1.3" dependencies = [ "cxx", "cxx-build", @@ -1035,7 +1035,7 @@ dependencies = [ [[package]] name = "dora-node-api-python" -version = "0.1.2" +version = "0.1.3" dependencies = [ "dora-node-api", "dora-operator-api-python", @@ -1048,7 +1048,7 @@ dependencies = [ [[package]] name = "dora-operator-api" -version = "0.1.2" +version = "0.1.3" dependencies = [ "dora-operator-api-macros", "dora-operator-api-types", @@ -1056,14 +1056,14 @@ dependencies = [ [[package]] name = "dora-operator-api-c" -version = "0.1.2" +version = "0.1.3" dependencies = [ "dora-operator-api-types", ] [[package]] name = "dora-operator-api-cxx" -version = "0.1.2" +version = "0.1.3" dependencies = [ "cxx", "cxx-build", @@ -1076,7 +1076,7 @@ dependencies = [ [[package]] name = "dora-operator-api-macros" -version = "0.1.2" +version = "0.1.3" dependencies = [ "dora-operator-api", "dora-operator-api-types", @@ -1087,7 +1087,7 @@ dependencies = [ [[package]] name = "dora-operator-api-python" -version = "0.1.2" +version = "0.1.3" dependencies = [ "dora-node-api", "eyre", @@ -1098,14 +1098,14 @@ dependencies = [ [[package]] name = "dora-operator-api-types" -version = "0.1.2" +version = "0.1.3" dependencies = [ "safer-ffi", ] [[package]] name = "dora-runtime" -version = "0.1.2" +version = "0.1.3" dependencies = [ "clap 3.2.20", "dora-core", @@ -1136,7 +1136,7 @@ dependencies = [ [[package]] name = "dora-tracing" -version = "0.1.2" +version = "0.1.3" dependencies = [ "opentelemetry", "opentelemetry-jaeger", @@ -1665,7 +1665,7 @@ dependencies = [ [[package]] name = "iceoryx-example-node" -version = "0.1.2" +version = "0.1.3" dependencies = [ "dora-node-api", "eyre", @@ -1674,14 +1674,14 @@ dependencies = [ [[package]] name = "iceoryx-example-operator" -version = "0.1.2" +version = "0.1.3" dependencies = [ "dora-operator-api", ] [[package]] name = "iceoryx-example-sink" -version = "0.1.2" +version = "0.1.3" dependencies = [ "dora-node-api", "eyre", @@ -3251,7 +3251,7 @@ dependencies = [ [[package]] name = "rust-dataflow-example-node" -version = "0.1.2" +version = "0.1.3" dependencies = [ "dora-node-api", "eyre", @@ -3262,14 +3262,14 @@ dependencies = [ [[package]] name = "rust-dataflow-example-operator" -version = "0.1.2" +version = "0.1.3" dependencies = [ "dora-operator-api", ] [[package]] name = "rust-dataflow-example-sink" -version = "0.1.2" +version = "0.1.3" dependencies = [ "dora-node-api", "eyre", @@ -4981,7 +4981,7 @@ dependencies = [ [[package]] name = "zenoh-logger" -version = "0.1.2" +version = "0.1.3" dependencies = [ "zenoh", "zenoh-config", diff --git a/Cargo.toml b/Cargo.toml index d16a98c4..8ea3215e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ members = [ ] [workspace.package] -version = "0.1.2" +version = "0.1.3" [workspace.dependencies] dora-node-api = { version = "0.1.2", path = "apis/rust/node", default-features = false } diff --git a/apis/python/node/Cargo.toml b/apis/python/node/Cargo.toml index 7de836e7..386dbae7 100644 --- a/apis/python/node/Cargo.toml +++ b/apis/python/node/Cargo.toml @@ -1,5 +1,5 @@ [package] -version = "0.1.2" +version.workspace = true name = "dora-node-api-python" edition = "2021" license = "Apache-2.0" diff --git a/apis/python/node/pyproject.toml b/apis/python/node/pyproject.toml index 878e0b81..f23f5f3d 100644 --- a/apis/python/node/pyproject.toml +++ b/apis/python/node/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["maturin>=0.13.2,<0.14"] +requires = ["maturin>=0.13.2"] build-backend = "maturin" [project] From 4ee26594740a9709b12e36b52e761379a5bbead6 Mon Sep 17 00:00:00 2001 From: haixuantao Date: Wed, 18 Jan 2023 14:12:21 +0100 Subject: [PATCH 17/26] Update `[workspace.dependencies]` version and template version --- Cargo.toml | 6 +++--- binaries/cli/src/template/rust/mod.rs | 9 +++++++-- binaries/cli/src/template/rust/node/Cargo-template.toml | 2 +- .../cli/src/template/rust/operator/Cargo-template.toml | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8ea3215e..dd46cb85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,9 +22,9 @@ members = [ version = "0.1.3" [workspace.dependencies] -dora-node-api = { version = "0.1.2", path = "apis/rust/node", default-features = false } -dora-operator-api = { version = "0.1.2", path = "apis/rust/operator", default-features = false } -dora-core = { version = "0.1.2", path = "libraries/core" } +dora-node-api = { version = "0.1.3", path = "apis/rust/node", default-features = false } +dora-operator-api = { version = "0.1.3", path = "apis/rust/operator", default-features = false } +dora-core = { version = "0.1.3", path = "libraries/core" } [package] name = "dora-examples" diff --git a/binaries/cli/src/template/rust/mod.rs b/binaries/cli/src/template/rust/mod.rs index b74f0437..c5dc5ab9 100644 --- a/binaries/cli/src/template/rust/mod.rs +++ b/binaries/cli/src/template/rust/mod.rs @@ -4,6 +4,7 @@ use std::{ path::{Path, PathBuf}, }; +const VERSION: &str = env!("CARGO_PKG_VERSION"); pub fn create(args: crate::CommandNew) -> eyre::Result<()> { let crate::CommandNew { kind, @@ -81,7 +82,9 @@ fn create_operator(name: String, path: Option) -> Result<(), eyre::ErrR fs::create_dir(&src) .with_context(|| format!("failed to create directory `{}`", src.display()))?; - let cargo_toml = CARGO_TOML.replace("___name___", &name); + let cargo_toml = CARGO_TOML + .replace("___name___", &name) + .replace("___version___", &VERSION); let cargo_toml_path = root.join("Cargo.toml"); fs::write(&cargo_toml_path, &cargo_toml) .with_context(|| format!("failed to write `{}`", cargo_toml_path.display()))?; @@ -117,7 +120,9 @@ fn create_custom_node(name: String, path: Option) -> Result<(), eyre::E fs::create_dir(&src) .with_context(|| format!("failed to create directory `{}`", src.display()))?; - let cargo_toml = CARGO_TOML.replace("___name___", &name); + let cargo_toml = CARGO_TOML + .replace("___name___", &name) + .replace("___version___", &VERSION); let cargo_toml_path = root.join("Cargo.toml"); fs::write(&cargo_toml_path, &cargo_toml) .with_context(|| format!("failed to write `{}`", cargo_toml_path.display()))?; diff --git a/binaries/cli/src/template/rust/node/Cargo-template.toml b/binaries/cli/src/template/rust/node/Cargo-template.toml index 0052894b..1f937d2f 100644 --- a/binaries/cli/src/template/rust/node/Cargo-template.toml +++ b/binaries/cli/src/template/rust/node/Cargo-template.toml @@ -6,4 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -dora-node-api = { git = "https://github.com/dora-rs/dora.git", tag = "v0.1.2" } +dora-node-api = { git = "https://github.com/dora-rs/dora.git", tag = "___version___" } diff --git a/binaries/cli/src/template/rust/operator/Cargo-template.toml b/binaries/cli/src/template/rust/operator/Cargo-template.toml index fe920b45..90388fdd 100644 --- a/binaries/cli/src/template/rust/operator/Cargo-template.toml +++ b/binaries/cli/src/template/rust/operator/Cargo-template.toml @@ -9,4 +9,4 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -dora-operator-api = { git = "https://github.com/dora-rs/dora.git", tag = "v0.1.2" } +dora-operator-api = { git = "https://github.com/dora-rs/dora.git", tag = "___version___" } From 1beb2e80c0a98a1befe798432afe34801c8ed623 Mon Sep 17 00:00:00 2001 From: haixuantao Date: Wed, 18 Jan 2023 15:57:25 +0100 Subject: [PATCH 18/26] prefix version with a v --- binaries/cli/src/template/rust/node/Cargo-template.toml | 2 +- binaries/cli/src/template/rust/operator/Cargo-template.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/binaries/cli/src/template/rust/node/Cargo-template.toml b/binaries/cli/src/template/rust/node/Cargo-template.toml index 1f937d2f..2d609a7e 100644 --- a/binaries/cli/src/template/rust/node/Cargo-template.toml +++ b/binaries/cli/src/template/rust/node/Cargo-template.toml @@ -6,4 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -dora-node-api = { git = "https://github.com/dora-rs/dora.git", tag = "___version___" } +dora-node-api = { git = "https://github.com/dora-rs/dora.git", tag = "v___version___" } diff --git a/binaries/cli/src/template/rust/operator/Cargo-template.toml b/binaries/cli/src/template/rust/operator/Cargo-template.toml index 90388fdd..0ee039ca 100644 --- a/binaries/cli/src/template/rust/operator/Cargo-template.toml +++ b/binaries/cli/src/template/rust/operator/Cargo-template.toml @@ -9,4 +9,4 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -dora-operator-api = { git = "https://github.com/dora-rs/dora.git", tag = "___version___" } +dora-operator-api = { git = "https://github.com/dora-rs/dora.git", tag = "v___version___" } From 0043891640f71884c109e9d367b2877973284105 Mon Sep 17 00:00:00 2001 From: haixuantao Date: Wed, 18 Jan 2023 15:57:28 +0100 Subject: [PATCH 19/26] Update Changelog --- Changelog.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index cda0b86e..e457aebc 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,10 +1,11 @@ # Changelog -## Unreleased +## v0.1.3 (2023-01-18) * Package `DoraStatus` into dora python package: https://github.com/dora-rs/dora/pull/172 * Force removal of Pyo3 Object to avoid memory leak: https://github.com/dora-rs/dora/pull/168 * Bump tokio from 1.21.2 to 1.23.1: https://github.com/dora-rs/dora/pull/171 +* Create a changelog file: https://github.com/dora-rs/dora/pull/174 ## v0.1.2 (2022-12-15) From f76071205fc04a9651250fc4ac580e32c2330def Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Jan 2023 18:23:35 +0000 Subject: [PATCH 20/26] Bump webbrowser from 0.8.0 to 0.8.3 Bumps [webbrowser](https://github.com/amodm/webbrowser-rs) from 0.8.0 to 0.8.3. - [Release notes](https://github.com/amodm/webbrowser-rs/releases) - [Changelog](https://github.com/amodm/webbrowser-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/amodm/webbrowser-rs/compare/v0.8.0...v0.8.3) --- updated-dependencies: - dependency-name: webbrowser dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.lock | 167 +++++++--------------------------------- binaries/cli/Cargo.toml | 2 +- 2 files changed, 29 insertions(+), 140 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dc40956c..db380d06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -795,41 +795,6 @@ dependencies = [ "syn", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core", - "quote", - "syn", -] - [[package]] name = "dashmap" version = "4.0.2" @@ -868,6 +833,15 @@ dependencies = [ "generic-array 0.14.5", ] +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys", +] + [[package]] name = "dirs-next" version = "2.0.0" @@ -878,6 +852,17 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1708,12 +1693,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.2.3" @@ -1835,9 +1814,9 @@ checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" [[package]] name = "jni" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" dependencies = [ "cesu8", "combine", @@ -2168,64 +2147,12 @@ dependencies = [ "tempfile", ] -[[package]] -name = "ndk" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" -dependencies = [ - "bitflags", - "jni-sys", - "ndk-sys", - "num_enum", - "raw-window-handle", - "thiserror", -] - [[package]] name = "ndk-context" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" -[[package]] -name = "ndk-glue" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" -dependencies = [ - "libc", - "log", - "ndk", - "ndk-context", - "ndk-macro", - "ndk-sys", - "once_cell", - "parking_lot", -] - -[[package]] -name = "ndk-macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" -dependencies = [ - "darling", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "ndk-sys" -version = "0.4.1+23.1.7779620" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" -dependencies = [ - "jni-sys", -] - [[package]] name = "newline-converter" version = "0.2.2" @@ -2338,27 +2265,6 @@ dependencies = [ "libc", ] -[[package]] -name = "num_enum" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "num_threads" version = "0.1.5" @@ -2822,17 +2728,6 @@ dependencies = [ "syn", ] -[[package]] -name = "proc-macro-crate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" -dependencies = [ - "once_cell", - "thiserror", - "toml", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -3954,15 +3849,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "toml" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" -dependencies = [ - "serde", -] - [[package]] name = "tonic" version = "0.6.2" @@ -4452,12 +4338,15 @@ dependencies = [ [[package]] name = "webbrowser" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d62aa75495ab67cdc273d0b95cc76bcedfea2ba28338a4cf9b4137949dfac5" +checksum = "aa61ff77f695a94d9c8558e0bb5c362a8fd1f27c74663770fbc633acbafedbb6" dependencies = [ + "core-foundation", + "dirs", "jni", - "ndk-glue", + "log", + "ndk-context", "objc", "raw-window-handle", "url", diff --git a/binaries/cli/Cargo.toml b/binaries/cli/Cargo.toml index 0c504b51..383ece93 100644 --- a/binaries/cli/Cargo.toml +++ b/binaries/cli/Cargo.toml @@ -16,7 +16,7 @@ dora-core = { path = "../../libraries/core" } serde = { version = "1.0.136", features = ["derive"] } serde_yaml = "0.9.11" tempfile = "3.3.0" -webbrowser = "0.8.0" +webbrowser = "0.8.3" serde_json = "1.0.86" termcolor = "1.1.3" atty = "0.2.14" From e7d7718ef41b2219a25a152da16a4c8906a9e8c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Jan 2023 23:51:24 +0000 Subject: [PATCH 21/26] Bump bumpalo from 3.9.1 to 3.12.0 Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.9.1 to 3.12.0. - [Release notes](https://github.com/fitzgen/bumpalo/releases) - [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md) - [Commits](https://github.com/fitzgen/bumpalo/compare/3.9.1...3.12.0) --- updated-dependencies: - dependency-name: bumpalo dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index db380d06..c77c48f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -340,9 +340,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.9.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "byte-tools" From b74a524031aeeb6feeabbf47fe828d906b880650 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 4 Feb 2023 00:55:53 +0000 Subject: [PATCH 22/26] Bump tokio from 1.23.1 to 1.24.2 Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.23.1 to 1.24.2. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/commits) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- apis/c++/operator/Cargo.toml | 2 +- apis/rust/node/Cargo.toml | 2 +- binaries/coordinator/Cargo.toml | 2 +- binaries/runtime/Cargo.toml | 2 +- examples/iceoryx/sink/Cargo.toml | 2 +- examples/rust-dataflow/node/Cargo.toml | 2 +- libraries/extensions/download/Cargo.toml | 2 +- libraries/extensions/telemetry/metrics/Cargo.toml | 2 +- libraries/extensions/telemetry/tracing/Cargo.toml | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c77c48f2..bc54acde 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3761,9 +3761,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.23.1" +version = "1.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38a54aca0c15d014013256222ba0ebed095673f89345dd79119d912eb561b7a8" +checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" dependencies = [ "autocfg 1.1.0", "bytes", diff --git a/Cargo.toml b/Cargo.toml index dd46cb85..b250639c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ license = "Apache-2.0" [dev-dependencies] eyre = "0.6.8" -tokio = "1.23.1" +tokio = "1.24.2" dora-coordinator = { path = "binaries/coordinator" } dunce = "1.0.2" diff --git a/apis/c++/operator/Cargo.toml b/apis/c++/operator/Cargo.toml index ecdb6023..7b8bf06e 100644 --- a/apis/c++/operator/Cargo.toml +++ b/apis/c++/operator/Cargo.toml @@ -12,7 +12,7 @@ dora-operator-api = { workspace = true } eyre = "0.6.8" futures = "0.3.21" rand = "0.8.5" -tokio = { version = "1.23.1", features = ["rt", "macros"] } +tokio = { version = "1.24.2", features = ["rt", "macros"] } [build-dependencies] cxx-build = "1.0.73" diff --git a/apis/rust/node/Cargo.toml b/apis/rust/node/Cargo.toml index 3f92bbf6..7a72f712 100644 --- a/apis/rust/node/Cargo.toml +++ b/apis/rust/node/Cargo.toml @@ -26,4 +26,4 @@ dora-message = { path = "../../../libraries/message" } dora-core = { path = "../../../libraries/core" } [dev-dependencies] -tokio = { version = "1.23.1", features = ["rt"] } +tokio = { version = "1.24.2", features = ["rt"] } diff --git a/binaries/coordinator/Cargo.toml b/binaries/coordinator/Cargo.toml index b625c30f..1bd49727 100644 --- a/binaries/coordinator/Cargo.toml +++ b/binaries/coordinator/Cargo.toml @@ -13,7 +13,7 @@ eyre = "0.6.7" futures = "0.3.21" serde = { version = "1.0.136", features = ["derive"] } serde_yaml = "0.8.23" -tokio = { version = "1.23.1", features = ["full"] } +tokio = { version = "1.24.2", features = ["full"] } tokio-stream = { version = "0.1.8", features = ["io-util"] } tokio-util = { version = "0.7.1", features = ["codec"] } clap = { version = "3.1.8", features = ["derive"] } diff --git a/binaries/runtime/Cargo.toml b/binaries/runtime/Cargo.toml index ecf0f5e4..425fd656 100644 --- a/binaries/runtime/Cargo.toml +++ b/binaries/runtime/Cargo.toml @@ -27,7 +27,7 @@ futures = "0.3.21" futures-concurrency = "2.0.3" libloading = "0.7.3" serde_yaml = "0.8.23" -tokio = { version = "1.23.1", features = ["full"] } +tokio = { version = "1.24.2", features = ["full"] } tokio-stream = "0.1.8" zenoh = { git = "https://github.com/eclipse-zenoh/zenoh.git", rev = "79a136e4fd90b11ff5d775ced981af53c4f1071b" } zenoh-config = { git = "https://github.com/eclipse-zenoh/zenoh.git", rev = "79a136e4fd90b11ff5d775ced981af53c4f1071b" } diff --git a/examples/iceoryx/sink/Cargo.toml b/examples/iceoryx/sink/Cargo.toml index 69e06c7a..db6777b5 100644 --- a/examples/iceoryx/sink/Cargo.toml +++ b/examples/iceoryx/sink/Cargo.toml @@ -9,4 +9,4 @@ edition = "2021" dora-node-api = { workspace = true, features = ["iceoryx"] } eyre = "0.6.8" futures = "0.3.21" -tokio = { version = "1.23.1", features = ["macros"] } +tokio = { version = "1.24.2", features = ["macros"] } diff --git a/examples/rust-dataflow/node/Cargo.toml b/examples/rust-dataflow/node/Cargo.toml index c6f742a9..227e63c0 100644 --- a/examples/rust-dataflow/node/Cargo.toml +++ b/examples/rust-dataflow/node/Cargo.toml @@ -10,4 +10,4 @@ dora-node-api = { workspace = true, features = ["zenoh"] } eyre = "0.6.8" futures = "0.3.21" rand = "0.8.5" -tokio = { version = "1.23.1", features = ["rt", "macros"] } +tokio = { version = "1.24.2", features = ["rt", "macros"] } diff --git a/libraries/extensions/download/Cargo.toml b/libraries/extensions/download/Cargo.toml index a179dd89..f2fa2d4f 100644 --- a/libraries/extensions/download/Cargo.toml +++ b/libraries/extensions/download/Cargo.toml @@ -10,5 +10,5 @@ license = "Apache-2.0" eyre = "0.6.8" tempfile = "3.3.0" reqwest = "0.11.12" -tokio = { version = "1.23.1" } +tokio = { version = "1.24.2" } tracing = "0.1.36" diff --git a/libraries/extensions/telemetry/metrics/Cargo.toml b/libraries/extensions/telemetry/metrics/Cargo.toml index effaec67..5b904cbf 100644 --- a/libraries/extensions/telemetry/metrics/Cargo.toml +++ b/libraries/extensions/telemetry/metrics/Cargo.toml @@ -11,4 +11,4 @@ futures = "0.3.21" opentelemetry = { version = "0.17", features = ["rt-tokio", "metrics"] } opentelemetry-otlp = { version = "0.10", features = ["tonic", "metrics"] } opentelemetry-system-metrics = "0.1.1" -tokio = { version = "1.23.1", features = ["full"] } +tokio = { version = "1.24.2", features = ["full"] } diff --git a/libraries/extensions/telemetry/tracing/Cargo.toml b/libraries/extensions/telemetry/tracing/Cargo.toml index 1cc5f820..284dab7f 100644 --- a/libraries/extensions/telemetry/tracing/Cargo.toml +++ b/libraries/extensions/telemetry/tracing/Cargo.toml @@ -9,4 +9,4 @@ license = "Apache-2.0" [dependencies] opentelemetry = { version = "0.17", features = ["rt-tokio", "metrics"] } opentelemetry-jaeger = { version = "0.16", features = ["rt-tokio"] } -tokio = { version = "1.23.1", features = ["full"] } +tokio = { version = "1.24.2", features = ["full"] } From ce77e17d8b8da83d5ee12ef27bc59b75f926286d Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Sat, 11 Feb 2023 15:06:02 +0100 Subject: [PATCH 23/26] Use `DoraStatus` from dora library in template --- .../cli/src/template/python/operator/operator-template.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/binaries/cli/src/template/python/operator/operator-template.py b/binaries/cli/src/template/python/operator/operator-template.py index 36baecef..f503c32a 100644 --- a/binaries/cli/src/template/python/operator/operator-template.py +++ b/binaries/cli/src/template/python/operator/operator-template.py @@ -1,11 +1,6 @@ from typing import Callable -from enum import Enum - - -class DoraStatus(Enum): - CONTINUE = 0 - STOP = 1 +from dora import DoraStatus class Operator: From c0f25ea4bee2321509f8ddaac9c38b852a96069d Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Sat, 11 Feb 2023 15:09:43 +0100 Subject: [PATCH 24/26] Fix typo in dataflow template for yaml creation --- binaries/cli/src/template/python/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binaries/cli/src/template/python/mod.rs b/binaries/cli/src/template/python/mod.rs index fb742eef..d9128b46 100644 --- a/binaries/cli/src/template/python/mod.rs +++ b/binaries/cli/src/template/python/mod.rs @@ -89,7 +89,7 @@ fn create_dataflow(name: String, path: Option) -> Result<(), eyre::ErrR create_custom_node("node_1".into(), Some(root.join("node_1")))?; println!( - "Created new C dataflow at `{name}` at {}", + "Created new yaml dataflow `{name}` at {}", Path::new(".").join(root).display() ); From 917303f9485db1c2cecea8313eb92d35537d860f Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Sat, 11 Feb 2023 15:53:11 +0100 Subject: [PATCH 25/26] Await all nodes to finish before marking dataflow as finished Previouly, if one node failed we would immidiately mark the dataflow as finished even though other nodes might still be running. This meant that if one node failed, it would not be possible to stop the dataflow through the cli as it is marked as finished. This commit will just warn the user that one node failed but will keep await that all nodes within the dataflow finishes. --- binaries/coordinator/src/run/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/binaries/coordinator/src/run/mod.rs b/binaries/coordinator/src/run/mod.rs index 7422a04b..301b1012 100644 --- a/binaries/coordinator/src/run/mod.rs +++ b/binaries/coordinator/src/run/mod.rs @@ -8,6 +8,7 @@ use eyre::{bail, eyre, WrapErr}; use futures::{stream::FuturesUnordered, StreamExt}; use std::{env::consts::EXE_EXTENSION, path::Path}; use tokio_stream::wrappers::IntervalStream; +use tracing::warn; use uuid::Uuid; mod custom; @@ -135,7 +136,8 @@ pub async fn await_tasks( while let Some(task_result) = tasks.next().await { task_result .wrap_err("failed to join async task")? - .wrap_err("custom node failed")?; + .wrap_err("One node failed!") + .unwrap_or_else(|err| warn!("{err}")) } Ok(()) } From 933dadc68bccc9e3fddd8030ee7c9fc68260ef7c Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Wed, 15 Feb 2023 14:27:11 +0100 Subject: [PATCH 26/26] Expand `env` value when possible This commit enables users to pass environment variable as composition of env variable such as: ```yaml - id: yolov5 operator: outputs: - bbox - ready inputs: image: oasis_agent/image check: oasis_agent/yolov5_check python: ../../operators/yolov5_op.py env: YOLOV5_PATH: $HOME/Documents/dependencies/yolov5 YOLOV5_WEIGHT_PATH: $DORA_DEP_HOME/dependencies/yolov5/yolov5n.pt ``` Note that this is only for the env field. Expanding env variable for source path might conflict with using url as source path. --- Cargo.lock | 11 +++++++++++ libraries/core/Cargo.toml | 1 + libraries/core/src/descriptor/mod.rs | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index bc54acde..2f8cde29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -931,6 +931,7 @@ dependencies = [ "eyre", "once_cell", "serde", + "serde-with-expand-env", "serde_yaml 0.9.11", "uuid 1.2.1", "which", @@ -3366,6 +3367,16 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-with-expand-env" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "888d884a3be3a209308d0b66f1918ff18f60e93db837259e53ea7d8dd14e7e98" +dependencies = [ + "serde", + "shellexpand", +] + [[package]] name = "serde_derive" version = "1.0.144" diff --git a/libraries/core/Cargo.toml b/libraries/core/Cargo.toml index 494e6160..42b0d368 100644 --- a/libraries/core/Cargo.toml +++ b/libraries/core/Cargo.toml @@ -14,3 +14,4 @@ once_cell = "1.13.0" zenoh-config = { git = "https://github.com/eclipse-zenoh/zenoh.git", rev = "79a136e4fd90b11ff5d775ced981af53c4f1071b" } which = "4.3.0" uuid = { version = "1.2.1", features = ["serde"] } +serde-with-expand-env = "1.1.0" diff --git a/libraries/core/src/descriptor/mod.rs b/libraries/core/src/descriptor/mod.rs index d3ed0459..892c7a72 100644 --- a/libraries/core/src/descriptor/mod.rs +++ b/libraries/core/src/descriptor/mod.rs @@ -1,6 +1,7 @@ use crate::config::{CommunicationConfig, DataId, InputMapping, NodeId, NodeRunConfig, OperatorId}; use eyre::{bail, Result}; use serde::{Deserialize, Serialize}; +use serde_with_expand_env::with_expand_envs; use std::{ collections::{BTreeMap, BTreeSet, HashMap}, env::consts::EXE_EXTENSION, @@ -222,8 +223,11 @@ pub struct CustomNode { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EnvValue { + #[serde(deserialize_with = "with_expand_envs")] Bool(bool), + #[serde(deserialize_with = "with_expand_envs")] Integer(u64), + #[serde(deserialize_with = "with_expand_envs")] String(String), }