mirror of
https://github.com/docker/login-action.git
synced 2026-03-19 20:20:27 +08:00
Add retry logic for transient login failures
Adds configurable retry mechanism with basic exponential backoff to handle intermittent failures when authenticating to container registries, particularly GCP (GAR/GCR) where I'm seeing errors intermittently. - Add retry-attempts input (default: 0 for backward compatibility, making it opt in) - Add retry-delay input (default: 5000ms) - Implement exponential backoff retry logic in docker login - Chose to just write a simple retry function vs. going with a library - Retry all errors except 5xxs - I'm seeing intermittent 401 failures - Add tests for retry behavior - Update README with new input parameters Signed-off-by: Naush Korai <naush.korai@mixpanel.com>
This commit is contained in:
parent
3227f5311c
commit
47690b2d19
7 changed files with 201 additions and 32 deletions
|
|
@ -29,6 +29,14 @@ inputs:
|
|||
registry-auth:
|
||||
description: 'Raw authentication to registries, defined as YAML objects'
|
||||
required: false
|
||||
retry-attempts:
|
||||
description: 'Number of retry attempts for transient failures'
|
||||
default: '0'
|
||||
required: false
|
||||
retry-delay:
|
||||
description: 'Delay between retries in milliseconds'
|
||||
default: '5000'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: 'node20'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue