OpenAPI fetch should retry temporary errors with backoff limit

オープン
#59 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
go
領域
backend

調査の方向性

まず、controller の OpenAPISpecReady condition と generation-based cache の動作を追跡します。acceptance criteria を使って一時的な fetch error と永続的な fetch error、および可視化する必要がある retry state を特定し、その後 backoff、retry limits、resets、non-retryable errors を対象とするテストを追加します。

索引モデルが issue の本文から書いたものです。

説明

enhancement triage/accepted

Problem

When OpenAPI spec fetch fails, the error is persisted in the OpenAPISpecReady status condition. Due to generation-based caching, the controller does not retry fetching unless the spec changes.

This means:

  • Temporary failures (network timeout, server 503) require manual spec edits to trigger retry
  • Permanent failures (404, invalid URL) would waste resources if blindly retried

Desired Behavior

The controller should:

  1. Distinguish error types

    • Temporary: network errors, rate limiting (429), server errors (5xx)
    • Permanent: not found (404), auth failures (401/403), invalid URL, spec too large
  2. Retry temporary errors automatically

    • Without requiring spec changes
    • With exponential backoff between attempts
    • Limited to prevent infinite retries
  3. Stop retrying after limit reached

    • Either by number of attempts (e.g., 5 retries)
    • Or by time window (e.g., retry for up to 1 hour)
    • After limit, treat as permanent failure
  4. Persist retry state in status

    • Users should see retry progress in conditions or status fields
    • Example: "FetchFailed (attempt 3/5)" or "last attempted 2 minutes ago"
  5. Reset retry state on:

    • Successful fetch
    • Spec change (generation update)
  6. Never retry permanent errors

    • Keep existing cached error behavior for these

Acceptance Criteria

  • Temporary errors retry without manual intervention
  • Retries use exponential backoff
  • Retries stop after reaching limit
  • Permanent errors don't retry
  • Retry state is visible to users
  • Tests verify temporary vs permanent error handling
主要言語
Go
スター
3
フォーク
15
平均マージ
1日 21時間
マージ済み PR(30日)
4

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Kuadrant/developer-portal-controller のほかの issue

Kuadrant/developer-portal-controller の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。