Skip to content

[ML] Adds created_by job property for the advanced wizard#167021

Merged
jgowdyelastic merged 5 commits intoelastic:mainfrom
jgowdyelastic:adding-advanced-wizard-created_by-property
Sep 26, 2023
Merged

[ML] Adds created_by job property for the advanced wizard#167021
jgowdyelastic merged 5 commits intoelastic:mainfrom
jgowdyelastic:adding-advanced-wizard-created_by-property

Conversation

@jgowdyelastic
Copy link
Copy Markdown
Member

@jgowdyelastic jgowdyelastic commented Sep 22, 2023

Adds created_by property of advanced-wizard to all jobs created by the advanced job wizard.
Previously no created_by property was added to these jobs.

When cloning, jobs with no created_by property or one with a value of advanced-wizard will be opened in the advanced wizard.

Closes #166053

@jgowdyelastic jgowdyelastic marked this pull request as ready for review September 22, 2023 12:23
@jgowdyelastic jgowdyelastic requested a review from a team as a code owner September 22, 2023 12:23
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ml 3.5MB 3.5MB +133.0B

History

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

cc @jgowdyelastic

}

if (cloneableJob !== undefined && originalJob?.custom_settings?.created_by !== undefined) {
const createdBy = originalJob?.custom_settings?.created_by;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When I export jobs, looks like created_by is removed (tried an advanced job and a multi-metric one). I can't remember - was this intentional?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We're using the flag exclude_generated: true when retrieving the jobs from es. This removes the created_by prop.
If we think it would be better to not strip this out, I can change it in a separate PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sounds a good idea to retain created_by on export, and to do it in a separate PR.

Copy link
Copy Markdown
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested and LGTM.

As discussed, let's retain the created_by field on export in a separate PR.

Copy link
Copy Markdown
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

LGTM ⚡

@jgowdyelastic jgowdyelastic merged commit 302ec10 into elastic:main Sep 26, 2023
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Sep 26, 2023
jgowdyelastic added a commit that referenced this pull request Sep 27, 2023
…167319)

When exporting an anomaly detection job, it would be useful if the
original `created_by` property was not removed from the job config.


Related to
#167021 (comment)
Related PR #88898
@szabosteve szabosteve changed the title [ML] Adding created_by job property for the advanced wizard [ML] Adds created_by job property for the advanced wizard Oct 12, 2023
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.

[ML] Set created_by attribute to indicate jobs created in advanced anomaly detection wizard

6 participants