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

Non blocker #202

Merged
merged 4 commits into from
Mar 9, 2022
Merged

Non blocker #202

merged 4 commits into from
Mar 9, 2022

Conversation

amitgalitz
Copy link
Member

@amitgalitz amitgalitz commented Mar 7, 2022

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

Description

This PR integrates the new additional type parameter for validation API that includes model validation. Since model (non-blocker) validation also runs detector (blocker) validation, currently I only call the validate API with model parameter. In the future we can separate the two if we want to make the non-blocker validation an optional action. With this API integrated the user will be able to see any non-blocking issues.

Changes include:

  • If response type is model then object passed to model or detector definition will include that information and the callout will be of color warning instead of danger

Screenshot:

Screen Shot 2022-03-07 at 8 22 12 AM

Check List

  • Commits are signed per the DCO using --signoff

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 amitgalitz requested a review from a team March 7, 2022 16:21
} else {
return (
<EuiCallOut
title="issues found in the model configuration"
Copy link
Member

Choose a reason for hiding this comment

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

issues -> Issues

};

// Potentially remove warning toast in these cases
if (issueType == 'aggregation' || issueType == 'timeout') {
Copy link
Member

Choose a reason for hiding this comment

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

Why would we want to remove the warning toast here? What does an aggregation issue type mean?

Copy link
Member Author

Choose a reason for hiding this comment

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

The reason for this is due to the fact that if there is an aggregation issue then it might be an issue that arouse from a change in core and user won't have much they can do about it and for timeout they also can't really re-try since action happens automatically when entering ReviewAndCreate page so I thought that I could just make it basically invisible to users instead of additionally giving a warning toast that will confuse them on there next action.

Copy link
Member

Choose a reason for hiding this comment

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

In this same if block, I see it sets the variables indicating valid detector settings and model configs, when in fact that might not be true if there was a problem performing the queries, or if it timed out. It seems like a bad user experience to see it showing as valid in the callouts, then failing later when actually creating the detector, or trying to start it.

How about having a separate callout text indicating that validation failed to run? It could be generic so that it covers both aggregation and timeout failures. I think showing the toast with more details on the failure (aggregation or timeout) could be helpful to the user, and would allow for quick user feedback in case there is something wrong with the AD code that we would need to fix (e.g., aggregation failure where the queries being made in validation API call need to be updated after core changes something internal).

Copy link
Member

Choose a reason for hiding this comment

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

As discussed separately, these issue types only come up during non-blocker validation, after blocker validation has passed. So in that case it is mostly validated, just not fully validated / not able to provide any recommendations in case there is data sparsity due to any of the configs / features.

I think the 2 options are (1) hide these failures like you're doing now, or (2) find a way to tell the user that blocking validation passed, but non-blocking validation failed to run properly. For simplicity, I think its ok to go with option 1 for this release, and sync with UX team on a solution to option 2 later on.

Suggest to update the comments on line 117 to reflect something along the lines of this

@amitgalitz amitgalitz added the enhancement New feature or request label Mar 7, 2022
@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2022

Codecov Report

Merging #202 (c2fc4e9) into main (53a0f4f) will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #202      +/-   ##
==========================================
- Coverage   45.93%   45.90%   -0.04%     
==========================================
  Files         150      150              
  Lines        4944     4956      +12     
  Branches      951      955       +4     
==========================================
+ Hits         2271     2275       +4     
- Misses       2455     2463       +8     
  Partials      218      218              
Impacted Files Coverage Δ
...ges/ReviewAndCreate/containers/ReviewAndCreate.tsx 39.53% <0.00%> (-2.24%) ⬇️
...ectorDefinitionFields/DetectorDefinitionFields.tsx 68.42% <0.00%> (-2.17%) ⬇️
...in/public/pages/DefineDetector/utils/constants.tsx 100.00% <0.00%> (ø)
...elConfigurationFields/ModelConfigurationFields.tsx 44.11% <0.00%> (+0.17%) ⬆️
...tion-dashboards-plugin/public/redux/reducers/ad.ts 57.50% <0.00%> (+0.35%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53a0f4f...c2fc4e9. Read the comment docs.

Signed-off-by: Amit Galitzky <[email protected]>
ohltyler
ohltyler previously approved these changes Mar 8, 2022
Copy link
Member

@ohltyler ohltyler left a comment

Choose a reason for hiding this comment

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

LGTM! Just one leftover log to clean: #202 (comment)

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

ohltyler commented Mar 8, 2022

Let's wait for the backend PR to merge before merging this one.

@ohltyler ohltyler merged commit 9ae8917 into opensearch-project:main Mar 9, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 9, 2022
Signed-off-by: Amit Galitzky <[email protected]>
(cherry picked from commit 9ae8917)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 9, 2022
Signed-off-by: Amit Galitzky <[email protected]>
(cherry picked from commit 9ae8917)
ohltyler pushed a commit that referenced this pull request Mar 9, 2022
Signed-off-by: Amit Galitzky <[email protected]>
(cherry picked from commit 9ae8917)
ohltyler pushed a commit that referenced this pull request Mar 9, 2022
Signed-off-by: Amit Galitzky <[email protected]>
(cherry picked from commit 9ae8917)
@ohltyler ohltyler removed the enhancement New feature or request label Mar 10, 2022
@ohltyler ohltyler added the feature A new feature for the plugin label Mar 10, 2022
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.

4 participants