Skip to content

Fix SDK crash when listing pull requests - #10603

Draft
UdiBen wants to merge 2 commits into
masterfrom
list-pull-requests-return-description
Draft

UdiBen wants to merge 2 commits into
masterfrom
list-pull-requests-return-description

Conversation

@UdiBen

@UdiBen UdiBen commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #9760

Change Description

Bug Fix

  1. Problem - Listing a repository's pull requests crashes the Python, Java and Rust SDKs.
  2. Root cause - The spec says every listed pull request has a description, but the list endpoint leaves it out.
  3. Solution - The spec now marks the description as optional on a pull request, and the SDKs are regenerated. The list keeps leaving descriptions out.

Background

Descriptions stay out of the list on purpose. Listing pull requests needs only pr:ListPullRequests, while reading one needs pr:ReadPullRequest. A user who can only list must not see descriptions. Both permissions apply to a whole repository.

We rejected returning the description in the list. That would show descriptions to users who can only list.

The same fix for lakeFS Enterprise is treeverse/lakeFS-Enterprise#4397.

Testing Details

The list pull requests controller test now checks that listed pull requests have no description.

Breaking Change?

SDK types only. description becomes optional in Python and nullable in Java. In Rust it becomes Option<String>, and PullRequest::new no longer takes a description. Callers who need the description fetch the single pull request.

The API spec marks description as required on each listed pull request,
so typed SDKs failed to parse list responses that omitted it.

Closes #9760
@UdiBen UdiBen added the include-changelog PR description should be included in next release changelog label Nov 9, 2026
@UdiBen UdiBen self-assigned this Nov 9, 2026
@github-actions github-actions Bot added the area/testing Improvements or additions to tests label Nov 9, 2026
Listing pull requests needs only pr:ListPullRequests, while a description
needs pr:ReadPullRequest. The list must not leak descriptions to callers
who can only list.

Make description optional on PullRequest in the spec instead, so typed
SDKs accept list responses without it. Regenerate the SDKs.
@github-actions github-actions Bot added area/API Improvements or additions to the API area/sdk/python labels Nov 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/API Improvements or additions to the API area/sdk/python area/testing Improvements or additions to tests include-changelog PR description should be included in next release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: the lakefs api for fetching pull requests seems to not return the field description

1 participant