Skip to content

fix: replace deprecated testcontainers log waits#36125

Merged
asukaminato0721 merged 1 commit into
langgenius:mainfrom
KurodaKayn:fix/testcontainers-log-wait-strategy
May 15, 2026
Merged

fix: replace deprecated testcontainers log waits#36125
asukaminato0721 merged 1 commit into
langgenius:mainfrom
KurodaKayn:fix/testcontainers-log-wait-strategy

Conversation

@KurodaKayn
Copy link
Copy Markdown
Contributor

Summary

Fixes #35893

This PR replaces deprecated wait_for_logs usage in Testcontainers-based integration test setup with structured LogMessageWaitStrategy readiness checks.

The readiness checks are now configured on each container before startup for PostgreSQL, Redis, Dify Sandbox, and Dify Plugin Daemon. This removes the DeprecationWarning while preserving the same startup log checks and timeout behavior.

From Codex

Screenshots

Before After
N/A N/A

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. refactor labels May 13, 2026
@asukaminato0721 asukaminato0721 enabled auto-merge May 13, 2026 14:57
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-05-13 14:58:17.769703506 +0000
+++ /tmp/pyrefly_pr.txt	2026-05-13 14:58:08.237657606 +0000
@@ -633,7 +633,7 @@
 ERROR Argument `_SimpleJinja2Renderer` is not assignable to parameter `jinja2_template_renderer` with type `Jinja2TemplateRenderer` in function `graphon.nodes.template_transform.template_transform_node.TemplateTransformNode.__init__` [bad-argument-type]
   --> tests/integration_tests/workflow/nodes/test_template_transform.py:94:34
 ERROR `dict[str, str | None]` is not assignable to attribute `env` with type `dict[str, str]` [bad-assignment]
-   --> tests/test_containers_integration_tests/conftest.py:204:39
+   --> tests/test_containers_integration_tests/conftest.py:203:39
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
    --> tests/test_containers_integration_tests/controllers/console/app/test_app_apis.py:663:51
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 0.00% 43.70% +43.70%
Strict coverage 0.00% 43.22% +43.22%
Typed symbols 0 22,021 +22,021
Untyped symbols 0 28,684 +28,684
Modules 0 2551 +2,551

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Replaces deprecated wait_for_logs calls with structured LogMessageWaitStrategy readiness checks attached via waiting_for(...) before each container's start().

Changes:

  • Import LogMessageWaitStrategy instead of wait_for_logs.
  • Add _wait_for_log_message helper applying message + startup timeout.
  • Configure wait strategies on Postgres, Redis, Dify Sandbox, and Dify Plugin Daemon containers prior to start.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@asukaminato0721 asukaminato0721 added this pull request to the merge queue May 15, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 15, 2026
Merged via the queue into langgenius:main with commit 7654f14 May 15, 2026
31 checks passed
zhangtaodemama added a commit to zhangtaodemama/langgenius-dify-bfaadcb0c706 that referenced this pull request May 15, 2026
@KurodaKayn KurodaKayn deleted the fix/testcontainers-log-wait-strategy branch May 15, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer refactor size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

3 participants