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

Fixes issue 4956: 'Linode DNS Pagination Bug' #5172

Merged
merged 14 commits into from
Nov 12, 2024

Conversation

vmmello
Copy link
Contributor

@vmmello vmmello commented Jun 11, 2024

fixes issue #4956

previous code only worked for the first 10 domains on the account (as Linode API returned a paginated response, with only 10 records).

This change makes an exact search query for each subdomain, completely removing any need for walking through paginated responses. What makes it work for large accounts with any number of domains.

fixes issue acmesh-official#4956

previous code only worked for the first 10 domains on the account (as Linode
API returned a paginated response, with only 10 records).

This change makes an exact search query for each subdomain, completely removing any
need for walking through paginated responses. What makes it work for large
accounts with any number of domains.
Copy link

Welcome
First thing: don't send PR to the master branch, please send to the dev branch instead.
Please make sure you've read our DNS API Dev Guide and DNS-API-Test.
Then reply on this message, otherwise, your code will not be reviewed or merged.
We look forward to reviewing your Pull request shortly ✨
注意: 必须通过了 DNS-API-Test 才会被 review. 无论是修改, 还是新加的 dns api, 都必须确保通过这个测试.

minor fix for text coherence
fix minor problems reported by shellcheck and shfmt
@vmmello
Copy link
Contributor Author

vmmello commented Sep 23, 2024

Can this be merged into dev, please?

@Neilpang
Copy link
Member

@Neilpang Neilpang closed this Nov 3, 2024
@vmmello
Copy link
Contributor Author

vmmello commented Nov 4, 2024

Hi @Neilpang,

I tried testing it accordingly to what is written in the DNS-API-Test, but there's a job that fails. I also couldn't ask for help because the repository was closed for new commenters last week.

Currently there's a job failing:

Run echo "Read this:   https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Test"
  echo "Read this:   https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Test"
  if [ "vmmello" != "acmesh-official" ]; then
    false
  fi
  shell: /usr/bin/bash -e {0}
Read this:   https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Test
Error: Process completed with exit code 1.

I've read the instructions several times, but it's not clear what I'm doing wrong. From the msg above it looks like it's not expecting the tests to run on my account, though for what I understand, the instructions on DNS-API-Test tell that secrets should be set on my account.

Can you please help?

@Neilpang Neilpang reopened this Nov 4, 2024
@Neilpang
Copy link
Member

Neilpang commented Nov 4, 2024

I think the instructions are clear enough. I wish I could help.
You must define TokenName1 /TokenValue1

was unintendedly replaying the save _H4 header on all requests, what was
causing random failures on responses from the API.
the same pagination bug that happens for accounts with a large number of
domains also happens for DNS zones with a large number of records. The
previous code assumes that all records are returned in a single page.

Changed the code to do an exact match search so that it returns only the few
required records and never paginates replies.
@vmmello
Copy link
Contributor Author

vmmello commented Nov 12, 2024

Hi @Neilpang. I figured it out. Thanks for the reply anyway.

This is done. It's ready for testing and merging.

@Neilpang Neilpang merged commit 15e9e85 into acmesh-official:dev Nov 12, 2024
13 checks passed
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