Skip to content

[Logs UI][Metrics UI] Remove deprecated config fields from APIs and SavedObjects#116821

Merged
Zacqary merged 28 commits intoelastic:mainfrom
Zacqary:115257-deprecated-fields-removal
Nov 4, 2021
Merged

[Logs UI][Metrics UI] Remove deprecated config fields from APIs and SavedObjects#116821
Zacqary merged 28 commits intoelastic:mainfrom
Zacqary:115257-deprecated-fields-removal

Conversation

@Zacqary
Copy link
Copy Markdown
Contributor

@Zacqary Zacqary commented Oct 29, 2021

REDO OF #115874 which accidentally merged before approval

Summary

Closes #115257
Closes #115259
Closes #115254
Closes #115252

Removes remaining references to the deprecated fields timestamp, tiebreaker, container, pod, host from APIs and Saved Objects.

Checklist

…-fields-removal

# Conflicts:
#	x-pack/plugins/infra/public/alerting/metric_threshold/components/expression_chart.test.tsx
#	x-pack/plugins/infra/public/lib/lib.ts
#	x-pack/plugins/infra/server/services/log_entries/log_entry_search_strategy.ts
#	x-pack/test/api_integration/apis/metrics_ui/metrics_alerting.ts
@Zacqary Zacqary added release_note:breaking Feature:Metrics UI Metrics UI feature v8.0.0 Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Oct 29, 2021
@Zacqary Zacqary requested a review from a team as a code owner October 29, 2021 18:11
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@Zacqary Zacqary added v8.1.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Oct 29, 2021
@Zacqary
Copy link
Copy Markdown
Contributor Author

Zacqary commented Oct 29, 2021

@simianhacker @Kerry350 Can I get another look at this? Original PR merged accidentally so I had to reopen this after a revert

@Kerry350 Kerry350 self-requested a review November 1, 2021 12:33
Copy link
Copy Markdown
Contributor

@Kerry350 Kerry350 left a comment

Choose a reason for hiding this comment

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

Logs changes LGTM pending one question.

indices: indexPattern.title,
timestampField: indexPattern.timeFieldName ?? '@timestamp',
tiebreakerField: '_doc',
timestampField: TIMESTAMP_FIELD,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for making these changes based on the feedback from the other PR.

I think for the data view / KIP version we still want to read from the data view itself first.

timestampField: indexPattern.timeFieldName ?? TIMESTAMP_FIELD

(@weltenwort Would you say this is right, to honour the data view setting first? Or do we always want to go with the ECS constant?)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, I'd agree that we still want to use the data view's timeFieldName in that case. 👍

@Zacqary
Copy link
Copy Markdown
Contributor Author

Zacqary commented Nov 4, 2021

@elasticmachine merge upstream

@Zacqary Zacqary enabled auto-merge (squash) November 4, 2021 14:53
@Zacqary Zacqary disabled auto-merge November 4, 2021 14:53
Copy link
Copy Markdown
Contributor

@phillipb phillipb left a comment

Choose a reason for hiding this comment

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

LGTM!

@Zacqary Zacqary enabled auto-merge (squash) November 4, 2021 15:09
@Zacqary Zacqary merged commit 8420094 into elastic:main Nov 4, 2021
@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Test Failures

  • [job] [logs] Default CI Group #4 / lens app lens formula should transition from count to formula

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
infra 921.8KB 920.4KB -1.3KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
infra 90.2KB 90.3KB +69.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @Zacqary

