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 user_inputs field from Template and Global Context Index mapping #111

Merged
merged 3 commits into from
Oct 25, 2023

Conversation

joshpalis
Copy link
Member

Description

This PR achieves the following :

  • Modifies Global Context Index Mapping to remove user_inputs field
  • Modifies Global Context Index Mapping to change workflows, user_outputs and resources_created fields to type object instead of text to support indexing dynamic json objects
  • Removes special handling of reading/writing Template objects to the GC index and replacing each instance with Template::parse / Template::toXContent
  • Fixes affected test classes

I prefer to merge this in prior to #106

Issues Resolved

Part of #88
#105

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 23, 2023

Codecov Report

Merging #111 (dace266) into main (63ef780) will decrease coverage by 0.99%.
The diff coverage is 100.00%.

❗ Current head dace266 differs from pull request most recent head 34b071b. Consider uploading reports for the commit 34b071b to get more accurate results

@@             Coverage Diff              @@
##               main     #111      +/-   ##
============================================
- Coverage     81.46%   80.47%   -0.99%     
+ Complexity      285      252      -33     
============================================
  Files            30       30              
  Lines          1122      973     -149     
  Branches        126       98      -28     
============================================
- Hits            914      783     -131     
+ Misses          162      155       -7     
+ Partials         46       35      -11     
Files Coverage Δ
...ch/flowframework/indices/GlobalContextHandler.java 72.22% <100.00%> (ø)
...a/org/opensearch/flowframework/model/Template.java 88.80% <ø> (+1.52%) ⬆️
...rk/transport/ProvisionWorkflowTransportAction.java 45.61% <100.00%> (ø)

... and 1 file with indirect coverage changes

@dbwiddis dbwiddis merged commit f621b91 into opensearch-project:main Oct 25, 2023
19 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 25, 2023
…ing (#111)

* Adding global context index mapping changes

Signed-off-by: Joshua Palis <[email protected]>

* Removes user inputs field from Template class and global context

Signed-off-by: Joshua Palis <[email protected]>

* Adding toJson test for TemplateTests::testStrings()

Signed-off-by: Joshua Palis <[email protected]>

---------

Signed-off-by: Joshua Palis <[email protected]>
(cherry picked from commit f621b91)
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
…text Index mapping (#112)

Removes user_inputs field from Template and Global Context Index mapping (#111)

* Adding global context index mapping changes



* Removes user inputs field from Template class and global context



* Adding toJson test for TemplateTests::testStrings()



---------


(cherry picked from commit f621b91)

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