Skip to content

[Streams] Move helpers and format_size_unit to utils folder#262550

Merged
SoniaSanzV merged 4 commits intoelastic:mainfrom
SoniaSanzV:streams/move_helpers_to_utils_folder
Apr 14, 2026
Merged

[Streams] Move helpers and format_size_unit to utils folder#262550
SoniaSanzV merged 4 commits intoelastic:mainfrom
SoniaSanzV:streams/move_helpers_to_utils_folder

Conversation

@SoniaSanzV
Copy link
Copy Markdown
Contributor

Summary

  • We are moving these modules because duration parsing and time-size labeling are used in several places (management advanced settings, stream list, streams view), but they still lived next to the Streams retention / lifecycle UI.
  • Cross-cutting streams UI still depended on helpers that lived under the Streams retention / lifecycle area (stream_detail_lifecycle/helpers). That coupling makes it harder to treat retention-tab code as owned by one surface and to migrate that tab toward Kibana Stack Management later.
  • Shared pieces used outside the retention tab are now centralized under x-pack/platform/plugins/shared/streams_app/public/util/: duration parsing (parse_duration.ts), ILM phase helpers (ilm_policy_phases.ts), and time/size labeling (format_size_units.ts). The old generic helpers.ts name was replaced with module names that match what they export.
  • Constraint / intent: management “Advanced settings”, stream list / streams-view utils, and the stream list retention column import from plugin util/ instead of lifecycle-local helpers, so retention-tab code can be isolated and transferred without dragging unrelated paths.

Test plan

  • Automated: Jest unit tests for util/parse_duration, util/ilm_policy_phases, and util/format_size_units (existing coverage moved/split with the files).

@SoniaSanzV SoniaSanzV self-assigned this Apr 10, 2026
@SoniaSanzV SoniaSanzV requested review from a team as code owners April 10, 2026 13:47
@SoniaSanzV SoniaSanzV added Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Feature:Streams This is the label for the Streams Project labels Apr 10, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #160 / management - group 3 (import/export/management) index pattern not found redirects to the main view if data view is missing

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
streamsApp 1827 1828 +1

History

cc @SoniaSanzV

@SoniaSanzV SoniaSanzV enabled auto-merge (squash) April 14, 2026 10:50
@SoniaSanzV SoniaSanzV merged commit 28f3465 into elastic:main Apr 14, 2026
21 checks passed
@SoniaSanzV SoniaSanzV deleted the streams/move_helpers_to_utils_folder branch April 14, 2026 13:05
mbondyra added a commit to mbondyra/kibana that referenced this pull request Apr 14, 2026
* commit '11ed3645c5ededae2a6e29f2a79b31f52208b441': (157 commits)
  remove sync register uiAction methods (elastic#254590)
  [performance] Apply minimal auth to the search route (elastic#257497)
  [ES|QL] Reports correctly the controls server side errors (elastic#263020)
  [SecuritySolution][Navigation] Enable classic nav updates (elastic#262358)
  [Inference] Use pretty name and logo on feature settings page (elastic#262531)
  [Security Solution] fix AT-AB cypress test (elastic#262991)
  [SigEvents] Seed sigevents env script (elastic#261172)
  Adjust conditions for validating no refetch for expanded row (elastic#262978)
  [Agent Builder] update copy for the announcement modal (elastic#263034)
  [Search] Hide index management links for users without privileges (elastic#262627)
  Simplify OAS schema for GET `/api/spaces/space` query params (elastic#260831)
  Fix fleet output OAS regressions: SSL type explosion and Kafka union wrappers (elastic#260842)
  [Dashboards in chat] fix agent confusing the axes in a horizontal chat (elastic#263064)
  [One Workflow] Add alert state checkbox UI for workflow connector (elastic#259770)
  [One Workflow] Deprecate legacy Cases step types in workflow authoring (elastic#262070)
  skip failing test suite (elastic#248090)
  fix flaky test: MonitorDetails filter apply button not enabled (elastic#260788)
  fix: propagate AbortSignal to executeAsReasoningAgent for task cancellation (elastic#262811)
  [Security Solution][Alert KPI] Fix white space bug in alert KPIs (elastic#260803)
  [Streams] Move helpers and format_size_unit to utils folder (elastic#262550)
  ...

# Conflicts:
#	x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/canvas_integration/dashboard_canvas_content.test.tsx
#	x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/canvas_integration/dashboard_canvas_content.tsx
#	x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/canvas_integration/use_register_canvas_action_buttons.ts
#	x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/index.test.tsx
#	x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/index.tsx
SoniaSanzV added a commit that referenced this pull request Apr 20, 2026
## Summary
- Transfer ownership of Streams_app retention-related to Kibana
Management via CODEOWNERS (`data_management/stream_detail_lifecycle`
folder). Shared methods already moved in
#262550
- Transfer ownership (review routing) of Streams retention-related
backend areas to Kibana Management via CODEOWNERS: internal
failure-store routes and library, internal ILM lifecycle routes, and
`ilm_policies` / `ilm_phases` (+ tests).
- Isolate failure-store route support code in
`server/lib/streams/failure_store/` so that surface is easier to own and
move later without dragging unrelated `stream_crud` code.
- No intentional change to product behavior or public APIs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Streams This is the label for the Streams Project release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants