Repository navigation
fix(webapp): hide and reject native (Git-based) deployments in self-hosted instances - #5064
khoap1220-hue wants to merge 1 commit into
Conversation
…oud build client availability Fixes triggerdotdev#4835
|
|
Caution Review failedThe pull request is closed. Finishing Touches
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. Comment |
|
Hi @khoap1220-hue, 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. |
| if (payload.isNativeBuild && !isBillingConfigured()) { | ||
| throw new ServiceValidationError( | ||
| "Native builds are not supported on self-hosted instances. Deploy with the CLI or GitHub Actions instead.", | ||
| 400 | ||
| ); | ||
| } |
There was a problem hiding this comment.
🟡 Self-hosted deployment fix lacks release note
When self-hosted users upgrade, isBillingConfigured() now blocks native builds without a server change note. They receive no release notice explaining the new deployment restriction.
Learn more
The repository requires a .server-changes/ entry for user-facing, server-only behavior changes. This change rejects native deployment requests on self-hosted instances and directs users to other deployment methods. Without an entry, that upgrade behavior is absent from the published release notes. The PR changes only webapp files, so a server change note is the required format.
Example: A self-hosted user upgrades and runs trigger deploy --native-build. The API now rejects the request, but the release notes do not warn them to switch deployment methods.
Recommended fix: Add a .server-changes/ Markdown file with area: webapp, type: fix, and a one-line user-facing description of the self-hosted native deployment change.
Was this helpful? React with 👍 or 👎 to provide feedback.
| export class GitHubSettingsPresenter extends BasePresenter { | ||
| public call({ projectId, organizationId }: GitHubSettingsOptions) { | ||
| const githubAppEnabled = env.GITHUB_APP_ENABLED === "1"; | ||
| const githubAppEnabled = env.GITHUB_APP_ENABLED === "1" && isBillingConfigured(); |
There was a problem hiding this comment.
🔍 Git settings section remains visible on self-hosted instances
With GITHUB_APP_ENABLED=1, the integrations page still renders Git settings through ProjectSettingsPresenter. The nested panel now renders nothing, leaving an empty section. Align the parent gate if the entire section must disappear.
Was this helpful? React with 👍 or 👎 to provide feedback.
| if (env.GITHUB_APP_ENABLED !== "1" || !isBillingConfigured()) { | ||
| return json( | ||
| { ok: false, error: "Native GitHub deployments are not available on self-hosted instances." }, | ||
| { status: 403 } | ||
| ); | ||
| } |
There was a problem hiding this comment.
🔍 Deploy-now endpoint retains its separate availability gate
The new GitHub action gate does not cover deploy-now. With onboarding enabled and an existing repository, that endpoint still reaches the platform trigger on self-hosted instances. Check whether it needs an explicit unavailable response.
Was this helpful? React with 👍 or 👎 to provide feedback.
…gConfigured and add server-change note Addresses all 3 Devin Review comments on triggerdotdev#5064 (Fixes triggerdotdev#4835).
Summary
Fixes #4835
Problem
Native (Git-based) deployments depend on the cloud build service via
BillingClient(isBillingConfigured()inapps/webapp/app/services/platform.v3.server.ts). In self-hosted instances where the platform build client is not configured:GitHubSettingsPresenteronly checkedenv.GITHUB_APP_ENABLED === "1", leaving the GitHub deployment UI accessible.enqueueBuildinapps/webapp/app/services/platform.v3.server.tssilently returnedundefinedwhen!client, causing native builds initialized on a self-hosted instance to stay inPENDINGforever.InitializeDeploymentServicedid not rejectisNativeBuildpayloads when!isBillingConfigured().Changes
GitHubSettingsPresenter.server.ts,DeploymentListPresenter.server.ts,resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.github.tsx): RequireisBillingConfigured()alongsideenv.GITHUB_APP_ENABLED === "1"so self-hosted instances do not offer native Git-based deployments or native redeploy actions.enqueueBuild(apps/webapp/app/services/platform.v3.server.ts): Thrownew Error("Platform client not configured")when!client(matchingcreatePrivateLink/deletePrivateLink), ensuring any unconfigured build enqueue fails immediately and cancels the deployment cleanly.apps/webapp/app/v3/services/initializeDeployment.server.ts): Throw aServiceValidationError(400) with a clear message whenpayload.isNativeBuild && !isBillingConfigured().