Skip to content

Fix CI/CD failures: Remove unused import and replace retry-action#3

Merged
acoyfellow merged 3 commits into
mainfrom
copilot/fix-import-issue-container-client
Jan 19, 2026
Merged

Fix CI/CD failures: Remove unused import and replace retry-action#3
acoyfellow merged 3 commits into
mainfrom
copilot/fix-import-issue-container-client

Conversation

Copilot AI commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

CI tests were failing due to two issues:

  1. Import Issue: src/container-client.ts had a top-level import of @cloudflare/containers, which attempts to resolve the cloudflare:workers runtime dependency even in test environments where it's unavailable.

  2. Workflow Issue: CI workflow used nick-fields/retry-action@v2 which GitHub couldn't resolve (repository not found), causing all workflow runs to fail immediately.

Changes

Container Client Fix

  • Removed unused top-level import { Container } from "@cloudflare/containers"
  • The Container type was never referenced in the file
  • Dynamic import on line 61 already handles production usage: const { getContainer, switchPort } = await import("@cloudflare/containers")

The dynamic import loads the module only when the production code path executes (Cloudflare Container binding), avoiding dependency resolution during test execution.

-import { Container } from "@cloudflare/containers";
-
 let _containerBinding: any = null;

CI Workflow Fix

  • Replaced all three usages of nick-fields/retry-action@v2 with native bash retry loops
  • Implemented retry logic using simple for loops with configurable MAX_ATTEMPTS and RETRY_DELAY
  • Applied to: PR health checks, staging health checks, and production health checks
  • No external dependencies required, more reliable and maintainable

The native bash implementation provides the same retry functionality with better logging and no dependency on third-party actions.

Original prompt

CI/CD tests fail due to an import issue in src/container-client.ts. Specifically, the module @cloudflare/containers conflicts during runtime tests with an unresolved dependency cloudflare:workers. This pull request aims to: (1) remove the unused top-level import from container-client.ts, (2) verify that all unit tests execute successfully locally, and (3) ensure that CI/CD pipelines pass consistently. Reference: https://github.com/acoyfellow/ralphwiggums/actions/runs/21136469459/job/60779569830#step:9:1

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…t.ts

Co-authored-by: acoyfellow <1666099+acoyfellow@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix import issue in src/container-client.ts Remove unused @cloudflare/containers import causing test failures Jan 19, 2026
Copilot AI requested a review from acoyfellow January 19, 2026 13:30
@acoyfellow

Copy link
Copy Markdown
Owner

@copilot can you see the errors? i'd like you to ffix them please

The CI workflow was failing because it used nick-fields/retry-action@v2, which GitHub cannot resolve.

Replaced all three usages with native bash retry loops that:
- Use simple for loops with configurable MAX_ATTEMPTS and RETRY_DELAY
- Provide clear logging of each attempt
- Sleep between retries with countdown
- Exit with proper status codes

This removes dependency on third-party actions and makes the workflow more reliable.

Co-authored-by: acoyfellow <1666099+acoyfellow@users.noreply.github.com>

Copilot AI commented Jan 19, 2026

Copy link
Copy Markdown
Contributor Author

@copilot can you see the errors? i'd like you to ffix them please

Fixed in commit 6f51ab9. The CI was failing because the workflow used nick-fields/retry-action@v2 which GitHub couldn't resolve (repository not found).

I replaced all three retry-action usages with native bash retry loops that are more reliable and don't depend on third-party actions. The new implementation:

  • Uses simple for loops with MAX_ATTEMPTS and RETRY_DELAY
  • Provides clear logging for each retry attempt
  • Exits with proper status codes

The workflow should now run successfully.

Copilot AI changed the title Remove unused @cloudflare/containers import causing test failures Fix CI/CD failures: Remove unused import and replace retry-action Jan 19, 2026
@github-actions

Copy link
Copy Markdown

Deployment Status

Stage: pr-3
Status: ❌ Failed
URL: https://pr-3.api.coey.dev


Ralph Loop completed

@acoyfellow acoyfellow merged commit 6f51ab9 into main Jan 19, 2026
9 of 11 checks passed
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