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

[EEM] Add versioning for entity definitions #187692

Merged

Conversation

miltonhultgren
Copy link
Contributor

This PR adds a version field to the EntityDefinition type, making it required in the API calls. It must be a SemVer string.
The version is added to the ingest pipelines and transforms as part of their metadata.
The version is included in the output documents alongside the schema version.

@miltonhultgren miltonhultgren added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Feature:EEM Elastic Entity Model labels Jul 5, 2024
@miltonhultgren miltonhultgren requested a review from a team as a code owner July 5, 2024 15:33
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Jul 5, 2024
@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@simianhacker simianhacker self-requested a review July 5, 2024 20:19

const semVerRegex = new RegExp(/^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$/);
export const semVerSchema = z.string().refine((maybeSemVer) => semVerRegex.test(maybeSemVer), {
message: 'The string does not match the semver pattern of 1.1.1',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
message: 'The string does not match the semver pattern of 1.1.1',
message: 'The string does use Semantic Versioning (Semver) format of {major}.{minor}.{patch} (e.g., 1.0.0), ensure each part contains only digits.',

Copy link
Member

@simianhacker simianhacker left a comment

Choose a reason for hiding this comment

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

LGTM!

I added a suggestion for the error message, take it or leave it 😄

@miltonhultgren miltonhultgren requested a review from a team as a code owner July 5, 2024 21:46
@miltonhultgren
Copy link
Contributor Author

@simianhacker I'll take it!

@@ -88,7 +88,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
"endpoint:unified-user-artifact-manifest": "71c7fcb52c658b21ea2800a6b6a76972ae1c776e",
"endpoint:user-artifact-manifest": "1c3533161811a58772e30cdc77bac4631da3ef2b",
"enterprise_search_telemetry": "9ac912e1417fc8681e0cd383775382117c9e3d3d",
"entity-definition": "33fe0194bd896f0bfe479d55f6de20f8ba1d7713",
"entity-definition": "ac192f757eff0fc965b67965a02981361cb2f241",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The comment in this test file to trigger this review is :chefs-kiss:

@miltonhultgren
Copy link
Contributor Author

CI is telling us some metrics about our SO type, I've added those notes to this issue https://github.com/elastic/elastic-entity-model/issues/96 which is about cleaning up the SO type.

@elasticmachine
Copy link
Contributor

elasticmachine commented Jul 9, 2024

⏳ Build in-progress

History

@miltonhultgren miltonhultgren merged commit 47178a7 into elastic:main Jul 9, 2024
23 of 24 checks passed
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 ci:project-deploy-observability Create an Observability project Feature:EEM Elastic Entity Model release_note:skip Skip the PR/issue when compiling release notes v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants