[runtime env] Can we avoid merging two runtime envs?
See original GitHub issueSearch before asking
- I had searched in the issues and found no similar feature requirement.
Description
In current design, the actor level runtime env can inherit job level runtime env, like: If the job level runtime env is:
{
"py_modules": "s3://ab.zip",
"pip": ["requests", "pendulum==2.1.2"],
"env_vars":{
"a":"b",
}
}
and if the actor level runtime env is:
{
"py_modules": "s3://cd.zip",
"env_vars":{
"c":"d",
}
}
The final merged runtime env for actor is:
{
"py_modules": "s3://cd.zip",
"pip": ["requests", "pendulum==2.1.2"],
"env_vars":{
"a":"b",
"c":"d",
}
}
More details we can see https://github.com/ray-project/ray/blob/master/src/ray/core_worker/core_worker.cc#L1355 and https://github.com/ray-project/ray/blob/master/src/ray/core_worker/test/core_worker_test.cc#L937.
Do we have some reasons to support this logic? I think this logic is not clear and brings some complexity. Can we make it easier? Like:
- If there is no runtime env option when we create actor, inherit the job level runtime env.
- Otherwise, use the actor runtime env directly and don’t do the merging.
- We also can give a new API to help users getting job level runtime env if needed.
Use case
No response
Related issues
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Issue Analytics
- State:
- Created 2 years ago
- Comments:21 (21 by maintainers)
Top Results From Across the Web
Environment Dependencies — Ray 2.2.0
Runtime environments can be used on top of the prepared environment from the Ray Cluster launcher if it was used. For example, you...
Read more >Handling runtime environment variables in create-react-apps
A new package called runtime-env-cra allows you to handle environment variables in quick and easy way with create-react-apps.
Read more >Passing environment-dependent variables in webpack
I think NODE_ENV can be used to configure for (1) at build time but how do we configure for (2) at deployment, e.g....
Read more >Environment variables in build environments - AWS CodeBuild
AWS CodeBuild provides several environment variables that you can use in your build commands: ... The identifier of the merge commit used for...
Read more >Environments and deployments - GitLab Docs
Introduced in GitLab 11.10. You can configure environments to stop when a merge request is merged or closed. This stop trigger is automatically...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also prefer to follow the proposed logic. It seems to be unstraightforward some values are inherited when runtime envs are given to actors (with the current style, it is hard to know what is the exact runtime env when reading code). Maybe we can alternatively do
? This seems a lot more explicit and less magic for user perspective.
But if we do that, we will change the behavior of current runtime env API. So, it makes sense to create the RRC.