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/12/15 19:28:29 UTC

[GitHub] [openwhisk-runtime-dotnet] rabbah opened a new issue #43: support init time parameters

rabbah opened a new issue #43:
URL: https://github.com/apache/openwhisk-runtime-dotnet/issues/43


   At some point in the past we added support in OpenWhisk for init time parameters (these are “env” vars). See   https://github.com/apache/openwhisk/blob/4babe39fd2dbcc900ccedb5a5e9561d301361205/tests/src/test/scala/actionContainers/BasicActionRunnerTests.scala#L125 
   
   For backward compatibility, runtimes weren’t required to implement this. The .net 3.1 runtime doesn’t override the required function so that behavior is skipped https://github.com/apache/openwhisk-runtime-dotnet/blob/master/tests/src/test/scala/actionContainers/DotNet3_1ActionContainerTests.scala 
   
   We should add this support to the 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



[GitHub] [openwhisk-runtime-dotnet] rabbah edited a comment on issue #43: support init time parameters

Posted by GitBox <gi...@apache.org>.
rabbah edited a comment on issue #43:
URL: https://github.com/apache/openwhisk-runtime-dotnet/issues/43#issuecomment-745524261


   Chatting with @shawnallen85 he suggested a patch in `proxy/Apache.OpenWhisk.Runtime.Common/Init.cs` around line 73.
   
   ```
                   if (message["env"] != null)
                   {
                       Dictionary<string, string> dictEnv = message["env"].ToObject<Dictionary<string, string>>();
                       foreach(var key in dictEnv) {
                          System.Envrionment.SetEnvironmentVariable(key, dictEnv[key]);
                       }
                   }
   ```
   
   ~~The current `__OW_` context variables are set at runtime:~~
   https://github.com/apache/openwhisk-runtime-dotnet/blob/66449cb972a547825b8ca40c4159bf933097edd6/core/dotnet3.1/proxy/Apache.OpenWhisk.Runtime.Common/Run.cs#L67 
   ~~which may require some adaptation as well.~~
   
   EDIT: I don't think we'll need to adapt the runtime export.


----------------------------------------------------------------
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



[GitHub] [openwhisk-runtime-dotnet] rabbah commented on issue #43: support init time parameters

Posted by GitBox <gi...@apache.org>.
rabbah commented on issue #43:
URL: https://github.com/apache/openwhisk-runtime-dotnet/issues/43#issuecomment-745524261


   Chatting with @shawnallen85 he suggested a patch in `proxy/Apache.OpenWhisk.Runtime.Common/Init.cs` around line 73.
   
   ```
                   if (message["env"] != null)
                   {
                       Dictionary<string, string> dictEnv = message["env"].ToObject<Dictionary<string, string>>();
                       foreach(var key in dictEnv) {
                          System.Envrionment.SetEnvironmentVariable(key, dictEnv[key]);
                       }
                   }
   ```
   
   The current `__OW_` context variables are set at runtime, see https://github.com/apache/openwhisk-runtime-dotnet/blob/66449cb972a547825b8ca40c4159bf933097edd6/core/dotnet3.1/proxy/Apache.OpenWhisk.Runtime.Common/Run.cs#L67 which may require some adaptation as well.


----------------------------------------------------------------
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



[GitHub] [openwhisk-runtime-dotnet] rabbah edited a comment on issue #43: support init time parameters

Posted by GitBox <gi...@apache.org>.
rabbah edited a comment on issue #43:
URL: https://github.com/apache/openwhisk-runtime-dotnet/issues/43#issuecomment-745524261


   Chatting with @shawnallen85 he suggested a patch in `proxy/Apache.OpenWhisk.Runtime.Common/Init.cs` around line 73.
   
   ```
                   if (message["env"] != null)
                   {
                       Dictionary<string, string> dictEnv = message["env"].ToObject<Dictionary<string, string>>();
                       foreach(var key in dictEnv) {
                          System.Envrionment.SetEnvironmentVariable(key, dictEnv[key]);
                       }
                   }
   ```
   
   ~~The current `__OW_` context variables are set at runtime, see https://github.com/apache/openwhisk-runtime-dotnet/blob/66449cb972a547825b8ca40c4159bf933097edd6/core/dotnet3.1/proxy/Apache.OpenWhisk.Runtime.Common/Run.cs#L67 which may require some adaptation as well.~~
   
   EDIT: I don't think we'll need to adapt the runtime export.


----------------------------------------------------------------
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



[GitHub] [openwhisk-runtime-dotnet] shawnallen85 closed issue #43: support init time parameters

Posted by GitBox <gi...@apache.org>.
shawnallen85 closed issue #43:
URL: https://github.com/apache/openwhisk-runtime-dotnet/issues/43


   


----------------------------------------------------------------
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