-
Notifications
You must be signed in to change notification settings - Fork 597
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
dns: update ListDNSRecords default per_page
attribute to 100 records
#1171
dns: update ListDNSRecords default per_page
attribute to 100 records
#1171
Conversation
f1a4010
to
f67ea98
Compare
changelog detected ✅ |
As outlined in github.com/cloudflare/pull/1169, when no pagination options are passed in to ListDNSRecords, autopagination is performed. However, the current PerPage value doesn't match that of the official API. This commit makes both values match. A new test is also implemented that more explicitly tests the auto pagination behaviour. Signed-off-by: Artur Rodrigues <[email protected]>
Signed-off-by: Artur Rodrigues <[email protected]>
f67ea98
to
ff35c3c
Compare
Codecov Report
@@ Coverage Diff @@
## master #1171 +/- ##
==========================================
- Coverage 49.40% 49.33% -0.07%
==========================================
Files 127 128 +1
Lines 12290 12416 +126
==========================================
+ Hits 6072 6126 +54
- Misses 4840 4886 +46
- Partials 1378 1404 +26
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
As per @favonia suggestion
@jacobbednarz @arturhoo I wonder how you feel about #1163? It you agree with my proposal, it seems we can address it in this PR as well. More specifically, we can add more assertions at the end of the new |
Thanks for taking the time to review this PR @favonia
I don't have a strong opinion. As I outlined in #1169, I'd be more in favor of an explicit auto-pagination param inside In any case, it seems this PR here is a good step forward despite the direction we end up going? |
It is, but it would have saved me from creating another PR. 😆 |
Feel free to assign that one to me if it ends up being accepted 😁 fwiw, |
per_page
attribute to 100 records
let's not muddy the waters here and keep them separate. they are different concerns and need separate conversations. I'm not rushing to change that return value as we have some work coming up to revamp the internals where we can cover that off.
this has been a pet peeve of mine for a while and is addressed in the experimental client. read it as |
This functionality has been released in v0.59.0. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Bump the
PerPage
value used when auto-pagination is performed onListDNSRecords
to 100, matching that of the API: https://api.cloudflare.com/#dns-records-for-a-zone-list-dns-recordsDescription
As outlined in #1169, when no pagination options are passed in to
ListDNSRecords
, auto- pagination is performed. However, the currentper_page
value doesn't match that of the official API (50 vs 100). This commit makes both values match.Has your change been tested?
A new test was implemented that more explicitly tests the auto pagination behaviour.
Screenshots (if appropriate):
N/A
Types of changes
What sort of change does your code introduce/modify?
None of the above. I'd classify this as an enhancement, per the discussion on #1169
Checklist: