nkconnor commented on issue #414: Syntax for referring to item versions URL: https://github.com/apache/incubator-openwhisk/issues/414#issuecomment-323412113 I'm looking at the possibility of implementing versioning and have tons of questions since this spans almost the entire project. Wondering if anybody has put more thought into this; and also if someone could comment on my questions below: **How should the API behave with versioned entities?** `PUT /api/v1/namespaces/guest/actions/helloWorld` 1. entity doesn't exist 2. create entity with version 0.0.1 && then `PUT /api/v1/namespaces/guest/actions/helloWorld` 1. entity exists 2. no version specified 3. mutate the latest version of the entity, or require a version to be specified? 4. what mutations should be allowed? e.g. allow annotation updates but not code updates I'd be inclined to think changes should be disallowed to a versioned document without specification of the version **How should we name && refer to versioned entities?** /api/v1/namespaces/_ns_/_entity_/_name_/_version_ `wsk action get /helloWorld/0.0.1` `wsk action get /guest/helloWorld` --> gets 0.0.2 I'm not amped to tackle package versioning at the moment, but wondering if versioning for it would work as so: | Fully qualified name | Alias | Namespace | Package | Name | Version | | --- | --- | --- | --- | --- | --- | | `/whisk.system/cloudant/0.0.5/read` | | `/whisk.system` | `cloudant` | `read` | 0.0.5 | `/myOrg/video/0.0.1/transcode` | `video/0.0.1/transcode/` | `/myOrg` | `video` | `transcode` | 0.0.1 | `/myOrg/video/0.0.2/transcode` | `video/transcode` | `/myOrg` | `video` | `transcode` | 0.0.2 **How to store versioned entities** I'm not very far into the codebase yet (and have little experience with CouchDB), but wonder if there is a clear "best" approach - keep the storage key as is and nest the versioned documents? guessing this is a bad approach. If we add version to the storage key, how do we do quick lookups in the case of "latest" or no version specified, like in `wsk action get /guest/helloWorld` --> gets 0.0.2 - can we just duplicate the document under both keys, `/guest/helloWorld/` and `/guest/helloWorld/0.0.2` - or maybe there is some secondary indexing available in the data store API? - something else? ---------------------------------------------------------------- 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: [email protected]
With regards, Apache Git Services
