提交 b7ca1060 编写于 作者: R Rui Fu 提交者: Jia Zhai

set go function executable when download to local (#4743)

### Motivation

Currently golang function needs to be compiled before deploy to pulsar, so the executable permission is required when function package is downloaded to local node from bookkeeper. This PR is intent to make golang function package executable after download from bookkeeper, to make sure the function is ok to run.
(cherry picked from commit bf58c8eb)
上级 0646d274
......@@ -242,6 +242,11 @@ public class FunctionActioner {
} finally {
tempPkgFile.delete();
}
if(details.getRuntime() == Function.FunctionDetails.Runtime.GO && !pkgFile.canExecute()) {
pkgFile.setExecutable(true);
log.info("Golang function package file {} is set to executable", pkgFile);
}
}
private void cleanupFunctionFiles(FunctionRuntimeInfo functionRuntimeInfo) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册