single-cell-data / TileDB-SOMA

Python and R SOMA APIs using TileDB’s cloud-native format. Ideal for single-cell data at any scale.
MIT License
79 stars 21 forks source link

[c++] Remap `TileDBError` to `TileDBSOMAError` #2753

Closed nguyenv closed 3 weeks ago

nguyenv commented 3 weeks ago

Issue and/or context:

Fix for https://github.com/jdblischak/centralized-tiledb-nightlies/issues/12#issuecomment-2178827937

Changes:

Rethrow TileDBError as TileDBSOMAError in SOMAGroup classes.

nguyenv commented 3 weeks ago

[sc-49820]

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.02%. Comparing base (b53e462) to head (96124d3).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2753 +/- ## ======================================= Coverage 90.02% 90.02% ======================================= Files 37 37 Lines 3939 3939 ======================================= Hits 3546 3546 Misses 393 393 ``` | [Flag](https://app.codecov.io/gh/single-cell-data/TileDB-SOMA/pull/2753/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data) | Coverage Δ | | |---|---|---| | [python](https://app.codecov.io/gh/single-cell-data/TileDB-SOMA/pull/2753/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data) | `90.02% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data#carryforward-flags-in-the-pull-request-comment) to find out more. | [Components](https://app.codecov.io/gh/single-cell-data/TileDB-SOMA/pull/2753/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data) | Coverage Δ | | |---|---|---| | [python_api](https://app.codecov.io/gh/single-cell-data/TileDB-SOMA/pull/2753/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data) | `90.02% <ø> (ø)` | | | [libtiledbsoma](https://app.codecov.io/gh/single-cell-data/TileDB-SOMA/pull/2753/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=single-cell-data) | `∅ <ø> (∅)` | |
jdblischak commented 3 weeks ago

Testing the PR branch viviannguyen/throw-somacollection-open-tiledbsoma in https://github.com/jdblischak/centralized-tiledb-nightlies/actions/runs/9585883108

johnkerl commented 3 weeks ago

Also passed on my Ubuntu instance (fresh main this morning was OK on my Mac, not on Ubuntu, I don't know why)

github-actions[bot] commented 3 weeks ago

The backport to release-1.12 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-1.12 release-1.12
# Navigate to the new working tree
cd .worktrees/backport-release-1.12
# Create a new branch
git switch --create backport-2753-to-release-1.12
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick --mainline 1 7814aaf3d71d21c903fd085d042693c865b3b29e
# Push it to GitHub
git push --set-upstream origin backport-2753-to-release-1.12
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-1.12

Then, create a pull request where the base branch is release-1.12 and the compare/head branch is backport-2753-to-release-1.12.

nguyenv commented 3 weeks ago

Pybind11 sometimes throws a TileDBError and other times a RuntimeError whenever it translates a TileDBError exception from C++. What's odd is that we don't even have a TileDBError binding in SOMA, but maybe it picks it up from tiledb-py (but only sometimes?). I am not sure. But in any case I would just like to consistently rethrow as SOMAErrors in the C++ code.

johnkerl commented 3 weeks ago

Removing the backport release-1.12 tag