Skip to content

Commit

Permalink
move dagster dev tests to core
Browse files Browse the repository at this point in the history
  • Loading branch information
smackesey committed Feb 10, 2025
1 parent b0402ca commit d3c450d
Show file tree
Hide file tree
Showing 12 changed files with 387 additions and 318 deletions.

This file was deleted.

This file was deleted.

13 changes: 8 additions & 5 deletions python_modules/dagster/dagster/_grpc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import multiprocessing
import os
import queue
import subprocess
import sys
import threading
import time
Expand Down Expand Up @@ -109,6 +110,8 @@
from multiprocessing.synchronize import Event as MPEvent
from subprocess import Popen

from dagster._grpc.client import DagsterGrpcClient

EVENT_QUEUE_POLL_INTERVAL = 0.1

CLEANUP_TICK = 0.5
Expand Down Expand Up @@ -1328,12 +1331,12 @@ def __init__(self, port=None, socket=None):


def wait_for_grpc_server(
server_process,
client,
subprocess_args,
timeout=60,
server_process: subprocess.Popen,
client: "DagsterGrpcClient",
subprocess_args: Sequence[str],
timeout: int = 60,
additional_timeout_msg: Optional[str] = None,
):
) -> None:
start_time = time.time()

last_error = None
Expand Down
8 changes: 8 additions & 0 deletions python_modules/dagster/dagster/_serdes/ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,14 @@ def interrupt_ipc_subprocess(proc: "Popen[Any]") -> None:
proc.send_signal(signal.SIGINT)


def interrupt_or_kill_ipc_subprocess(proc: "Popen[Any]", wait_time: int = 10) -> None:
interrupt_ipc_subprocess(proc)
try:
proc.wait(timeout=wait_time)
except subprocess.TimeoutExpired:
proc.kill()


def interrupt_ipc_subprocess_pid(pid: int) -> None:
"""Send CTRL_BREAK_EVENT on Windows, SIGINT on other platforms."""
check.int_param(pid, "pid")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from bar import foo_op # requires working_directory
from bar import foo_op # requires working_directory # type: ignore
from dagster import DefaultSensorStatus, RunRequest, job, repository, sensor


Expand Down
Loading

0 comments on commit d3c450d

Please sign in to comment.