Skip to content

Add created_date and modified_date to entities #5097

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

szybia
Copy link
Contributor

@szybia szybia commented Aug 8, 2025

adding new system-managed properties to ingest pipelines. component templates and index templates

relates to:

@szybia szybia requested a review from Copilot August 8, 2025 13:12
Copilot

This comment was marked as outdated.

Copy link
Contributor

github-actions bot commented Aug 8, 2025

Following you can find the validation changes against the target branch for the APIs.

API Status Request Response
cluster.get_component_template 🔴 → 🟢 14/14 4/14 → 14/14
indices.get_index_template 🔴 → 🟢 23/23 5/23 → 23/23
ingest.get_pipeline 🔴 → 🟢 23/23 15/23 → 23/23

You can validate these APIs yourself by using the make validate target.

@szybia szybia added the skip-backport This pull request should not be backported label Aug 8, 2025
@szybia szybia requested a review from Copilot August 8, 2025 13:21
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds system-managed timestamp properties (created_date, created_date_millis, modified_date, and modified_date_millis) to three Elasticsearch entity types: ingest pipelines, component templates, and index templates. These properties provide creation and modification tracking for better entity management.

  • Introduces a new DateString type for ISO 8601 formatted date strings
  • Adds four timestamp fields to Pipeline, ComponentTemplateNode, and IndexTemplate classes
  • Updates example responses to include the new timestamp properties

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
specification/_types/Time.ts Introduces DateString type and refactors DateTime to use it
specification/ingest/_types/Pipeline.ts Adds timestamp fields to Pipeline class with availability annotations
specification/cluster/_types/ComponentTemplate.ts Adds timestamp fields to ComponentTemplateNode class
specification/indices/_types/IndexTemplate.ts Adds timestamp fields to IndexTemplate class
Example YAML files Updates response examples to include new timestamp properties
Generated output files Auto-generated updates to TypeScript, JSON schema, and OpenAPI specs
Comments suppressed due to low confidence (2)

specification/cluster/get_component_template/examples/200_response/GetComponentTemplateResponseExample1.yaml:14

  • The dates are inconsistent - created_date is 2024-01-01 but modified_date is 2025-01-01, which means the entity was modified before it was created. The created_date should be earlier than or equal to the modified_date.
  \        \"created_date_millis\" : 1704110400000,\n        \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n\

specification/indices/get_index_template/examples/200_response/GetIndexTemplateResponseExample1.yaml:15

  • The dates are inconsistent - created_date is 2024-01-01 but modified_date is 2025-01-01, which means the entity was modified before it was created. The created_date should be earlier than or equal to the modified_date.
  \          \"description\" : \"my custom index template\"\n        },\n        \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n\

@szybia szybia requested a review from dakrone August 8, 2025 13:27
@szybia szybia marked this pull request as ready for review August 8, 2025 13:27
szybia added 2 commits August 12, 2025 14:42
* origin/main:
  [DOCS] Fix typos in the shared overlays file (#5124)
  Update specification output
  Remove unused EIS types (#5107)
  No native utility types validation lint (#4567)
  Document reindexing failures (#5031)
  Add dangling types to validation-errors.json (#5106)
  Update specification output
  Change `KeyedPercentiles` value type from `long` to `double` (#5108)
  [DOCS]: Add descriptions to API tags (#5098)
  Bump form-data and @redocly/cli in /docs/examples (#5074)
  Update specification output
  Adds cat-h values (#5096)
  Bump @eslint/plugin-kit from 0.3.3 to 0.3.4 in /specification (#5053)
  Update specification output
  [DOCS] Adds Ruby bulk helper to BulkRequest documentation (#5057)
Copy link
Member

@flobernd flobernd left a comment

Choose a reason for hiding this comment

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

LGTM, thank you 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-backport This pull request should not be backported specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants