Skip to content

fix(cli): push localhost registry images in self-hosted local builds#3260

Closed
flowq-C wants to merge 1 commit intotriggerdotdev:mainfrom
flowq-C:fix/self-hosted-localhost-registry-push
Closed

fix(cli): push localhost registry images in self-hosted local builds#3260
flowq-C wants to merge 1 commit intotriggerdotdev:mainfrom
flowq-C:fix/self-hosted-localhost-registry-push

Conversation

@flowq-C
Copy link
Copy Markdown

@flowq-C flowq-C commented Mar 24, 2026

Summary

Self-hosted Trigger.dev installations commonly use a local registry such as localhost:5000.

The current shouldPush() behavior treats localhost-style image tags as non-push by default. In practice this can produce a deployment that appears complete while the supervisor later fails with No such image, because the image was never pushed to the local registry.

What changed

  • changed shouldPush() so local builds do not silently skip pushing localhost-tagged images

Why

  • self-hosted local registry setups still require a push step
  • skipping the push creates a broken deployment/runtime split

Real-world failure mode

  • deployment version is created
  • runtime later tries to start the container
  • supervisor fails with:
    • No such image: localhost:5000/...

Notes

  • this is specifically important for self-hosted local-registry setups
  • it avoids a misleading deployment success state when the runtime image is unavailable

Closes #3257

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 24, 2026

⚠️ No Changeset found

Latest commit: d21968e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

Hi @flowq-C, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions bot closed this Mar 24, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 24, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 89c2fa83-d98e-4cc7-a1fe-3f8f661a80a3

📥 Commits

Reviewing files that changed from the base of the PR and between 774007e and d21968e.

📒 Files selected for processing (1)
  • packages/cli-v3/src/deploy/buildImage.ts

Walkthrough

The shouldPush() function in the buildImage module was modified to change its default behavior. Previously, when the push parameter was undefined, the function suppressed pushing for local registry addresses (localhost, 127.0.0.1, 0.0.0.0). After the update, an undefined push parameter now always returns true, enabling push by default for all cases. Explicit true or false values for the push parameter continue to work as before. Supporting comments were also updated to document the new default behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@flowq-C
Copy link
Copy Markdown
Author

flowq-C commented Mar 24, 2026

Thanks for the quick signal.

We opened this PR while debugging multiple reproducible self-hosted deployment failures in a real Trigger.dev self-hosted setup.

Relevant linked issues:

This PR is meant as a minimal proposed fix, not a drive-by feature change.

If external PRs require a vouch first, the practical ask is:

  • either vouch the contributor so we can iterate normally
  • or cherry-pick / re-apply the patch internally if you agree with the fix direction

We are happy to adjust the patch, split it further, or add a changeset if needed once there is a path for contribution.

@flowq-C
Copy link
Copy Markdown
Author

flowq-C commented Mar 24, 2026

Follow-up from live validation on our self-hosted stack:

We have since validated the broader deployment path end-to-end against real self-hosted deployments.

This PR is still directionally correct, but the full local-registry problem turned out to have 3 layers:

  • localhost-style tags defaulting to push=false
  • buildkit not reliably reaching a local registry via localhost
  • insecure HTTP/auth handling when the effective registry endpoint differs from the original tag

So I would still consider this patch useful, but not sufficient by itself for every self-hosted local-registry topology.

For our stack, we only reached stable local deploys after fixing the full chain.

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.

self-hosted local registry deployments can succeed without pushing the image, leading to No such image at runtime

1 participant