falkzoll commented on a change in pull request #4627: Add descriptions how to 
update, remove or rename runtime kinds and language families
URL: https://github.com/apache/openwhisk/pull/4627#discussion_r325561251
 
 

 ##########
 File path: docs/actions-update.md
 ##########
 @@ -0,0 +1,75 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+## Updating Action Language Runtimes
+
+OpenWhisk supports [several languages and 
runtimes](actions.md#languages-and-runtimes) that can be made
+available for usage in an OpenWhisk deployment. This is done via the [runtimes 
manifest](actions-new.md#the-runtimes-manifest).
+
+Over time, you may have the need for change:
+
+* Update runtimes to address security issues - for example, the latest code 
level of Node.js 10.
+* Remove runtime versions that are no more supported - for example, Node.js 6.
+* Add more languages due to user demand.
+* Remove languages that are no more needed.
+
+While adding and updating languages and runtimes is pretty straightforward, 
removing or renaming languages and runtimes
+requires some caution to prevent problems with existing actions.
+
+### Updating runtimes
+
+Follow these steps to update a particular runtime kind:
+
+1. Update the runtimes' container image.
+2. Update the corresponding `image` property in the [runtimes 
manifest](actions-new.md#the-runtimes-manifest) to use the new container image.
+3. Restart / re-deploy controllers and invokers such that they pick up the 
changed runtimes manifest.
+
+Already existing actions of the changed runtime kind will immediately use the 
new container image when the invoker creates a new action container.
+
+Apparently, this approach should only be used if existing actions do not break 
with the new container image. If a new container image is supposed to break 
existing actions, introduce a new runtime kind.
+
+### Removing runtimes
+
+Follow these steps to remove a particular runtime kind under the assumption 
that actions with the runtime kind exist in the system. Apparently, it makes 
sense to wait some time between accomplishing these steps to give action owners 
time to react.
+
+1. Deprecate the runtime kind by setting `"deprecated": true` in the [runtimes 
manifest](actions-new.md#the-runtimes-manifest). This setting prevents that new 
actions can be created with the deprecated action kind. In addition, existing 
actions cannot be changed to the deprecated action kind any more.
+2. Ask owners of existing actions with runtime kind to be removed to update 
their actions to a different action kind.
+3. Create an automated process that identifies all actions with the runtime 
kind to be removed in the system's action artifact store. Either automatically 
remove these actions or change to a different runtime kind.
+4. Once the system's action artifact store does no more contain actions with 
the runtime kind to be removed, remove the runtime kind from the [runtimes 
manifest](actions-new.md#the-runtimes-manifest).
+5. TODO - is this correct?: Remove the runtime kind from the list of known 
kinds in the `ActionExec` object of the [controller API's Swagger 
definition](../core/controller/src/main/resources/apiv1swagger.json).
 
 Review comment:
   I would support to remove this enum from the swagger documentation and 
having a pointer to the REST endpoint instead. 
   We may think about mentioning two or three samples of stable/longer time 
supported runtimes, e.g. nodejs:12, nodejs:default, python:3 in this 
description, just that users get a feeling how the values can look like, but do 
not specify the whole list.
   
   I have not seen unit tests, that rely on this swagger enum, yet, but in case 
they exist, I would prefer that we change them to query the REST endpoint, 
instead of querying the info from the swagger documentation.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to