Repository navigation
fix(git): return an empty page from installations search for providers without installations - #1045
Merged
tofarr merged 1 commit intoOct 27, 2026
Conversation
…s without installations GitLab and Forgejo list repositories directly, so they have no installation concept. /api/v1/git/installations/search answered them with a 400, which surfaced as a failed request on /canvas once a GitLab login IdP started counting as a git provider (#1037). An empty page is the truthful answer and keeps older Agent Canvas builds and other clients from erroring. Co-authored-by: openhands <openhands@all-hands.dev>
tofarr
marked this pull request as ready for review
October 27, 2026 18:30
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
tofarr
deleted the
fix/installations-search-empty-for-unsupported-providers
branch
October 27, 2026 18:32
Contributor
|
🚀 Released in 1.81.0. |
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.
HUMAN:
Fixes error when gitlab was the last selected repository
Screen.Recording.2026-10-27.at.6.29.17.PM.mov
AGENT:
Why
GET /api/v1/git/installations/searchreturned400 "Provider ProviderType.GITLAB doesn't support installations"for GitLab and Forgejo. Those providers list repositories directly; they have no level above repositories like GitHub App installations, Bitbucket workspaces or Azure DevOps organizations, so "no installations" is the truthful answer rather than an error. The endpoint is already lenient elsewhere:ProviderHandler.get_github_installationscatches failures and returns[].This started showing up on
/canvaslocally once #1037 (OHE-3770) made a GitLab login IdP count as a git provider. Agent Canvas is pinned per release, so fixing the client alone does not protect installs that are already deployed.Summary
search_user_installationsreturnsInstallationPage(items=[])for providers without installations instead of raising a 400. The 403 for users with no git provider token is unchanged.gitlabandforgejothrough the real route.Issue Number
Related: OHE-3770 / #1037. A matching client-side guard is going into
OpenHands/OpenHands(Agent Canvas).How to Test
uv run pytest tests/unit/app_server/test_git_router.py --confcutdir=tests/unit/app_server: 34 passed. The new test fails withassert 400 == 200onmainand passes on this branch.GET /api/v1/git/installations/search?provider=gitlab&limit=100returns200 {"items": [], "next_page_id": null}.Type
Notes
Clients that relied on the 400 to detect "not supported" now get an empty list. Neither frontend did: both decide which providers use installations on the client and never call this for GitLab on the released code path.
This PR was created by an AI agent (OpenHands) on behalf of Tim O'Farrell.
@tofarr can click here to continue refining the PR
Enterprise server image for this PR: