kibana icon indicating copy to clipboard operation
kibana copied to clipboard

Search source flatten refactor more

Open mattkime opened this issue 1 year ago • 6 comments

Summary

Summarize your PR. If it involves visual changes include a screenshot or gif.

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

mattkime avatar May 11 '24 03:05 mattkime

/ci

mattkime avatar May 11 '24 03:05 mattkime

/ci

mattkime avatar May 11 '24 12:05 mattkime

/ci

mattkime avatar May 11 '24 20:05 mattkime

/ci

mattkime avatar May 12 '24 01:05 mattkime

/ci

mattkime avatar May 12 '24 02:05 mattkime

/ci

mattkime avatar May 12 '24 14:05 mattkime

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

elasticmachine avatar May 12 '24 22:05 elasticmachine

/ci

mattkime avatar May 14 '24 12:05 mattkime

/ci

mattkime avatar May 14 '24 12:05 mattkime

@lukasolson I agree it would be great to improve the types. My earlier attempts didn't go well but it might be easier at this point


I wonder if this is all extraneous and could just be replaced with

That doesn't work, at least not when I run the corresponding search_source.test.ts jest tests.

mattkime avatar May 14 '24 23:05 mattkime

/ci

mattkime avatar May 15 '24 01:05 mattkime

That doesn't work, at least not when I run the corresponding search_source.test.ts jest tests.

This seems to work:

    // only include unique values
    if (sourceFieldsProvided && !isEqual(remainingFields, fieldsFromSource)) {
      body._source = { includes: remainingFields };
    }

lukasolson avatar May 15 '24 14:05 lukasolson

I took a stab at improving the types here: https://github.com/mattkime/kibana/pull/21

lukasolson avatar May 15 '24 16:05 lukasolson

/ci

mattkime avatar May 15 '24 19:05 mattkime

/ci

mattkime avatar May 15 '24 22:05 mattkime

/ci

mattkime avatar May 16 '24 20:05 mattkime

/ci

mattkime avatar May 16 '24 23:05 mattkime

/ci

mattkime avatar May 24 '24 22:05 mattkime

/ci

mattkime avatar May 25 '24 18:05 mattkime

/ci

mattkime avatar May 25 '24 20:05 mattkime

:green_heart: Build Succeeded

Metrics [docs]

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5412 +5412
total size - 8.8MB +8.8MB

Page load bundle

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

id before after diff
data 419.0KB 419.0KB -2.0B
dataViews 61.6KB 61.7KB +123.0B
total +121.0B
Unknown metric groups

API count

id before after diff
dataViews 1156 1158 +2

History

  • :yellow_heart: Build #212234 was flaky 2395f2aaeb6db93e68ddc3b1a045e875a721232e
  • :broken_heart: Build #212219 failed 815cc33dab5c1b9926b45f0b1a356624be27e4df
  • :broken_heart: Build #212218 failed 815cc33dab5c1b9926b45f0b1a356624be27e4df
  • :broken_heart: Build #211337 failed f08d31ab11087a5b609f79bacfc585bcbf95550e

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

cc @mattkime

kibana-ci avatar May 25 '24 21:05 kibana-ci

Closing as a managed to mangle this branch with a bad force push. This PR has all the content - https://github.com/elastic/kibana/pull/184282 but I'm going to try to get a smaller subset merged first https://github.com/elastic/kibana/pull/184286

mattkime avatar May 27 '24 05:05 mattkime