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

Check if Index exists before max workflow check #178

Merged
merged 3 commits into from
Nov 20, 2023

Conversation

amitgalitz
Copy link
Member

Description

Checking if GC index exists before checking how many existing current workflows we have, and initializing if it doesn't

All I did was wrap it with following code, github change looks weird


        flowFrameworkIndicesHandler.initGlobalContextIndexIfAbsent(ActionListener.wrap(indexCreated -> {
            if (!indexCreated) {
                listener.onFailure(new FlowFrameworkException("No response to create global_context index", INTERNAL_SERVER_ERROR));
                return;
            }
            
            
 ....
 
 e -> {
            logger.error("Failed to create global_context index", e);
            listener.onFailure(new FlowFrameworkException("Failed to create global_context index", INTERNAL_SERVER_ERROR));
        }));
            

Issues Resolved

resolves #174

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.

@github-actions github-actions bot added the backport 2.x backport PRs to 2.x branch label Nov 20, 2023
Copy link

codecov bot commented Nov 20, 2023

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (2dcfc9c) 72.09% compared to head (4ecbef3) 72.12%.

Files Patch % Lines
...ework/transport/CreateWorkflowTransportAction.java 7.69% 11 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #178      +/-   ##
============================================
+ Coverage     72.09%   72.12%   +0.02%     
- Complexity      406      407       +1     
============================================
  Files            53       53              
  Lines          1946     1948       +2     
  Branches        164      164              
============================================
+ Hits           1403     1405       +2     
+ Misses          472      471       -1     
- Partials         71       72       +1     

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

@owaiskazi19 owaiskazi19 merged commit d3ab0ef into opensearch-project:main Nov 20, 2023
20 of 21 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 20, 2023
* adding check to init GC index if absent before max workflow check

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

* moved check if index exists earlier

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

* added test and switched to if/else

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

---------

Signed-off-by: Amit Galitzky <[email protected]>
(cherry picked from commit d3ab0ef)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
joshpalis pushed a commit that referenced this pull request Nov 20, 2023
Check if Index exists before max workflow check (#178)

* adding check to init GC index if absent before max workflow check



* moved check if index exists earlier



* added test and switched to if/else



---------


(cherry picked from commit d3ab0ef)

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>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 27, 2023
* adding check to init GC index if absent before max workflow check

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

* moved check if index exists earlier

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

* added test and switched to if/else

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

---------

Signed-off-by: Amit Galitzky <[email protected]>
(cherry picked from commit d3ab0ef)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
joshpalis pushed a commit that referenced this pull request Nov 27, 2023
…orkflow check (#201)

Check if Index exists before max workflow check (#178)

* adding check to init GC index if absent before max workflow check



* moved check if index exists earlier



* added test and switched to if/else



---------


(cherry picked from commit d3ab0ef)

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Checking max workflow check before checking if index exists
3 participants