You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting a dagster dev env from daemon / dev cli with --python-file repository is raising an error.
When no port or socket are specific we receive this error
class DagsterGrpcServer:
def __init__(
self,
server_termination_event: threading.Event,
dagster_api_servicer: DagsterApiServicer,
host="localhost",
port: Optional[int] = None,
socket: Optional[str] = None,
max_workers: Optional[int] = None,
):
check.invariant(
port is not None if seven.IS_WINDOWS else True,
"You must pass a valid `port` on Windows: `socket` not supported.",
)
check.invariant(
(port or socket) and not (port and socket),
"You must pass one and only one of `port` or `socket`.",
)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Users/yuvalgrinberg/envs/dagster-landing-service/lib/python3.10/site-packages/dagster/__main__.py", line 3, in <module>
main()
File "/Users/yuvalgrinberg/envs/dagster-landing-service/lib/python3.10/site-packages/dagster/_cli/__init__.py", line 48, in main
cli(auto_envvar_prefix=ENV_PREFIX) # pylint:disable=E1123
File "/Users/yuvalgrinberg/envs/dagster-landing-service/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/Users/yuvalgrinberg/envs/dagster-landing-service/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/yuvalgrinberg/envs/dagster-landing-service/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/yuvalgrinberg/envs/dagster-landing-service/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/yuvalgrinberg/envs/dagster-landing-service/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/yuvalgrinberg/envs/dagster-landing-service/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/yuvalgrinberg/envs/dagster-landing-service/lib/python3.10/site-packages/dagster/_cli/api.py", line 688, in grpc_command
server = DagsterGrpcServer(
File "/Users/yuvalgrinberg/envs/dagster-landing-service/lib/python3.10/site-packages/dagster/_grpc/server.py", line 947, in __init__
check.invariant(
File "/Users/yuvalgrinberg/envs/dagster-landing-service/lib/python3.10/site-packages/dagster/_check/__init__.py", line 1589, in invariant
raise CheckError(f"Invariant failed. Description: {desc}")
dagster._check.CheckError: Invariant failed. Description: You must pass one and only one of `port` or `socket`.
And if we try to provide the port, we get the following error:
Usage: python -m dagster._daemon run [OPTIONS]
Try 'python -m dagster._daemon run --help' for help.
Error: Invalid set of CLI arguments for loading repository/job. See --help for details.
What did you expect to happen?
To be able to run a dagster local env while loading the repository from the --python-file
How to reproduce?
dagster-daemon run --python-file PATH_TO_REPO_FILE --grpc-port 3000
dagster-daemon run --python-file PATH_TO_REPO_FILE
Deployment type
Local
Deployment details
No response
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
The text was updated successfully, but these errors were encountered:
Starting a dagster dev env from daemon / dev cli with --python-file repository is raising an error.
When no port or socket are specific we receive this error
What CLI command did you run here exactly? dagster dev --python-file ... should work just fine.
dagster-daemon run --python-file PATH_TO_REPO_FILE --grpc-port 3000
The --python-file and --grpc-port flags are conflicting. --python-file instructs the daemon to boot a grpc code server for the code located at the target directory. --grpc-port instructs the daemon to connect to an existing grpc code server via the specified port.
This turned out to be DAGSTER_GRPC_PORT being set in a .env file - it was getting picked up as a click arg while also being passed a socket from the parent process
Dagster version
1.4.7
What's the issue?
Starting a dagster dev env from daemon / dev cli with --python-file repository is raising an error.
When no port or socket are specific we receive this error
And if we try to provide the port, we get the following error:
What did you expect to happen?
To be able to run a dagster local env while loading the repository from the --python-file
How to reproduce?
dagster-daemon run --python-file PATH_TO_REPO_FILE --grpc-port 3000
dagster-daemon run --python-file PATH_TO_REPO_FILE
Deployment type
Local
Deployment details
No response
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
The text was updated successfully, but these errors were encountered: