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

Refactor organization-related pagination method from 'Offset pagination' to 'Checkpoint pagination'. #965

Merged
merged 12 commits into from
May 27, 2024

Conversation

developerkunal
Copy link
Contributor

@developerkunal developerkunal commented May 27, 2024

🔧 Changes

  • Change pagination method from "Offset pagination" to "Checkpoint pagination".

This pull request aims to enhance pagination functionality for importing or creating organization members, specifically addressing organizations with more than 50 members. We're transitioning from offset pagination, which has a limit of 1000 entries, to checkpoint pagination to ensure efficient retrieval of organization members beyond this limit.

Offset pagination retrieves data by specifying the number of items to skip and the number of items to return. However, its limitation of 1000 entries can lead to inefficient data retrieval for larger datasets. Checkpoint pagination, introduced here, offers a more efficient alternative, especially when dealing with a large number of organization members.

📚 References

🔬 Testing

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@developerkunal developerkunal requested a review from a team as a code owner May 27, 2024 10:10
@codecov-commenter
Copy link

codecov-commenter commented May 27, 2024

Codecov Report

Attention: Patch coverage is 76.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 90.24%. Comparing base (41ad9c8) to head (cab3244).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #965      +/-   ##
==========================================
+ Coverage   90.19%   90.24%   +0.05%     
==========================================
  Files         103      103              
  Lines       13886    13866      -20     
==========================================
- Hits        12525    12514      -11     
+ Misses        968      961       -7     
+ Partials      393      391       -2     
Files Coverage Δ
internal/auth0/organization/flatten.go 100.00% <100.00%> (ø)
internal/auth0/organization/resource_member.go 82.25% <100.00%> (ø)
internal/auth0/organization/data_source.go 88.59% <87.50%> (+1.55%) ⬆️
internal/auth0/organization/resource_members.go 85.00% <33.33%> (-1.31%) ⬇️

... and 1 file with indirect coverage changes

internal/acctest/sweep/organizations.go Outdated Show resolved Hide resolved
internal/auth0/organization/data_source.go Outdated Show resolved Hide resolved
@developerkunal developerkunal requested a review from sergiught May 27, 2024 14:54
@developerkunal developerkunal merged commit e232fe1 into main May 27, 2024
6 checks passed
@developerkunal developerkunal deleted the refactor-organization-list-pagination branch May 27, 2024 16:19
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.

3 participants