-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] Transforms: Fix editing retention policy without default value. #123450
[ML] Transforms: Fix editing retention policy without default value. #123450
Conversation
Pinging @elastic/ml-ui (:ml) |
Tested and confirmed the issue is fixed. Code change LGTM 🎉 |
@elasticmachine merge upstream |
@pheyos this one is ready for another look, updated the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test changes LGTM and I couldn't reproduce the linked issue with this fix anymore.
But I've noticed a different issue:
- Create a transform with source data that has more than 1 time field (e.g. the ecommerce sample data)
- Add a retention policy and don't use the first time field for the max age retention field (in the ecommerce example use
order_date
) - Clone that transform
- => The wizard pre-fills the retention policy max age field with the wrong value (it seems to pick the first available entry and not the one saved in the transform - in the ecommerce example it picks
customer_birth_date
instead of the configuredorder_date
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @walterra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…lastic#123450) - Previously, a bug with how the form state would handle retention policy and populating the field select, a user could be blocked from setting the field or the form state wouldn't pick up the initial setting. - This is now fixed by setting hasNoInitialSelection to reflect the form set. If no retention policy had been set previously, the select dropdown will be empty until the user does a selection (which will then correctly update the to be updated transform config). - Functional tests have been updated to fail reflect the change and fail without the fix. - Fixed a cloning issue: When loading the wizard it didn't pick up the retention policy value provided by the config to be cloned but always fell back to the first available date field. (cherry picked from commit 1ecb42b)
…123450) (#123602) - Previously, a bug with how the form state would handle retention policy and populating the field select, a user could be blocked from setting the field or the form state wouldn't pick up the initial setting. - This is now fixed by setting hasNoInitialSelection to reflect the form set. If no retention policy had been set previously, the select dropdown will be empty until the user does a selection (which will then correctly update the to be updated transform config). - Functional tests have been updated to fail reflect the change and fail without the fix. - Fixed a cloning issue: When loading the wizard it didn't pick up the retention policy value provided by the config to be cloned but always fell back to the first available date field. (cherry picked from commit 1ecb42b)
…lastic#123450) - Previously, a bug with how the form state would handle retention policy and populating the field select, a user could be blocked from setting the field or the form state wouldn't pick up the initial setting. - This is now fixed by setting hasNoInitialSelection to reflect the form set. If no retention policy had been set previously, the select dropdown will be empty until the user does a selection (which will then correctly update the to be updated transform config). - Functional tests have been updated to fail reflect the change and fail without the fix. - Fixed a cloning issue: When loading the wizard it didn't pick up the retention policy value provided by the config to be cloned but always fell back to the first available date field. (cherry picked from commit 1ecb42b)
…123450) (#125926) - Previously, a bug with how the form state would handle retention policy and populating the field select, a user could be blocked from setting the field or the form state wouldn't pick up the initial setting. - This is now fixed by setting hasNoInitialSelection to reflect the form set. If no retention policy had been set previously, the select dropdown will be empty until the user does a selection (which will then correctly update the to be updated transform config). - Functional tests have been updated to fail reflect the change and fail without the fix. - Fixed a cloning issue: When loading the wizard it didn't pick up the retention policy value provided by the config to be cloned but always fell back to the first available date field. (cherry picked from commit 1ecb42b)
Summary
Fixes #122913.
hasNoInitialSelection
to reflect the form set. If no retention policy had been set previously, the select dropdown will be empty until the user does a selection (which will then correctly update the to be updated transform config).Checklist