Skip to content

Bugfix/eodhp 549 fastapi ensure next link only included when subsequent results exist #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

tjellicoe-tpzuk
Copy link
Collaborator

Update STAC-FastApi to Only Return Tokens for Pagination when Subsequent Results are Available

  • Update token logic to only return token when mroe results are available in elasticsearch
    • Logic borrows from a later commit to the STAC-FastApi repository
  • Updated token handling for access-control to return the token for the last result returned to allow pagination to continue based on last accessible result, rather than last ES response
    • The tokens for each ES result are returned from certain functions to allow STAC-FastApi to return the token for the last result returned after the access-control layer has filtered the responses
    • This allows pagination to continue from the latest access-controlled entry, rather than from the latest ES token

This PR is to be merged into the EODHP-481 branch as this also includes updates to pagination logic and this helps to consolidate code changes together.

@tjellicoe-tpzuk tjellicoe-tpzuk self-assigned this Aug 7, 2024
Copy link

@ahaywardtvuk ahaywardtvuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the code well enough to review in detail this sprint, so my only comment is on the left-over debugging 'print's.

print("here")
print(i)
if i < len(temp_catalogs) - 1:
print("AND FINALLY HERE")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These print statements seem to be left over from debugging and can be removed now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot, removed unnecessary print statements

@tjellicoe-tpzuk tjellicoe-tpzuk merged commit 2c1e095 into feature/EODHP-481-access-control-for-resource-catalogue-entries Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants