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

La 175 segment unify pagination loop fix #5596

Merged
merged 9 commits into from
Dec 17, 2024

Conversation

Vagoasdf
Copy link
Contributor

Closes LA#175

Description Of Changes

Sets up a new parameter on link pagination, to check for a "has next propiety", optionally included on the response parameters, which determines if there is a next link to be searched for

Some endpoints (see Segment Unify ) rely on this response parameter, and they return the current page on the has next value

Code Changes

  • updated pagination strategy

Steps to Confirm

Ideally we would check with Segment Unify. Currently being tested with Unit Testing

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
  • Followup issues:
    • Followup issues created (include link)
    • No followup issues
  • Database migrations:
    • No migrations
  • Documentation:

Copy link

vercel bot commented Dec 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview Dec 17, 2024 7:42pm

Copy link

cypress bot commented Dec 11, 2024

fides    Run #11536

Run Properties:  status check passed Passed #11536  •  git commit ba47c1ff6c ℹ️: Merge be95ab308ac6864f944dcb66146c4021c9b7838b into 4f1a202e0bfc71a269a6aa78f49e...
Project fides
Branch Review refs/pull/5596/merge
Run status status check passed Passed #11536
Run duration 00m 57s
Commit git commit ba47c1ff6c ℹ️: Merge be95ab308ac6864f944dcb66146c4021c9b7838b into 4f1a202e0bfc71a269a6aa78f49e...
Committer Bruno Gutierrez Rios
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

@Vagoasdf Vagoasdf marked this pull request as ready for review December 11, 2024 20:22
@Vagoasdf Vagoasdf requested a review from galvana December 11, 2024 20:26
"customers": [{"id": 1}, {"id": 2}, {"id": 3}],
"links": {
"next": "https://domain.com/customers?page=def",
"hasNext": "true",
Copy link
Contributor

Choose a reason for hiding this comment

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

Now that we know what the actual payload looks like, we should replace this with a boolean

Suggested change
"hasNext": "true",
"hasNext": True,

Same thing for the other fixture

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replacing them with base boolean.

I was thinking, would it be redundant to also test that it keeps catching these string values correctly? I.E if a API returns TRUE/FALSE in all caps, or something similar

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is ok for now, we can handle those use cases if we run into them

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.15%. Comparing base (9371f6f) to head (be95ab3).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5596      +/-   ##
==========================================
+ Coverage   80.96%   87.15%   +6.18%     
==========================================
  Files         388      387       -1     
  Lines       23895    23900       +5     
  Branches     2585     2585              
==========================================
+ Hits        19347    20830    +1483     
+ Misses       4028     2512    -1516     
- Partials      520      558      +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

CHANGELOG.md Outdated Show resolved Hide resolved
@galvana galvana merged commit 937e713 into main Dec 17, 2024
14 checks passed
@galvana galvana deleted the LA-175-Segment-unify-pagination-loop-fix branch December 17, 2024 19:43
Copy link

cypress bot commented Dec 17, 2024

fides    Run #11537

Run Properties:  status check passed Passed #11537  •  git commit 937e713357: La 175 segment unify pagination loop fix (#5596)
Project fides
Branch Review main
Run status status check passed Passed #11537
Run duration 00m 48s
Commit git commit 937e713357: La 175 segment unify pagination loop fix (#5596)
Committer Bruno Gutierrez Rios
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

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