Repository navigation
fix(webapp): hide and reject native (Git-based) deployments in self-hosted instances #5064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,7 @@ import { findEnvironmentBySlug } from "~/models/runtimeEnvironment.server"; | |
| import { env } from "~/env.server"; | ||
| import { GitHubSettingsPresenter } from "~/presenters/v3/GitHubSettingsPresenter.server"; | ||
| import { logger } from "~/services/logger.server"; | ||
| import { triggerInitialDeployment } from "~/services/platform.v3.server"; | ||
| import { isBillingConfigured, triggerInitialDeployment } from "~/services/platform.v3.server"; | ||
| import { marketplaceInitialDeploymentOptions } from "~/v3/services/marketplaceInitialDeploymentOptions.server"; | ||
| import { ProjectSettingsService } from "~/services/projectSettings.server"; | ||
| import { rbac } from "~/services/rbac.server"; | ||
|
|
@@ -241,6 +241,13 @@ export const action = dashboardAction( | |
| throw new Response("Not Found", { status: 404 }); | ||
| } | ||
|
|
||
| if (env.GITHUB_APP_ENABLED !== "1" || !isBillingConfigured()) { | ||
| return json( | ||
| { ok: false, error: "Native GitHub deployments are not available on self-hosted instances." }, | ||
| { status: 403 } | ||
| ); | ||
| } | ||
|
Comment on lines
+244
to
+249
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔍 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. |
||
|
|
||
| const formData = await request.formData(); | ||
| const submission = parseWithZod(formData, { schema: GitHubActionSchema }); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,7 @@ import { resolveDeployBaseImages } from "../deployBaseImages.server"; | |
| import { getDeploymentImageRef } from "../getDeploymentImageRef.server"; | ||
| import { tryCatch } from "@trigger.dev/core"; | ||
| import { getRegistryConfig } from "../registryConfig.server"; | ||
| import { isBillingConfigured } from "~/services/platform.v3.server"; | ||
| import { DeploymentService } from "./deployment.server"; | ||
| import { recordDeploymentInitialized } from "./recordDeploymentFinished.server"; | ||
| import { buildEnvVarsEnvelope } from "./initializeDeployment/buildEnvVarsEnvelope.server"; | ||
|
|
@@ -149,6 +150,13 @@ export class InitializeDeploymentService extends BaseService { | |
| throw new ServiceValidationError("UNMANAGED deployments are not supported"); | ||
| } | ||
|
|
||
| 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 | ||
| ); | ||
| } | ||
|
Comment on lines
+153
to
+158
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Self-hosted deployment fix lacks release note When self-hosted users upgrade, Learn moreThe repository requires a Example: A self-hosted user upgrades and runs Recommended fix: Add a Was this helpful? React with 👍 or 👎 to provide feedback. |
||
|
|
||
| const requiredBaseImages = resolveDeployBaseImages(runtime, { | ||
| base: env.DEPLOY_BASE_IMAGES, | ||
| buildBase: env.DEPLOY_BUILD_BASE_IMAGES, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 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.