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

Fix downsample validation when downsample action disappears from the previous phase #140628

Merged
merged 3 commits into from
Sep 15, 2022

Conversation

Dosant
Copy link
Contributor

@Dosant Dosant commented Sep 13, 2022

Fix #140714

Problem

The PR for downsampling action was merged, but there is this validation edge case that bothers me:

You can enable Downsample action in hot, warm, and cold phases. You can configure downsampling interval. The interval has validation where it depends on the interval in the previous phase:

image

  • they must be greater than any previous interval and a multiple of that interval.
    • For example, on the warm phase, the user includes a 3-hour interval; if they choose to add a rollup action on the cold phase, the interval must be a multiple of 3h. It cannot be 5h, for example.
    • Another example: a user can have a rollup on the hot phase of 2d and then no rollup action on the warm phase, and then a rollup action on the cold phase, but it must be a multiple of 2d, for example, it cannot be 1d nor can it be 3d.

image

There is currently the following bug that I struggle to fix:

  • Enable Downsample in hot phase and set the interval to 1 day
  • Enable Downsample in warm phase and set the interval to 1 day (see the error)
  • Disable Downsample in hot phase (through the custom rollover option)
  • See that the error in warm didn't disappear. The user needs to change the field to trigger validation

See the video:

validation.bug.mov

Solution

The proper fix ended up being inside the lib itself.
When a field was unmounted, the corresponding value was changed, but this didn't trigger the validation of dependant fields from fieldsToValidateOnChange.
The fix is to trigger validation of the fields from fieldsToValidateOnChange when a field is being unmounted.

@Dosant Dosant changed the title try to fix downsample validation (no luck) Fix downsample validation when downsample action disappears from the previous phase Sep 13, 2022
@Dosant Dosant force-pushed the d/2022-09-13-fix-downsample-validation branch from 1071e9f to d3fb0af Compare September 14, 2022 10:36
@Dosant Dosant added Feature:ILM Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes Team:AppServicesUx v8.5.0 labels Sep 14, 2022
@Dosant Dosant marked this pull request as ready for review September 14, 2022 12:03
@Dosant Dosant requested a review from a team as a code owner September 14, 2022 12:03
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServicesUx)

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #3 / Reporting Functional Tests with forced timeout adds a visual warning in the report output

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
esUiShared 152.6KB 152.6KB +72.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@sebelga sebelga left a comment

Choose a reason for hiding this comment

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

LGTM! 👍 Thanks for fixing this issue @Dosant !

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this and updating the tests @Dosant! LGTM.

@Dosant Dosant merged commit 517ef60 into elastic:main Sep 15, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:ILM release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ILM][Downsample] Error is not reset when downsample action unmounts from the previous phase
6 participants