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 2018/10/09 02:50:03 UTC

[GitHub] ningyougang commented on a change in pull request #4058: Add protect feature to avoid delete actions by mistake

ningyougang commented on a change in pull request #4058: Add protect feature to avoid delete actions by mistake
URL: https://github.com/apache/incubator-openwhisk/pull/4058#discussion_r223547613
 
 

 ##########
 File path: core/controller/src/main/scala/whisk/core/controller/Actions.scala
 ##########
 @@ -412,7 +432,9 @@ trait WhiskActionsApi extends WhiskCollectionAPI with PostActionActivation with
       limits,
       content.version getOrElse SemVer(),
       content.publish getOrElse false,
-      (content.annotations getOrElse Parameters()) ++ execAnnotation(exec))
+      (content.annotations getOrElse Parameters()) ++ execAnnotation(exec) ++ Parameters(
+        "protection",
+        if (protection) "true" else "false"))
 
 Review comment:
   @cbickel ,it seems if save it to annotations, the key/value supports `string` only,
   if want to save `protection` as Boolean, should modify `WhiskAction class` to add a `protection` field.
   It seems the amount of code changes is relatively large, so balanced, i added the   `protection`  to `annotations`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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