1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Updated Design: Version Control (markdown)

Nick O'Leary 2016-07-13 13:32:56 +01:00
parent 9e918210b5
commit ec2de7b953

@ -19,59 +19,9 @@ This raises some questions:
Use cases include: Use cases include:
- a user creates a new version of the flows by simply clicking deploy - a user creates a new version of the flows by simply clicking deploy
```
[v1]
^
Deploy new version:
[v1]-----[v2]
^
```
- a user can _optionally_ add a comment to the version - a user can _optionally_ add a comment to the version
```
[v1]-----[v2:My New Flows]
^
```
- a user can see a history of versions - showing date/time + comment (aka `git log`) - a user can see a history of versions - showing date/time + comment (aka `git log`)
- a user can load a previous version into the editor, which, if then deployed becomes a new version
```
[v1]-----[v2]-----[v3]-----[v4]
^
```
- a user can revert to a previous version (aka, `git checkout <commit>`)
```
[v1]-----[v2]-----[v3]-----[v4]
^
Revert to v2
[v1]-----[v2]-----[v3]-----[v4]
^
```
- having reverted, a user can restore a future version (aka, `git checkout <commit>`)
```
[v1]-----[v2]-----[v3]-----[v4]
^
Revert to v4
[v1]-----[v2]-----[v3]-----[v4]
^
```
- having reverted, by clicking deploy, the user can either chose to either erase the future versions, or add the new version at the end of the 'chain':
```
[v1]-----[v2]-----[v3]-----[v4]
^
Erase future:
[v1]-----[v2]
\------[v5]
^
Append:
[v1]-----[v2]-----[v3]-----[v4]-----[v5]
^
```
## API ## API
@ -80,9 +30,9 @@ Whilst clearly influenced by git as a likely common backend, the version control
The basic operations are: The basic operations are:
- get a version - defaults to the most recent version, but a version id can also be specified
- save a new version of flows/credentials with an optional description. This returns a version id. - save a new version of flows/credentials with an optional description. This returns a version id.
- get the latest version - defaults to the most recent version, but a version id can also be specified - get the version history - returns a list of id/user/timestamp/description
- get the version history - returns a list of id/timestamp/describtions
- revert to a given version
The API should also allow a 'user' identified to passed to each of these calls.