You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/01/15 18:14:31 UTC

[GitHub] [openwhisk-runtime-go] sciabarracom opened a new pull request #118: propagate openwhisk vars to the underlying process

sciabarracom opened a new pull request #118: propagate openwhisk vars to the underlying process
URL: https://github.com/apache/openwhisk-runtime-go/pull/118
 
 
   This change allows to propagate any variable starting with __OW_ to the underlying process (not just __OW_API_HOST). This fix is in conjunction to the ability to set variables in the standalone openwhisk to provide the informations to start and action under a debugger. This feature is going to be implemented first in the upcoming typescript runtime.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [openwhisk-runtime-go] sciabarracom commented on a change in pull request #118: propagate openwhisk vars to the underlying process

Posted by GitBox <gi...@apache.org>.
sciabarracom commented on a change in pull request #118: propagate openwhisk vars to the underlying process
URL: https://github.com/apache/openwhisk-runtime-go/pull/118#discussion_r367118683
 
 

 ##########
 File path: openwhisk/actionProxy.go
 ##########
 @@ -71,7 +72,14 @@ func NewActionProxy(baseDir string, compiler string, outFile *os.File, errFile *
 
 //SetEnv sets the environment
 func (ap *ActionProxy) SetEnv(env map[string]interface{}) {
-	ap.env["__OW_API_HOST"] = os.Getenv("__OW_API_HOST")
+	// propagate all the variables starting with "__OW_"
+	for _, v := range os.Environ() {
+		if strings.HasPrefix(v, "__OW_") {
 
 Review comment:
   Because for example in Kubernetes environment variables are used for service discovery and this way an action could read them and get access to some informations that it is better they do not see. I do not know how the KubernetesFactory created action exectors but I guessed it was better to be safe and only propagate enviroment variables somewhat "marked" to be exposed. Is it a reason good enough?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [openwhisk-runtime-go] rabbah merged pull request #118: propagate openwhisk vars to the underlying process

Posted by GitBox <gi...@apache.org>.
rabbah merged pull request #118: propagate openwhisk vars to the underlying process
URL: https://github.com/apache/openwhisk-runtime-go/pull/118
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [openwhisk-runtime-go] rabbah commented on a change in pull request #118: propagate openwhisk vars to the underlying process

Posted by GitBox <gi...@apache.org>.
rabbah commented on a change in pull request #118: propagate openwhisk vars to the underlying process
URL: https://github.com/apache/openwhisk-runtime-go/pull/118#discussion_r367056816
 
 

 ##########
 File path: openwhisk/actionProxy.go
 ##########
 @@ -71,7 +72,14 @@ func NewActionProxy(baseDir string, compiler string, outFile *os.File, errFile *
 
 //SetEnv sets the environment
 func (ap *ActionProxy) SetEnv(env map[string]interface{}) {
-	ap.env["__OW_API_HOST"] = os.Getenv("__OW_API_HOST")
+	// propagate all the variables starting with "__OW_"
+	for _, v := range os.Environ() {
+		if strings.HasPrefix(v, "__OW_") {
 
 Review comment:
   i guess why not re-export all env variables?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services