-
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
[EEM] Add versioning for entity definitions #187692
[EEM] Add versioning for entity definitions #187692
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
...y_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_history_processors.ts
Outdated
Show resolved
Hide resolved
...ty_solution/entity_manager/server/lib/entities/ingest_pipeline/generate_latest_processors.ts
Outdated
Show resolved
Hide resolved
|
||
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', |
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.
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.', |
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!
I added a suggestion for the error message, take it or leave it 😄
...ervability_solution/entity_manager/server/lib/entities/create_and_install_ingest_pipeline.ts
Show resolved
Hide resolved
...ervability_solution/entity_manager/server/lib/entities/create_and_install_ingest_pipeline.ts
Show resolved
Hide resolved
...vability_solution/entity_manager/server/lib/entities/transform/generate_history_transform.ts
Show resolved
Hide resolved
...rvability_solution/entity_manager/server/lib/entities/transform/generate_latest_transform.ts
Show resolved
Hide resolved
@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", |
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.
The comment in this test file to trigger this review is :chefs-kiss:
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. |
x-pack/plugins/observability_solution/entity_manager/server/saved_objects/entity_definition.ts
Show resolved
Hide resolved
x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts
Outdated
Show resolved
Hide resolved
…gren/kibana into eem-add-version-to-components
⏳ Build in-progress
History
|
This PR adds a
version
field to theEntityDefinition
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.