Skip to content

Added a custom context for /Submit (GONRG-623)

Riabokon Stanislav(EPAM)[GCP] requested to merge add-custom-context into master

Description:

Different parsers would need specific parsers context. In this change we added Context object in /Submit request to execution context of the DAG:

Ingestion Service RQ:

curl --location --request POST '<ingestion-service>/submit' \
--header 'Data-Partition-Id: osdu' \
--data-raw '{
    "FileID": "a98eaf300d6d402989a713b5d19ffe16",
    "DataType": "energistics_xml",
    "Context": {
        "a": 1,
        "b": 2,
        "kind-version": "1.0.0"
    }
}'

DAG Run Context:

{
  "AppKey": "test",
  "WorkflowID": "9a13a68b-0ccc-4142-b4b1-81fe113a3dc1",
  "authorization": "Bearer ...",
  "data": {
    "Context": {
      "a": 1,
      "b": 2,
      "kind-version": "0.3.0"
    },
    "DataType": "energistics_xml",
    "FileID": "a98eaf300d6d402989a713b5d19ffe16"
  },
  "data-partition-id": "osdu"
}

How to test:

Tested manually on GCP Dev

Changes include:

  • Refactor (a non-breaking change that improves code maintainability).
  • Bugfix (a non-breaking change that solves an issue).
  • New feature (a non-breaking change that adds functionality).
  • Breaking change (a change that is not backward-compatible and/or changes current functionality).

Changes in:

  • GCP
  • Azure
  • AWS
  • IBM

Dev Checklist:

  • Added Unit Tests, wherever applicable.
  • Updated the Readme, if applicable.
  • Existing Tests pass
  • Verified functionality locally
  • Self Reviewed my code for formatting and complex business logic.

Other comments:

Any comments to approvers here

Edited by Dmitriy Rudko

Merge request reports

Loading