ningyougang commented on pull request #4986:
URL: https://github.com/apache/openwhisk/pull/4986#issuecomment-829740073


   Regarding 
   ```
   get docId for the given action'name and version parameter, if no version is 
specified, the latest "published" version will be choosed, and if version is 
provided, related version will be replaced in CouchDB, so users can update an 
action in place
   if there is a docId returned in step1, fetch action using that docId, and 
created a new action based on old action and user's input, save it to database
   if there is no docId, just created a new action based on user's input and 
save it
   ```
   Let's assme for exist hello action with 3 versions: `[email protected]` and 
`[email protected]`, and `[email protected]`,
    `[email protected]` and `[email protected]` are old action, `[email protected]` is the latest 
action,
   
   It seems user can update old action (e.g. `[email protected]` and `[email protected]`) 
when pass version parameter?
   
   For my understanding, for create/update, seems pass action name only is 
enough.
   * create
     -  If exist action in db, need to remind user that the action with latest 
version already exists
     -  If does't exist in db, create the action with init version
   * update
     - If exist action in db, create the action with `current verstion` + 1
     - if doesn't exist action in db, create the action with init version (this 
is same as create)


-- 
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:
[email protected]


Reply via email to