Zacqary added a commit to Zacqary/kibana that referenced this pull request Nov 4, 2021
…avedObjects (elastic#116821)

* [Logs UI][Metrics UI] Remove deprecated config fields from APIs

* Fix typecheck

* Fix typecheck

* Fix typecheck

* Fix jest

* Fix functional test

* Remove extraneous timeField args

* Typecheck fix

* Consolidate log file changes to ResolvedLogSourceConfiguration

* Fix merge

* Revert additional logs files

* Revert inventory models

* Revert log_analysis api

* Fix timefield reference in process list

* Restore logs page files, fix typecheck on mock

* Fix functional test

* Restore inventory models index

* Fix typecheck on getFilteredMetrics

* Look CI if you don't tell me all the type errors at once I can't fix them all

* Maybe this is the last typecheck fix who knows

* Restore reading timestamp field from data view

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Backport failed

The backport operation could not be completed due to the following error:
There are no branches to backport to. Aborting.

The backport PRs will be merged automatically after passing CI.

To backport manually run:
node scripts/backport --pr 116821

Zacqary added a commit that referenced this pull request Nov 4, 2021
…avedObjects (#116821) (#117573)

* [Logs UI][Metrics UI] Remove deprecated config fields from APIs

* Fix typecheck

* Fix typecheck

* Fix typecheck

* Fix jest

* Fix functional test

* Remove extraneous timeField args

* Typecheck fix

* Consolidate log file changes to ResolvedLogSourceConfiguration

* Fix merge

* Revert additional logs files

* Revert inventory models

* Revert log_analysis api

* Fix timefield reference in process list

* Restore logs page files, fix typecheck on mock

* Fix functional test

* Restore inventory models index

* Fix typecheck on getFilteredMetrics

* Look CI if you don't tell me all the type errors at once I can't fix them all

* Maybe this is the last typecheck fix who knows

* Restore reading timestamp field from data view

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Nov 5, 2021
…ink-to-kibana-app

* 'main' of github.com:elastic/kibana: (290 commits)
  [Connectors][ServiceNow] Remove SN flags (elastic#117511)
  [ML] Functional tests - stabilize and re-enable feature importance tests (elastic#117503)
  [RAC] Disable the actions button if the user has inadequate privileges (elastic#117488)
  [Visualize] [xyChart] filter labels by default (elastic#117288)
  Fix warning when setting description to undefined (elastic#117338)
  [build] Set monitoring.ui.container.elasticsearch.enabled for all containers (elastic#115087)
  fix types
  [Alerting] UX fixes for execution duration chart (elastic#117193)
  [CI] Delete node_modules in between bootstrap attempts (elastic#117588)
  Flaky test fixes (elastic#117028)
  [Security Solution] [Sourcerer] [Feature Branch] Update to use Kibana Data Views  (elastic#114806)
  [ML] Hide anomaly entity filter button tooltips when clicked (elastic#117493)
  adjust the synthetics journey type (elastic#117316)
  Refines hasAnyData check for alerts (elastic#117499)
  [Fleet] Default to APM tutorial (elastic#117421)
  [Maps] update docs for index pattern -> data view rename (elastic#117400)
  [Logs UI][Metrics UI] Remove deprecated config fields from APIs and SavedObjects (elastic#116821)
  [Fleet] Fix agent logs not reading query from URL (elastic#117286)
  Fixing Failing test: Chrome X-Pack UI Functional Tests.x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout·ts - Actions and Triggers app create alert should successfully test valid es_query alert (elastic#114917)
  [Metrics UI] Add docs link to redundant groupBy detection (elastic#116822)
  ...

# Conflicts:
#	x-pack/plugins/reporting/public/management/__snapshots__/report_listing.test.tsx.snap
#	x-pack/plugins/reporting/public/shared_imports.ts
#	x-pack/plugins/reporting/server/routes/management/jobs.ts
@tobiasstadler
Copy link
Copy Markdown
Contributor

tobiasstadler commented Nov 9, 2021

@Zacqary Shouldn't docs/settings/general-infra-logs-ui-settings.asciidoc be removed or at leaset the xpack.infra.sources.default${field} settings in it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed Feature:Logs UI Logs UI feature Feature:Metrics UI Metrics UI feature release_note:breaking Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v8.0.0 v8.1.0

Projects

None yet

7 participants