cdap
cdap copied to clipboard
Deployment logic for edit flow
The changes to the following deploy endpoints are as follows:
PUT /apps/{app-id}
POST /apps/{app-id}/versions/{version-id}/create
POST /apps/{app-id}/update
POST /apps/{app-id}/upgrade
POST /upgrade
- Additional optional fields to the request body:
"changeSummary": {
"description": "..."
},
"parentVersion": "..."
- If the parent version in the request of the app doesn’t match the current latest version, deployment is rejected.
- The change-summary, creation time, author and latest is written to the table during deployment
- [TEMPORARY CHANGE]The latest version of the app is retrieved by scanning the table for all app versions.
- New version of the pipeline is created on deploy - version id is UUID. Version is identified by metadata: creation time and owner - both will be written to the table.
NOTE: TODO [These changes are complete and can be merged only when the following are addressed]:
- Unit tests to be added.
- BLOCKING on https://cdap.atlassian.net/browse/CDAP-19427 : Creation time and owner are written to Appmetadata store
- BLOCKING on https://cdap.atlassian.net/browse/CDAP-19427 latest field must be written to the table and the current latest value is updated- to make deployment transactional.
- BLOCKING on https://cdap.atlassian.net/browse/CDAP-19427 fetch the latest version by querying the index (on creation time) instead of scanning the entire table.