Skip to content

Preview Deployment limit check blocks updating existing previews #4074

@stevenkissack

Description

@stevenkissack

To Reproduce

  1. Configure an application with preview deployment limit set to 3
  2. Open 3 PRs that trigger preview deployments
  3. Push a commit to one of the open PRs
  4. The preview does not rebuild, the webhook delivery shows 200 in Github, but no build is queued
  5. Deleting an old preview deployment to get back under the limit restores rebuild behaviour

Current vs. Expected behavior

Expected
Pushing a commit to a PR with an existing preview deployment should rebuild that preview. The preview limit should only prevent new previews from being created.

Actual
The limit check in the webhook handler runs early & silently drops the update event, leaving the preview build stale

Provide environment information

Operating System: Ubuntu 24.04 LTS
Arch: amd64
Dokploy version: 0.28.7

What applications/services are you trying to deploy?
- Multiple React apps with GitHub App integration and label-based preview deployments

Which area(s) are affected? (Select all that apply)

Application

Are you deploying the applications where Dokploy is installed or on a remote server?

Same server where Dokploy is installed

Additional context

Secondary issues in the same check when researching the root cause

  • Preview limit defaults to 0 instead of the db schema default of 3
  • Limit comparison allows one extra preview beyond the limit

I've created a PR in my fork to show the fix, but I have yet to test this on my server so refrained from submitting upstream

Will you send a PR to fix it?

Maybe, need help

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions