cdap icon indicating copy to clipboard operation
cdap copied to clipboard

Deployment logic for edit flow

Open sanjanasandeep opened this issue 2 years ago • 1 comments

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
  1. Additional optional fields to the request body:
"changeSummary": {
      "description": "..."
  },
  "parentVersion": "..."
  1. If the parent version in the request of the app doesn’t match the current latest version, deployment is rejected.
  2. The change-summary, creation time, author and latest is written to the table during deployment
  3. [TEMPORARY CHANGE]The latest version of the app is retrieved by scanning the table for all app versions.
  4. 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]:

  1. Unit tests to be added.
  2. BLOCKING on https://cdap.atlassian.net/browse/CDAP-19427 : Creation time and owner are written to Appmetadata store
  3. 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.
  4. 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.

sanjanasandeep avatar Aug 21 '22 22:08 sanjanasandeep

gitpod-io[bot] avatar Aug 21 '22 22:08 gitpod-io[bot]