auth0 / terraform-provider-auth0

The Auth0 Terraform Provider is the official plugin for managing Auth0 tenant configuration through the Terraform tool.
https://registry.terraform.io/providers/auth0/auth0/latest/docs
Mozilla Public License 2.0
157 stars 73 forks source link

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

Closed developerkunal closed 1 month ago

developerkunal commented 1 month ago

πŸ”§ Changes

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

codecov-commenter commented 1 month ago

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](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/965/graphs/tree.svg?width=650&height=150&src=pr&token=geObb1Hn9E&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0)](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/965?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) ```diff @@ 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](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/965?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) | Coverage Ξ” | | |---|---|---| | [internal/auth0/organization/flatten.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/965?src=pr&el=tree&filepath=internal%2Fauth0%2Forganization%2Fflatten.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvYXV0aDAvb3JnYW5pemF0aW9uL2ZsYXR0ZW4uZ28=) | `100.00% <100.00%> (ΓΈ)` | | | [internal/auth0/organization/resource\_member.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/965?src=pr&el=tree&filepath=internal%2Fauth0%2Forganization%2Fresource_member.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvYXV0aDAvb3JnYW5pemF0aW9uL3Jlc291cmNlX21lbWJlci5nbw==) | `82.25% <100.00%> (ΓΈ)` | | | [internal/auth0/organization/data\_source.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/965?src=pr&el=tree&filepath=internal%2Fauth0%2Forganization%2Fdata_source.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvYXV0aDAvb3JnYW5pemF0aW9uL2RhdGFfc291cmNlLmdv) | `88.59% <87.50%> (+1.55%)` | :arrow_up: | | [internal/auth0/organization/resource\_members.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/965?src=pr&el=tree&filepath=internal%2Fauth0%2Forganization%2Fresource_members.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvYXV0aDAvb3JnYW5pemF0aW9uL3Jlc291cmNlX21lbWJlcnMuZ28=) | `85.00% <33.33%> (-1.31%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/965/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0)