Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Serve] [runtime env] [Bug] Serve does not work with runtime env #18865

Closed
2 tasks done
architkulkarni opened this issue Sep 24, 2021 · 2 comments · Fixed by #18874
Closed
2 tasks done

[Serve] [runtime env] [Bug] Serve does not work with runtime env #18865

architkulkarni opened this issue Sep 24, 2021 · 2 comments · Fixed by #18874
Labels
bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component)

Comments

@architkulkarni
Copy link
Contributor

architkulkarni commented Sep 24, 2021

Search before asking

  • I searched the issues and found no similar issues.

Ray Component

Ray Serve

What happened + What you expected to happen

Hangs with error:

Traceback (most recent call last):
  File "/Users/archit/ray/python/ray/dashboard/modules/runtime_env/runtime_env_agent.py", line 141, in CreateRuntimeEnv
    serialized_env)
  File "/Users/archit/ray/python/ray/dashboard/modules/runtime_env/runtime_env_agent.py", line 104, in _setup_runtime_env
    return await loop.run_in_executor(None, run_setup_with_logger)
  File "/Users/archit/anaconda3/envs/ray-py36/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/archit/ray/python/ray/dashboard/modules/runtime_env/runtime_env_agent.py", line 97, in run_setup_with_logger
    for uri in runtime_env.get("uris", []):
TypeError: 'NoneType' object is not iterable

Reproduction script

import requests
from ray import serve
import requests

serve.start()


@serve.deployment
def requests_version(request):
    return requests.__version__


requests_version.options(
    ray_actor_options={
        "runtime_env": {
            "pip": ["ray[serve]", "requests==2.25.1"]
        }
    }).deploy()

print (requests.get("http://127.0.0.1:8000/requests_version").text)

Anything else

Happens on master and 1.7.0rc0, but works fine on 1.6.0

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@architkulkarni architkulkarni added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Sep 24, 2021
@architkulkarni
Copy link
Contributor Author

cc @simon-mo @edoakes should we cherry pick a fix for this?

@simon-mo
Copy link
Contributor

Looks like this can error with just generic runtime env with uris=None?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants