Skip to content
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

⬆️ ♻️ Upgrade pagination customisation in api-server #6545

Merged

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Oct 16, 2024

What do these changes do?

Enhancements to Customization in fastapi_pagination and Fix for limit Query Parameter Customization

  • ⬆️ Upgrades fastapi_pagination page by removing version limit in constraints.txt
  • ♻️🐛 Uses new CustomizedPage to customise query parameters and name of the Page model. We also replace Field by Query to avoid error reported in constraints.txt (AttributeError: 'FieldInfo' object has no attribute 'in_'). @giancarloromeo I believe this is also causing the same issues we see in ⬆️ Upgrade API server (Pydantic v2) #6511.

REMINDER: @giancarloromeo when this is merged into master, do not forget to resync your branches with master so you get this change.

Related issue/s

How to test

cd services/api-service
make install-dev
make test-dev-unit

Dev-ops checklist

None

@pcrespov pcrespov self-assigned this Oct 16, 2024
@pcrespov pcrespov added the a:apiserver api-server service label Oct 16, 2024
@pcrespov pcrespov added this to the MartinKippenberger milestone Oct 16, 2024
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.8%. Comparing base (cafbf96) to head (015c887).
Report is 640 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #6545      +/-   ##
=========================================
- Coverage    84.5%   66.8%   -17.8%     
=========================================
  Files          10     684     +674     
  Lines         214   33433   +33219     
  Branches       25     265     +240     
=========================================
+ Hits          181   22343   +22162     
- Misses         23   11029   +11006     
- Partials       10      61      +51     
Flag Coverage Δ
integrationtests 64.7% <ø> (?)
unittests 89.8% <100.0%> (+5.2%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...rc/simcore_service_api_server/models/pagination.py 93.3% <100.0%> (ø)

... and 693 files with indirect coverage changes

@pcrespov pcrespov changed the title WIP: Is6511/upgrade fastapi pagination ⬆️ ♻️ Upgrade pagination customisation in api-server Oct 16, 2024
@pcrespov pcrespov force-pushed the is6511/upgrade-fastapi-pagination branch from 7d6e597 to 015c887 Compare October 16, 2024 12:18
@pcrespov pcrespov marked this pull request as ready for review October 16, 2024 12:18
@pcrespov pcrespov enabled auto-merge (squash) October 16, 2024 12:18
Copy link

Copy link
Contributor

@giancarloromeo giancarloromeo left a comment

Choose a reason for hiding this comment

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

Many thanks

@pcrespov pcrespov merged commit 33237ba into ITISFoundation:master Oct 16, 2024
57 checks passed
giancarloromeo pushed a commit to giancarloromeo/osparc-simcore that referenced this pull request Oct 16, 2024
@pcrespov pcrespov deleted the is6511/upgrade-fastapi-pagination branch October 16, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:apiserver api-server service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants