[hotfix] Fix the failure of java test (#27183)

Signed-off-by: 久龙 <guyang.sgy@antfin.com>
This commit is contained in:
Guyang Song 2022-07-29 00:15:41 +08:00 committed by GitHub
parent c624d04842
commit 79fb4a9821
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -217,8 +217,12 @@ public class RayConfig {
jarUrls = config.getStringList(jarsPath);
}
runtimeEnvImpl = new RuntimeEnvImpl();
runtimeEnvImpl.set(RuntimeEnvName.ENV_VARS, envVars);
runtimeEnvImpl.set(RuntimeEnvName.JARS, jarUrls);
if (!envVars.isEmpty()) {
runtimeEnvImpl.set(RuntimeEnvName.ENV_VARS, envVars);
}
if (!jarUrls.isEmpty()) {
runtimeEnvImpl.set(RuntimeEnvName.JARS, jarUrls);
}
}
{

View file

@ -63,6 +63,8 @@ class JavaJarsPlugin(RuntimeEnvPlugin):
context: RuntimeEnvContext,
logger: Optional[logging.Logger] = default_logger,
) -> int:
if not uri:
return 0
if is_jar_uri(uri):
module_dir = await self._download_jars(uri=uri, logger=logger)
else: