Skip to content

feat: add retry logic for logins#274

Closed
aiell0 wants to merge 1 commit intobufbuild:mainfrom
aiell0:main
Closed

feat: add retry logic for logins#274
aiell0 wants to merge 1 commit intobufbuild:mainfrom
aiell0:main

Conversation

@aiell0
Copy link
Copy Markdown

@aiell0 aiell0 commented Apr 24, 2026

Summary

  • add retry support around buf registry login so transient BSR slowness does not fail the action immediately
  • introduce login_retries and login_retry_delay_seconds action inputs with defaults of 5 retries and 10 seconds between attempts
  • validate retry inputs, document the new behavior in the README, and rebuild the bundled dist/ artifacts

Why

BSR login currently fails on the first slow or temporary registry response. This change makes login more resilient in CI while still allowing users to tune retry behavior when they need different timing.

Error

Run bufbuild/buf-action@v1
Using the latest release of buf: 1.68.4
Downloading buf (1.68.4)
Setup buf (1.68.4) at /home/runner/_work/_tool/buf/1.68.4/x64
/home/runner/_work/_tool/buf/1.68.4/x64/buf registry login rogo.buf.dev --token-stdin
Failure: the server hosted at that remote is unavailable.
Error: The process '/home/runner/_work/_tool/buf/1.68.4/x64/buf' failed with exit code 1

Testing

  • npm ci
  • npm run lint
  • npm run build

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 24, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Collaborator

@emcfarlane emcfarlane left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. It would be good to correlate these failures with logs on our side before deciding if this is the right approach. If its a LB blip I think we can get away with a more conservative retry approach and apply it to more methods. I'm not sure if this is the right place.

Comment thread README.md
@aiell0 aiell0 closed this Apr 25, 2026
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.

3 participants