Skip to content

Use REST API in linkchecker script#158995

Open
ehuss wants to merge 1 commit into
rust-lang:mainfrom
ehuss:linkchecker-use-git
Open

Use REST API in linkchecker script#158995
ehuss wants to merge 1 commit into
rust-lang:mainfrom
ehuss:linkchecker-use-git

Conversation

@ehuss

@ehuss ehuss commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This changes the linkchecker script to use the REST API instead of the raw endpoint to better deal with rate limits. We've noticed some occasional times when GitHub Actions hits the rate limit. I believe the raw http interface uses IP-based rate limits. On GitHub Actions, you're at the mercy of when other users exhaust the rate limit for the IP your job happens to grab. I believe this should help, especially using the GITHUB_TOKEN from the Actions workflow.

This will require updating the repos that use this script in order to benefit. This should be backwards compatible, though.

I considered using the gh cli as an alternative, which is more convenient to use, but I wanted to make sure that this script can easily be run locally, and it seems more likely that someone will have curl than gh.

This changes the linkchecker script to use the REST API instead of the
raw endpoint to better deal with rate limits. We've noticed some
occasional times when GitHub Actions hits the rate limit. I believe the
raw http interface uses IP-based rate limits. On GitHub Actions, you're
at the mercy of when other users exhaust the rate limit for the IP your
job happens to grab. I believe this should help.

This will require updating the repos that use this script in order to
benefit. This should be backwards compatible, though.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 9, 2026
@rustbot

rustbot commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Fallback group: @Mark-Simulacrum, @jieyouxu
  • @Mark-Simulacrum, @jieyouxu expanded to Mark-Simulacrum, jieyouxu
  • Random selection from Mark-Simulacrum, jieyouxu

@jieyouxu jieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, let's give this a try. r=me if PR CI is green.

View changes since this review

@ehuss

ehuss commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@bors r=jieyouxu rollup

@rust-bors

rust-bors Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 5af3b45 has been approved by jieyouxu

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants