Skip to content

Fix pagination for messaging client#3456

Merged
stephenfin merged 2 commits intogophercloud:mainfrom
shiftstack:messaging-pagination-fix
Jul 15, 2025
Merged

Fix pagination for messaging client#3456
stephenfin merged 2 commits intogophercloud:mainfrom
shiftstack:messaging-pagination-fix

Conversation

@stephenfin
Copy link
Copy Markdown
Contributor

Fixes #3336

Zaqar returns paths rather than URLs in links response fields and the Location header. In addition, since Dalmatian, it deploys under a path (/messaging) rather then behind a port. This combination has highlighted a bug in our pagination page handling, namely that we are ignoring the path element of the endpoint URL. While this is not an issue when the next link is an absolute URL, as with most other services, it results in incomplete URLs when the link URL is relative (/v2/messages) and the endpoint URL contains a path (https://example.com/messaging).

Fix this by concatenating the two paths, rather than overwriting the endpoint URLs path.

Zaqar returns paths rather than URLs in 'links' response fields and the
'Location' header. In addition, since Dalmatian, it deploys under a path
('/messaging') rather then behind a port. This combination has
highlighted a bug in our pagination page handling, namely that we are
ignoring the path element of the endpoint URL. While this is not an
issue when the 'next' link is an absolute URL, as with most other
services, it results in incomplete URLs when the link URL is relative
('/v2/messages') and the endpoint URL contains a path
('https://example.com/messaging').

Fix this by concatenating the two paths, rather than overwriting the
endpoint URLs path.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
@github-actions github-actions bot added edit:messaging This PR updates messaging code semver:patch No API change backport-v2 This PR will be backported to v2 labels Jul 15, 2025
@coveralls
Copy link
Copy Markdown

coveralls commented Jul 15, 2025

Coverage Status

coverage: 63.735% (+0.01%) from 63.725%
when pulling a76f08e on shiftstack:messaging-pagination-fix
into 93ff101 on gophercloud:main.

EmilienM
EmilienM previously approved these changes Jul 15, 2025
As a regression test.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
@stephenfin stephenfin merged commit dd0138a into gophercloud:main Jul 15, 2025
18 checks passed
@stephenfin stephenfin deleted the messaging-pagination-fix branch July 15, 2025 14:58
@github-actions
Copy link
Copy Markdown

Failed to backport PR to v2 branch. See logs for details.

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

Labels

backport-v2 This PR will be backported to v2 edit:messaging This PR updates messaging code semver:patch No API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pagination is broken from messaging service (Zaqar)

4 participants