Skip to content

test: fix CI failures and improve test robustness - #5271

Merged
narcisonunez merged 2 commits into
Dokploy:canaryfrom
imrja8:fix/ci-docker-tests
Sep 2, 2026
Merged

narcisonunez merged 2 commits into
Dokploy:canaryfrom
imrja8:fix/ci-docker-tests

Conversation

@imrja8

@imrja8 imrja8 commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator

This PR addresses two separate testing issues that are currently causing friction in canary:

  1. Fix fatal CI failure in application.real.test.ts (Regression from fix/docker-context-path-default: Placeholder with name attribute "doc… #5231)
    The recent change in getDockerContextPath forced a fallback to . instead of returning null. This broke docker-file.ts, which relied on the null return to accurately infer the defaultContextPath from the Dockerfile's parent directory. Because of this, Docker builds in the test suite started failing in CI as they were given an invalid context path. This restores the null return and the correct fallback logic.

  2. Fix ENOENT /var/run/docker.sock crashes for local contributors (fix(monitoring): remove legacy container and default empty cronJob #5141, fix: preserve ${VAR} interpolation in .env values #5197)
    Tests like monitoring-setup.real.test.ts and env-file-literals.test.ts require a running Docker daemon. When contributors (especially those on macOS using Colima/Orbstack or without Docker running) run pnpm test locally, the entire test suite crashes with socket errors. I've added a simple hasDocker() check so these tests gracefully skip locally instead of crashing, while still running properly in CI.

Greptile Summary

This PR restores Dockerfile build-context fallback behavior and makes Docker-dependent tests skip when their required local daemon is unavailable.

  • Derives the default Docker build context from the Dockerfile’s parent directory when no explicit context is configured.
  • Restores null from getDockerContextPath for an omitted context.
  • Adds Docker availability guards to Compose and monitoring integration tests.
  • Restricts the destructive monitoring integration suite to CI and hosts without an existing monitoring resource.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or non-blocking defects identified.

The Docker builder once again distinguishes an omitted context from an explicitly configured one, while the integration-test guards prevent unavailable local Docker daemons from crashing the suite without weakening the configured CI path.

Reviews (1): Last reviewed commit: "test: fix CI failures and improve local ..." | Re-trigger Greptile

Context used:

@imrja8
imrja8 requested a review from Siumauricio as a code owner September 2, 2026 11:34
@narcisonunez
narcisonunez merged commit 261ebb2 into Dokploy:canary Sep 2, 2026
4 checks passed
@imrja8
imrja8 deleted the fix/ci-docker-tests branch September 2, 2026 11:54
@mitc-gjuge mitc-gjuge mentioned this pull request Sep 3, 2026
3 tasks done
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