Retry failed GitHub release scans with backoff
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful

A failed scan no longer advances last_synced_at; it schedules a retry from
60s with exponential backoff, honouring Retry-After/X-RateLimit-Reset.
This commit is contained in:
2026-10-09 22:31:38 +11:00
parent 1837f6ef8c
commit 07e17791d1
18 changed files with 477 additions and 134 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import (
"testing"
"time"
"git.unkin.net/unkin/artifactapi/internal/provider"
"git.unkin.net/unkin/artifactapi/pkg/models"
)
@@ -44,7 +45,7 @@ func TestGitHubDebSyncLease(t *testing.T) {
t.Fatal("replica-2 claimed while replica-1 holds the lease")
}
if err := testDB.ReleaseGitHubDebSyncLease(ctx(), name, "replica-1", `"etag-1"`, time.Now()); err != nil {
if err := testDB.ReleaseGitHubDebSyncLease(ctx(), name, "replica-1", provider.SyncResult{Etag: `"etag-1"`}); err != nil {
t.Fatalf("release: %v", err)
}