Skip to content

Authenticate GitHub API calls when building the package repository - #258

Merged
guanzhousongmicrosoft merged 1 commit into
documentdb:mainfrom
GuanzhouSong:guanzhousong/authenticate-release-api
Nov 15, 2026
Merged

guanzhousongmicrosoft merged 1 commit into
documentdb:mainfrom
GuanzhouSong:guanzhousong/authenticate-release-api

Conversation

@GuanzhouSong

Copy link
Copy Markdown
Contributor

"Validate package repository" fails at random (e.g. #257, curl exit 22 right after the downloads). download_packages.sh calls the GitHub API unauthenticated, so every job on a runner IP shares a 60 requests/hour limit, and CI runs the script twice per job.

The script now sends GH_TOKEN when set (5000/hour), passed through stdin so it stays out of argv, and reuses the release JSON it already fetched instead of fetching it a third time. Without a token it behaves as before, so local runs are unchanged.

Unauthenticated calls share 60 requests/hour per runner IP, so the package job fails at random with curl exit 22.

Signed-off-by: Guanzhou Song <26541184+GuanzhouSong@users.noreply.github.com>
@guanzhousongmicrosoft
guanzhousongmicrosoft merged commit 7c98bdc into documentdb:main Nov 15, 2026
3 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