From 1d56175da2149e7f6d70d792016083e6e8b395a0 Mon Sep 17 00:00:00 2001 From: Pratyush Sharma <56130065+pratyush618@users.noreply.github.com> Date: Sun, 8 Mar 2026 04:21:38 +0530 Subject: [PATCH 1/2] fix: enable postgres and redis backends in local builds The maturin config only listed pyo3/extension-module, so local builds via `maturin develop` excluded postgres and redis backends. Also improved the catch-all error message to dynamically list compiled-in backends. --- crates/taskito-python/src/py_queue.rs | 8 +++++++- pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/taskito-python/src/py_queue.rs b/crates/taskito-python/src/py_queue.rs index caf2968..4718c0e 100644 --- a/crates/taskito-python/src/py_queue.rs +++ b/crates/taskito-python/src/py_queue.rs @@ -85,8 +85,14 @@ impl PyQueue { StorageBackend::Redis(s) } _ => { + let mut available = vec!["sqlite"]; + #[cfg(feature = "postgres")] + available.push("postgres"); + #[cfg(feature = "redis")] + available.push("redis"); return Err(pyo3::exceptions::PyValueError::new_err(format!( - "Unknown backend: '{backend}'. Use 'sqlite', 'postgres', or 'redis'." + "Unknown backend: '{backend}'. Available backends: {}.", + available.join(", ") ))); } }; diff --git a/pyproject.toml b/pyproject.toml index 19bf8bb..3729ab4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ docs = ["zensical"] manifest-path = "crates/taskito-python/Cargo.toml" python-source = "py_src" module-name = "taskito._taskito" -features = ["pyo3/extension-module"] +features = ["pyo3/extension-module", "postgres", "redis"] [project.scripts] taskito = "taskito.cli:main" From 264f05229e0b780173bbe3eca4eac18fdb114086 Mon Sep 17 00:00:00 2001 From: Pratyush Sharma <56130065+pratyush618@users.noreply.github.com> Date: Sun, 8 Mar 2026 04:22:05 +0530 Subject: [PATCH 2/2] refactor: Update build matrix to use specific runners for different architectures and remove QEMU setup. --- .github/workflows/publish.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6677300..6cc0c14 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,16 +9,17 @@ permissions: jobs: build-wheels-linux: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: - target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu] + include: + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + - os: ubuntu-24.04-arm + target: aarch64-unknown-linux-gnu steps: - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -34,16 +35,17 @@ jobs: path: dist/*.whl build-wheels-musllinux: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: - target: [x86_64-unknown-linux-musl, aarch64-unknown-linux-musl] + include: + - os: ubuntu-latest + target: x86_64-unknown-linux-musl + - os: ubuntu-24.04-arm + target: aarch64-unknown-linux-musl steps: - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Build wheels uses: PyO3/maturin-action@v1 with: