Skip to content

Add reset button for maxed-out failed builds on versions page#548

Merged
frostebite merged 2 commits intomainfrom
feat/8192-docs-and-reset-button
Mar 27, 2026
Merged

Add reset button for maxed-out failed builds on versions page#548
frostebite merged 2 commits intomainfrom
feat/8192-docs-and-reset-button

Conversation

@frostebite
Copy link
Copy Markdown
Member

@frostebite frostebite commented Mar 26, 2026

Summary

  • Show failure count (e.g., ⚠ (15/15)) next to failed build status icons on the versions page so admins can identify stuck builds at a glance
  • Add admin-only reset button that calls the new resetFailedBuilds backend endpoint to clear inflated failure counts so the Ingeminator can retry them

Context

The old 500 error loop (fixed in versioning-backend#84) artificially inflated failureCount on many builds past the max of 15. These builds are permanently stuck. The reset button provides a code-based way to fix them without manual Firestore edits.

Depends on

Test plan

  • Failed builds with failureCount >= 15 show count display (e.g., ⚠ (15/15))
  • Admin users see the reset button next to maxed-out failed builds
  • Clicking reset button calls resetFailedBuilds endpoint and shows toast feedback
  • Non-admin users do not see the reset button

🤖 Generated with Claude Code

…uilds

- Add troubleshooting entry for the AWS ECS containerOverrides 8192-byte
  limit with explanation and secret-pulling workaround
- Show failure count (e.g. "15/15") next to failed build status icons
- Add admin-only reset button that calls resetFailedBuilds endpoint to
  clear inflated failure counts so the Ingeminator retries them

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@frostebite frostebite requested a review from webbertakken March 26, 2026 16:24
@github-actions
Copy link
Copy Markdown

Cat Gif

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

📝 Walkthrough

Walkthrough

The changes add failure count tracking to build status displays and introduce a reset mechanism for builds experiencing repeated failures (15+), along with documentation for an AWS ECS containerOverrides payload size limit.

Changes

Cohort / File(s) Summary
Documentation
docs/09-troubleshooting/common-issues.mdx
Added new troubleshooting section documenting the AWS ECS/Fargate 8192-byte limit on containerOverrides JSON payload and three mitigation strategies: using secretSource, shortening custom env var values, and reducing the number of workflow env variables.
Build Status UI
src/components/docs/versions/builds/build-row.tsx
Updated failed build-status rendering to conditionally display a failure count suffix (⚠ (count/15)) when failureCount ≥ 15 by reading from build.meta?.failureCount.
Build Reset Logic
src/components/docs/versions/docker-image-link-or-retry-button.tsx
Added optional meta.failureCount property to Record type; introduced local resetRequested state; added resetFailedBuilds endpoint hook; implemented separate onRetryClick and onResetClick handlers with notify.promise patterns; conditionally rendered reset button with restart icon when failureCount ≥ 15.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • webbertakken

Poem

🐰 Hoppy hops through builds with glee,
Counting failures, one, two, three!
When fifteen strikes, a reset blooms,
Fresh starts chase away the glooms!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the main changes: adding a reset button for failed builds that have reached the max failure count (15) on the versions page.
Description check ✅ Passed The description covers the main changes, provides context about the underlying issue, documents dependencies, and includes a test plan. All critical sections are present.

✏️ 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/8192-docs-and-reset-button

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 and usage tips.

frostebite added a commit that referenced this pull request Mar 26, 2026
…#548

The 8192 troubleshooting entry and build reset button UI changes are
now in a separate PR (#548) targeting main.

The orchestrator-specific docs (AWS provider troubleshooting section
and secrets tip callout) remain here since those files only exist on
this branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/components/docs/versions/docker-image-link-or-retry-button.tsx (1)

55-79: Guard retry/reset actions against duplicate in-flight submissions.

A fast double-click can fire concurrent POSTs before the prior request settles. Add an in-flight guard and disable the button while pending.

Suggested refactor
   const [retryRequested, setRetryRequested] = useState<boolean>(false);
   const [resetRequested, setResetRequested] = useState<boolean>(false);
+  const [retryPending, setRetryPending] = useState<boolean>(false);
+  const [resetPending, setResetPending] = useState<boolean>(false);
@@
   const onRetryClick = async () => {
+    if (retryPending) return;
+    setRetryPending(true);
     try {
       setRetryRequested(true);
       await notify.promise(retryBuild(), {
@@
     } catch {
       setRetryRequested(false);
+    } finally {
+      setRetryPending(false);
     }
   };
@@
   const onResetClick = async () => {
+    if (resetPending) return;
+    setResetPending(true);
     try {
       setResetRequested(true);
       await notify.promise(resetBuild(), {
@@
     } catch {
       setResetRequested(false);
+    } finally {
+      setResetPending(false);
     }
   };
@@
-        <button type="button" onClick={onRetryClick} style={buttonStyle}>
+        <button type="button" onClick={onRetryClick} style={buttonStyle} disabled={retryPending}>
@@
-          <button type="button" onClick={onResetClick} style={buttonStyle}>
+          <button type="button" onClick={onResetClick} style={buttonStyle} disabled={resetPending}>

Also applies to: 88-97

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/docs/versions/docker-image-link-or-retry-button.tsx` around
lines 55 - 79, The onRetryClick and onResetClick handlers (and corresponding UI
buttons) currently allow concurrent POSTs on fast double-click; add an in-flight
guard using the existing state (e.g., retryRequested and resetRequested) so each
handler returns early if already true, set the flag before calling
notify.promise and only clear it in the catch/finally as appropriate, and ensure
the Retry/Reset button props use the same flags to disable the button while the
request is pending; reference onRetryClick, onResetClick, retryBuild,
resetBuild, setRetryRequested, setResetRequested, retryRequested and
resetRequested when making these changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/09-troubleshooting/common-issues.mdx`:
- Around line 380-389: The YAML example for the game-ci/unity-builder@v4 action
incorrectly places the Orchestrator inputs pullInputList and secretSource under
env: instead of under with:, so move pullInputList and secretSource into the
with: block alongside providerStrategy, targetPlatform, and gitPrivateToken;
update the snippet that references game-ci/unity-builder@v4 to ensure with:
contains providerStrategy, pullInputList, secretSource, targetPlatform and
gitPrivateToken and remove those keys from env:.

In `@src/components/docs/versions/docker-image-link-or-retry-button.tsx`:
- Around line 88-98: The icon-only action buttons rendered with onRetryClick and
onResetClick lack accessible names; add explicit aria-label attributes to the
retry and reset buttons (the elements using HiOutlineRefresh and MdRestartAlt)
so screen readers announce them (e.g., aria-label={`Retry build${retryRequested
? ' requested' : ''}`} and aria-label={`Reset failures
(${failureCount})${resetRequested ? ' requested' : ''}`}), keeping the existing
onClick handlers and visual styling intact.

---

Nitpick comments:
In `@src/components/docs/versions/docker-image-link-or-retry-button.tsx`:
- Around line 55-79: The onRetryClick and onResetClick handlers (and
corresponding UI buttons) currently allow concurrent POSTs on fast double-click;
add an in-flight guard using the existing state (e.g., retryRequested and
resetRequested) so each handler returns early if already true, set the flag
before calling notify.promise and only clear it in the catch/finally as
appropriate, and ensure the Retry/Reset button props use the same flags to
disable the button while the request is pending; reference onRetryClick,
onResetClick, retryBuild, resetBuild, setRetryRequested, setResetRequested,
retryRequested and resetRequested when making these changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 789eb13f-8525-4ad5-8c9b-3a8eeecb598e

📥 Commits

Reviewing files that changed from the base of the PR and between 6e1e7ea and 7d47f44.

📒 Files selected for processing (3)
  • docs/09-troubleshooting/common-issues.mdx
  • src/components/docs/versions/builds/build-row.tsx
  • src/components/docs/versions/docker-image-link-or-retry-button.tsx

Comment on lines +380 to +389
```yaml
- uses: game-ci/unity-builder@v4
env:
pullInputList: UNITY_LICENSE,UNITY_SERIAL,UNITY_EMAIL,UNITY_PASSWORD
secretSource: aws-secrets-manager
with:
providerStrategy: aws
targetPlatform: StandaloneLinux64
gitPrivateToken: ${{ secrets.GITHUB_TOKEN }}
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

game-ci/unity-builder v4 documentation for pullInputList and secretSource parameters syntax

💡 Result:

game-ci/unity-builder v4 includes Orchestrator features for advanced builds. The parameters pullInputList and secretSource are Orchestrator-specific inputs defined in action.yml. pullInputList: '[Orchestrator] Extend game ci by specifying a command to execute to pull input from external source e.g cloud storage. The command is formatted to replace "{0}" with the parameter parameter name.' Syntax example from related CLI/docs: with: pullInputList: 'UNITY_EMAIL,UNITY_PASSWORD' secretSource: 'gcloud secrets versions access 1 --secret="{0}"' secretSource relates to secrets handling in postBuildSteps/preBuildSteps (yaml format with keys image, secrets (name, value object array), command line string), and AWS CloudFormation secrets (array with Name and ValueFrom). These are used when orchestratorMode is enabled (local, k8s, aws). No basic builder docs cover them; they are advanced/CLI/orchestrator features. Latest v4.8.1 (2025-11-22). For full inputs, see https://github.com/game-ci/unity-builder/blob/main/action.yml

Citations:


Move pullInputList and secretSource from env: to with: block.

The code example incorrectly places pullInputList and secretSource under the env: block. According to the game-ci/unity-builder action.yml, these are Orchestrator-specific action inputs that must be configured under the with: block. Update the YAML to:

- uses: game-ci/unity-builder@v4
  with:
    providerStrategy: aws
    pullInputList: UNITY_LICENSE,UNITY_SERIAL,UNITY_EMAIL,UNITY_PASSWORD
    secretSource: aws-secrets-manager
    targetPlatform: StandaloneLinux64
    gitPrivateToken: ${{ secrets.GITHUB_TOKEN }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/09-troubleshooting/common-issues.mdx` around lines 380 - 389, The YAML
example for the game-ci/unity-builder@v4 action incorrectly places the
Orchestrator inputs pullInputList and secretSource under env: instead of under
with:, so move pullInputList and secretSource into the with: block alongside
providerStrategy, targetPlatform, and gitPrivateToken; update the snippet that
references game-ci/unity-builder@v4 to ensure with: contains providerStrategy,
pullInputList, secretSource, targetPlatform and gitPrivateToken and remove those
keys from env:.

Comment on lines +88 to +98
<button type="button" onClick={onRetryClick} style={buttonStyle}>
<HiOutlineRefresh color={retryRequested ? 'orange' : 'red'} />
</button>
</Tooltip>
{isMaxedOut && (
<Tooltip
content={`Reset failure count (${failureCount}) so Ingeminator retries this build.`}
>
<button type="button" onClick={onResetClick} style={buttonStyle}>
<MdRestartAlt color={resetRequested ? 'orange' : '#b45309'} />
</button>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add accessible names to icon-only action buttons.

Both action buttons are icon-only, so screen readers get unnamed controls. Add explicit aria-labels.

Suggested fix
-        <button type="button" onClick={onRetryClick} style={buttonStyle}>
+        <button
+          type="button"
+          onClick={onRetryClick}
+          style={buttonStyle}
+          aria-label={`Retry build ${buildId}`}
+        >
           <HiOutlineRefresh color={retryRequested ? 'orange' : 'red'} />
         </button>
@@
-          <button type="button" onClick={onResetClick} style={buttonStyle}>
+          <button
+            type="button"
+            onClick={onResetClick}
+            style={buttonStyle}
+            aria-label={`Reset failure count for build ${buildId}`}
+          >
             <MdRestartAlt color={resetRequested ? 'orange' : '#b45309'} />
           </button>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<button type="button" onClick={onRetryClick} style={buttonStyle}>
<HiOutlineRefresh color={retryRequested ? 'orange' : 'red'} />
</button>
</Tooltip>
{isMaxedOut && (
<Tooltip
content={`Reset failure count (${failureCount}) so Ingeminator retries this build.`}
>
<button type="button" onClick={onResetClick} style={buttonStyle}>
<MdRestartAlt color={resetRequested ? 'orange' : '#b45309'} />
</button>
<button
type="button"
onClick={onRetryClick}
style={buttonStyle}
aria-label={`Retry build ${buildId}`}
>
<HiOutlineRefresh color={retryRequested ? 'orange' : 'red'} />
</button>
</Tooltip>
{isMaxedOut && (
<Tooltip
content={`Reset failure count (${failureCount}) so Ingeminator retries this build.`}
>
<button
type="button"
onClick={onResetClick}
style={buttonStyle}
aria-label={`Reset failure count for build ${buildId}`}
>
<MdRestartAlt color={resetRequested ? 'orange' : '#b45309'} />
</button>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/docs/versions/docker-image-link-or-retry-button.tsx` around
lines 88 - 98, The icon-only action buttons rendered with onRetryClick and
onResetClick lack accessible names; add explicit aria-label attributes to the
retry and reset buttons (the elements using HiOutlineRefresh and MdRestartAlt)
so screen readers announce them (e.g., aria-label={`Retry build${retryRequested
? ' requested' : ''}`} and aria-label={`Reset failures
(${failureCount})${resetRequested ? ' requested' : ''}`}), keeping the existing
onClick handlers and visual styling intact.

This PR now only contains the reset button UI changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@frostebite frostebite changed the title Add 8192 troubleshooting entry and reset button for maxed-out builds Add reset button for maxed-out failed builds on versions page Mar 26, 2026
@github-actions
Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 6750c86):

https://game-ci-5559f--pr548-feat-8192-docs-and-r-q719hc48.web.app

(expires Thu, 02 Apr 2026 16:37:04 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 1f0574f15f83e11bfc148eae8646486a6d0e078b

@frostebite frostebite merged commit c8eb279 into main Mar 27, 2026
9 checks passed
@frostebite frostebite deleted the feat/8192-docs-and-reset-button branch March 27, 2026 18:30
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.

2 participants