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

Fixing model group parsing and restoring context #695

Merged
merged 3 commits into from
May 1, 2024

Conversation

amitgalitz
Copy link
Member

Description

Adding restore.context() in multiple place it isn't restored after stashing.
Fixing model group access_mode parsing, this was always failing but never tested with private on security enabled domain

Issues Resolved

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.

@amitgalitz
Copy link
Member Author

looking at failing tests

Copy link
Member

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

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

The context restores LGTM.

Potential NPE you need to address, though.

@dbwiddis
Copy link
Member

dbwiddis commented May 1, 2024

looking at failing tests

What is the type of the (Object) inputs.get(MODEL_ACCESS_MODE) ? If that's already an enum then you can't cast it to a string.

Signed-off-by: Amit Galitzky <[email protected]>
Copy link

codecov bot commented May 1, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 73.74%. Comparing base (ff072de) to head (e34d8a4).

Files Patch % Lines
.../opensearch/flowframework/util/EncryptorUtils.java 33.33% 2 Missing ⚠️
...flowframework/workflow/RegisterModelGroupStep.java 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #695      +/-   ##
============================================
- Coverage     73.78%   73.74%   -0.04%     
  Complexity      722      722              
============================================
  Files            82       82              
  Lines          3662     3668       +6     
  Branches        312      315       +3     
============================================
+ Hits           2702     2705       +3     
- Misses          818      820       +2     
- Partials        142      143       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Amit Galitzky <[email protected]>
@amitgalitz amitgalitz merged commit 28ea3dd into opensearch-project:main May 1, 2024
31 of 32 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 1, 2024
* adding context.restore when missed and fixing model group parsing

Signed-off-by: Amit Galitzky <[email protected]>

* adding change log, fix casting

Signed-off-by: Amit Galitzky <[email protected]>

* changed to contains key

Signed-off-by: Amit Galitzky <[email protected]>

---------

Signed-off-by: Amit Galitzky <[email protected]>
(cherry picked from commit 28ea3dd)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 1, 2024
* adding context.restore when missed and fixing model group parsing

Signed-off-by: Amit Galitzky <[email protected]>

* adding change log, fix casting

Signed-off-by: Amit Galitzky <[email protected]>

* changed to contains key

Signed-off-by: Amit Galitzky <[email protected]>

---------

Signed-off-by: Amit Galitzky <[email protected]>
(cherry picked from commit 28ea3dd)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
amitgalitz pushed a commit that referenced this pull request May 1, 2024
Fixing model group parsing and restoring context (#695)

* adding context.restore when missed and fixing model group parsing



* adding change log, fix casting



* changed to contains key



---------


(cherry picked from commit 28ea3dd)

Signed-off-by: Amit Galitzky <[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>
amitgalitz pushed a commit that referenced this pull request May 1, 2024
Fixing model group parsing and restoring context (#695)

* adding context.restore when missed and fixing model group parsing



* adding change log, fix casting



* changed to contains key



---------


(cherry picked from commit 28ea3dd)

Signed-off-by: Amit Galitzky <[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 backport 2.14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants