Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes operations, resources_created, user_output fields from the Global Context and Template class #114

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

joshpalis
Copy link
Member

Description

Based on offline discussion, the State Index (issue #74 ) will be responsible for storing the resources_created and user_outputs field instead of the Global Context Index, and will be returned by the Status API upon the completion of a provision workflow. This PR modifies the Template class and Global Context Index mapping to reflect this.

Additionally, the operations field has been removed from the template/Global Context, as it is currently not used. (May add it back in once the Orchestrate API is exposed)

The following use case template is an example following the new format :

{
  "name": "deploy-register-model",
  "description": "test case",
  "use_case": "TEST_USE_CASE",
  "version": {
    "template": "1.0.0",
    "compatibility": [
      "2.12.0",
      "3.0.0"
    ]
  },
  "workflows": {
    "provision": {
      "nodes": [
        {
          "id": "workflow_step_1",
          "type": "register_model",
          "inputs": {
            "name": "openAI-gpt-3.5-turbo",
            "function_name": "remote",
            "description": "test model",
            "connector_id": "8SQESosBvqMC0I7jNGsk"
          }
        },
        {
          "id": "workflow_step_2",
          "type": "deploy_model",
          "inputs": {
            "model_id": "${workflow_step_1.model_id}"
          }
        }
      ],
      "edges": [
        {
          "source": "workflow_step_1",
          "dest": "workflow_step_2"
        }
      ]
    }
  }
}

Issues Resolved

A continuation of issue #105
Part of #88

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #114 (5152ad3) into main (23b2f15) will decrease coverage by 0.32%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main     #114      +/-   ##
============================================
- Coverage     80.55%   80.24%   -0.32%     
+ Complexity      262      250      -12     
============================================
  Files            30       30              
  Lines          1039      992      -47     
  Branches        103       95       -8     
============================================
- Hits            837      796      -41     
+ Misses          164      160       -4     
+ Partials         38       36       -2     
Files Coverage Δ
...a/org/opensearch/flowframework/model/Template.java 89.65% <100.00%> (+0.84%) ⬆️

Copy link
Member

@owaiskazi19 owaiskazi19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joshpalis joshpalis merged commit 6ee3d53 into opensearch-project:main Oct 25, 2023
23 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 25, 2023
…obal Context and Template class (#114)

Simplifying Template format, removing operations, resources created, user outputs

Signed-off-by: Joshua Palis <[email protected]>
(cherry picked from commit 6ee3d53)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
joshpalis pushed a commit that referenced this pull request Oct 25, 2023
…lds from the Global Context and Template class (#115)

Removes operations, resources_created, user_output fields from the Global Context and Template class (#114)

Simplifying Template format, removing operations, resources created, user outputs


(cherry picked from commit 6ee3d53)

Signed-off-by: Joshua Palis <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport PRs to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants