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

Introduce Annotation.event field #57144

Merged
merged 6 commits into from
Jun 1, 2020

Conversation

przemekwitek
Copy link
Contributor

@przemekwitek przemekwitek commented May 26, 2020

This PR introduces Annotation.event field to distinguish annotations created for different purposes.
Currently the two existing events are delayed_data and model_snapshot_stored.
This field is not required. Older annotations will have null value for it.

Additionally, this PR:

  • makes Annotation.type field of type enum. Wire format stays "string" in order to achieve BWC.
  • makes Annotation parser strict
  • adds a parser method Annotation::fromXContent so that external code can use that instead of Annotation.Builder parser object

Relates #55781

@przemekwitek przemekwitek changed the title [DRAFT] Introduce Annotation.subtype field [DRAFT] Introduce Annotation.event field May 27, 2020
@przemekwitek przemekwitek force-pushed the annotation_subtype_field branch from 09c97f8 to 016dcac Compare May 28, 2020 07:19
@przemekwitek przemekwitek changed the title [DRAFT] Introduce Annotation.event field Introduce Annotation.event field May 28, 2020
@przemekwitek przemekwitek removed the WIP label May 28, 2020
@przemekwitek przemekwitek marked this pull request as ready for review May 28, 2020 07:20
@przemekwitek przemekwitek added :ml Machine learning v7.9.0 v8.0.0 labels May 28, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

@przemekwitek przemekwitek force-pushed the annotation_subtype_field branch from fd488e1 to b0e372e Compare June 1, 2020 08:16
Copy link
Contributor

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

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

LGTM, if you could just rename one variable

@przemekwitek przemekwitek merged commit e1c8476 into elastic:master Jun 1, 2020
@przemekwitek przemekwitek deleted the annotation_subtype_field branch June 1, 2020 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants