Skip to content

feat: リトライ回数・間隔を input 化(FR-4)#51

Merged
yk-lab merged 4 commits into
mainfrom
feat/retry-inputs
Jun 24, 2026
Merged

feat: リトライ回数・間隔を input 化(FR-4)#51
yk-lab merged 4 commits into
mainfrom
feat/retry-inputs

Conversation

@yk-lab

@yk-lab yk-lab commented Jun 22, 2026

Copy link
Copy Markdown
Owner

概要

要求仕様書 FR-4 に対応。retries / retry-base-msaction.yml の input として追加し、ネットワークリトライを調整可能にする。

変更内容

  • action.yml
    • retries input(任意、既定値 3
    • retry-base-ms input(任意、既定値 1000
  • src/inputs.ts(新規)
    • 非負整数 input パーサー
    • 空文字 / 無効値時は警告を出して既定値に fallback
  • src/main.ts
    • withRetry 呼び出し(version 解決、download、checksum fetch)で input 値を使用
  • tests/inputs.test.ts(新規)
    • パーサーのユニットテスト

使用例

- uses: yk-lab/setup-task@v1
  with:
    version: 3.x
    retries: 5
    retry-base-ms: 500

検証

  • pnpm run all
  • テスト追加: 50 tests passed

参照


Summary by cubic

Make network retry behavior configurable with new retries and retry-base-ms inputs (FR-4). Also add a job summary with install details (NFR-5) and harden CI gates to fail on cancelled or failed upstream jobs.

  • New Features

    • Added retries (default 3) and retry-base-ms (default 1000 ms) inputs in action.yml; applied to version resolve, download, and checksum fetch.
    • Added a non-negative integer parser with warnings and defaults.
    • Emit a job summary table with Version, Asset, Source, Cache, Checksum, and Executable; checksum shows n/a on cache hit, skipped when disabled, or verified (SHA256); summary write is awaited and guarded so errors don’t fail the action.
  • Bug Fixes

    • CI bridge jobs now detect and fail on failure/cancelled states for upstream jobs; added pull-requests: read for dorny/paths-filter.

Written for commit 5529777. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 16fd6edc-db60-4e55-ba04-b911c81ee4f9

📥 Commits

Reviewing files that changed from the base of the PR and between ae38e27 and 5529777.

⛔ Files ignored due to path filters (1)
  • action.yml is excluded by !**/*.yml
📒 Files selected for processing (6)
  • README.md
  • TODO.md
  • src/inputs.ts
  • src/main.ts
  • tests/inputs.test.ts
  • 要求仕様書.md
✅ Files skipped from review due to trivial changes (4)
  • README.md
  • tests/inputs.test.ts
  • 要求仕様書.md
  • TODO.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/inputs.ts
  • src/main.ts

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • retriesretry-base-ms の入力を追加し、リトライ回数と初期遅延を入力に応じて制御できるようになりました。
    • リトライ関連入力の妥当性を判定し、不正値は既定値にフォールバックします。
    • 実行結果のジョブサマリー出力を保護し、書き込み失敗でもアクション全体が停止しないようにしました。
  • Tests
    • 入力パースの挙動(正常系・異常系)を検証するテストを追加しました。
  • Documentation
    • 入力仕様を README および要求仕様書に反映しました。

Walkthrough

src/inputs.ts で retry 入力のパース処理を追加し、src/main.ts でその値を各 retry 処理に反映しました。実行後のジョブサマリー書き込みは失敗時に warning へ切り替えるよう変更されています。

Changes

リトライ入力とジョブサマリー

Layer / File(s) Summary
入力パースと仕様追記
src/inputs.ts, tests/inputs.test.ts, README.md, TODO.md, 要求仕様書.md
parseRetryInput を新規追加し、空入力・不正入力・非負整数入力を分岐する。入力仕様、README、issue 整理、関連テストも更新される。
main.ts の retry 設定反映
src/main.ts
retriesretry-base-ms を input から解析し、resolveVersiondownloadAssetfetchChecksumwithRetryretriesbaseMs を渡す。
summary 書き込みの保護
src/main.ts
core.summarywrite()try/catch で囲み、失敗時は core.warning に切り替えて処理を続行する。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 ぴょん、input をひとつずつ確かめて
0 以上ならそのまま進む
だめなら warning をひらりと出して
retry はふわっと既定値へ
summary も最後まで書き切るよ 🌿

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning FR-4 とは別に、src/main.ts で job summary 書き込み失敗の保護が追加されており、目的外の変更が含まれます。 job summary の耐障害化は別PRに分離するか、FR-4 に含める理由を明記してください。
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check ❓ Inconclusive 必須の action.yml は path filter(!**/*.yml)で除外されているため、retries / retry-base-ms の追加を検証できません。 action.yml の除外を外すか差分を共有し、input 追加と既定値を確認できるようにしてください。
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PRの主変更であるリトライ回数・間隔のinput化を簡潔に示しており、タイトルとして適切です。
Description check ✅ Passed Summary・関連issue・テスト相当の情報は揃っていますが、テンプレートの見出しやチェックリスト形式には一致していません。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/retry-inputs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 61.53846% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.15%. Comparing base (6835b52) to head (5529777).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/main.ts 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
+ Coverage   62.92%   63.15%   +0.23%     
==========================================
  Files           9       10       +1     
  Lines         178      190      +12     
  Branches       51       53       +2     
==========================================
+ Hits          112      120       +8     
- Misses         59       63       +4     
  Partials        7        7              
Files with missing lines Coverage Δ
src/inputs.ts 100.00% <100.00%> (ø)
src/main.ts 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 6 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/main.ts Outdated
@yk-lab yk-lab force-pushed the feat/retry-inputs branch from 4f0df8f to ae38e27 Compare June 22, 2026 23:52
yk-lab and others added 4 commits June 24, 2026 21:58
- core.summary にバージョン・アセット・取得元・cache・checksum・実行ファイルパスを表形式で記載

- cache hit 時は checksum を n/a、skip-checksum 時は skipped、通常時は verified と表示
- core.summary.write() returns a Promise; await it in the async run() function

- Rephrase the comment so it does not introduce an 8th step to the fixed 7-step pipeline
- action.yml: retries / retry-base-ms input を追加(既定値 3 / 1000)

- src/inputs.ts: 非負整数 input パーサーを追加。無効値時は警告して既定値に fallback

- src/main.ts: 全 withRetry 呼び出しで input 値を使用

- tests/inputs.test.ts: パーサーのユニットテストを追加
- README / 要求仕様書 §6.1 の inputs 表に 2 input を追記
- TODO.md: #40 を解決済み(#51)へ移動

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AECzAv2vcdATecuvLjBSa6
@yk-lab yk-lab force-pushed the feat/retry-inputs branch from ae38e27 to 5529777 Compare June 24, 2026 13:24
@yk-lab yk-lab merged commit c333892 into main Jun 24, 2026
19 checks passed
@yk-lab yk-lab deleted the feat/retry-inputs branch June 24, 2026 14:11
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.

[enhancement] リトライ回数・間隔を input 化(FR-4)

1 participant