Skip to content

fix: Fix npe in pagination (backport #23880)#23883

Merged
aljo242 merged 3 commits into
release/v0.53.xfrom
mergify/bp/release/v0.53.x/pr-23880
Mar 4, 2025
Merged

fix: Fix npe in pagination (backport #23880)#23883
aljo242 merged 3 commits into
release/v0.53.xfrom
mergify/bp/release/v0.53.x/pr-23880

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Mar 4, 2025

Description

Fixes a null pointer exception in the pagination handling which is triggered when the provided predicate or transform function returns an error.

Test w/o fix shows the behavior which changes to passing after the fix is applied.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:

  • confirmed ! in the type prefix if API or client breaking change

  • targeted the correct branch (see PR Targeting)

  • provided a link to the relevant issue or specification

  • reviewed "Files changed" and left comments if necessary

  • included the necessary unit and integration tests

  • added a changelog entry to CHANGELOG.md

  • updated the relevant documentation or specification, including comments for documenting Go code

  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • Bug Fixes

    • Resolved an issue in pagination that could cause runtime errors due to null values.
  • Tests

    • Improved test coverage by adding a case to verify proper error handling during pagination.

This is an automatic backport of pull request #23880 done by [Mergify](https://mergify.com).

(cherry picked from commit 44bd60f)

# Conflicts:
#	CHANGELOG.md
@mergify mergify Bot requested a review from a team March 4, 2025 17:32
@mergify
Copy link
Copy Markdown
Contributor Author

mergify Bot commented Mar 4, 2025

Cherry-pick of 44bd60f has failed:

On branch mergify/bp/release/v0.53.x/pr-23880
Your branch is up to date with 'origin/release/v0.53.x'.

You are currently cherry-picking commit 44bd60f7e.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   types/query/collections_pagination.go
	modified:   types/query/collections_pagination_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@aljo242 aljo242 merged commit e857902 into release/v0.53.x Mar 4, 2025
@aljo242 aljo242 deleted the mergify/bp/release/v0.53.x/pr-23880 branch March 4, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants