fix(core): treat LadybugDB as available only when its native engine loads (#1731) - #1737
Open
Shashankss1205 wants to merge 3 commits into
Open
Shashankss1205 wants to merge 3 commits into
Shashankss1205 wants to merge 3 commits into
Conversation
…oads (#1731) Availability was `find_spec("ladybug")`, but some ladybug wheels (Windows) ship neither the pybind extension nor the lbug C-API shared library. The package imports, then the first Database() dies with "Could not find lbug C API shared library" — which kept `test (windows-latest)` permanently red and would let fallback/explicit selection land users on a dead backend. - core: `ladybugdb_unavailable_reason()` (cached) probes pybind, then C-API; `_is_ladybugdb_available()` uses it; explicit selection names the reason. - cli doctor reports the real reason instead of "installed". - parity e2e skips ladybug with the reason when the engine can't load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ |
Contributor
🔍 PR Code Graph Analysisfix(core): treat LadybugDB as available only when its native engine loads (#1731) (#1737) 📊 Interactive VisualizationView the blast radius graph: PR Reviewer Dashboard 📦 ArtifactsThe graph JSON has been uploaded as a build artifact: Generated by CodeGraphContext using FalkorDB Lite |
Next layer of #1731 on Windows: the falkordb client imports, Lite does not run, and the leg fell back to an absent Neo4j. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…obe reason ladybug swallows the pybind ImportError and falls back to the C-API lib, so 'Could not find lbug C API shared library' hid the real Windows cause. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1731.
Problem
LadybugDB availability was checked with
find_spec("ladybug"). On Windows the ladybug wheel installs but ships neither the pybind extension nor thelbugC-API shared library, so the package imports and the firstDatabase()dies with "Could not find lbug C API shared library".That kept
test (windows-latest)permanently red on every PR. It also means a real Windows user with ladybug installed could be routed to it (explicit selection or fallback) and fail at first use with an opaque error.Fix
core.ladybugdb_unavailable_reason()(cached) returnsNonewhen the engine can run. It tries the pybind extension first, then the C-API library, and otherwise returns the concrete reason._is_ladybugdb_available()now delegates to it.ladybugdbis selected explicitly and the engine can't load, the error now names the real reason and suggests another backend, instead of saying "not installed".cgc doctorprints the same reason.Tests
tests/unit/core/test_ladybug_native_probe.pycovers five cases: missing engine, pybind-only, C-API-only, not installed, and the explicit-selection message.tests/unit/core+tests/unit/cli: 484 passed.🤖 Generated with Claude Code