fix: fall back to full list endpoints when -lite routes 404 on self-hosted CE- #173 - #1
Open
tulayha wants to merge 2 commits into
Open
Conversation
…osted CE list_projects, list_cycles, list_modules, and get_workspace_members call the *-lite endpoints added in 0.2.10 (projects-lite, cycles-lite, modules-lite, members-lite) for Cloud performance. Self-hosted Plane Community Edition instances don't register these routes, so all four tools 404 even though the workspace, auth, and the non-lite endpoints work fine. Add a lite_or_fallback() helper that retries via the full endpoint on a 404 and reshapes its response into the lite envelope the tool advertises, then wire it into the four affected tools. Fixes makeplane#172, makeplane#170, makeplane#169, makeplane#126 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- projects.py: filter archived projects client-side in the fallback path, since the full /projects/ endpoint's PaginatedQueryParams has no include_archived toggle, matching the lite path's default. - workspaces.py: document why the get_members fallback can't forward cursor/per_page (the endpoint is unpaginated by design). - lite_fallback.py: use model_validate for the bare-list branch, consistent with the paginated branch. - tests: cover full_call raising after a 404 and an empty bare-list fallback. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
No description provided.