-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Unify getting fields for aggs, and filter scripted fields for significant terms agg #8734
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
Conversation
6be3ce4
to
e554402
Compare
e554402
to
0757c45
Compare
@@ -81,10 +82,6 @@ uiModules | |||
// build collection of agg params html | |||
type.params.forEach(function (param, i) { | |||
let aggParam; | |||
// if field param exists, compute allowed fields | |||
if (param.name === 'field') { | |||
$aggParamEditorsScope.indexedFields = getIndexedFields(param); |
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.
Previously this required access to the field param, but now the aggConfig knows how to get it's own field options with aggConfig.getFieldOptions()
aggConfig.getFieldOptions()
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.
Mostly confused by the test changes included in this PR
{ type: 'terms', schema: 'segment', params: { field: 'extension' } }, | ||
{ type: 'avg', schema: 'metric', params: { field: '@timestamp' } } | ||
{ type: 'avg', schema: 'metric', params: { field: 'bytes' } } |
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.
Were these tests suddenly blowing up for some reason? Why @timestamp
-> time
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.
@timestamp
isn't a field in the stubbed logstash index pattern, so this fails the new valid check in #8723
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.
{ name: '@timestamp', type: 'date', indexed: true, analyzed: true, sortable: true, filterable: true, count: 30 }, |
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.
ugh, I guess I miscalculated this and it was just the type that was an issue (dates in the avg
agg)
@@ -94,6 +92,7 @@ describe('AggType Class', function () { | |||
}); | |||
|
|||
let aggConfig = vis.aggs.byTypeName.date_histogram[0]; | |||
const aggType = aggConfig.type; | |||
|
|||
expect(aggType.getFormat(aggConfig)).to.be(fieldFormat.getDefaultInstance('date')); |
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.
Not sure I understand the changes in this file, tests seem to pass without them?
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.
This only causes tests to fail with the valid check from #8643
fields = $filter('fieldType')(fields, this.filterFieldTypes); | ||
} | ||
|
||
fields = $filter('orderBy')(fields, ['type', 'name']); |
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.
This filter was inside the above conditional in the old code.
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.
Yeah, I figured that wasn't intentional. Can't imagine why anyone would want the fields ordered differently based on the existence of agg.filterFieldTypes
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.
I can't either, but I don't see a reason to risk unintentionally breaking something unless we know the old code was causing some other issue?
@@ -56,7 +80,7 @@ export default function FieldAggParamFactory(Private) { | |||
let field = aggConfig.getField(); | |||
|
|||
if (!field) { | |||
throw new Error(`"${aggConfig.makeLabel()}" requires a field`); | |||
throw new TypeError('"field" is a required parameter'); |
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.
is this just an unrelated improvement?
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.
Somewhat, in a few situations I saw this cause call-stack overflows because certain aggs call write()
on all of their params in their makeLabel()
function
_Edit:_ This is more likely to happen now that this branch has the field validation logic too. Since we are changing the field options of the significant terms agg, if someone had a saved visualization with a scripted field for a signification terms agg this would have caused a call stack overflow
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.
Fair enough
@@ -12,8 +12,11 @@ import IndexPatternsMapperProvider from 'ui/index_patterns/_mapper'; | |||
import UtilsMappingSetupProvider from 'ui/utils/mapping_setup'; |
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.
Could you explain the reason for the changes in this file? I don't understand how they connect to the agg changes.
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.
Now that the stubbed logstash index pattern fields have aggregatable and searchable properties, the call to refresh the fields is not happening, which means that the stubbed version of mapper.getFieldsForIndexPattern()
is not being used and the strategic points where bluebird promises were injected are no longer correct. Rather than with the fragile practice of only replacing the promises we need, the no_disgest_promises
test until just replaces our Promise
angular module with Bluebird
promises, so that they resolve like normal and don't require calls to $rootScope.$apply()
.
@@ -33,10 +33,13 @@ describe('Notifier', function () { | |||
|
|||
beforeEach(function () { |
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.
same question as for the index pattern tests, how do these notifier tests relate to the agg changes?
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.
@@ -10,12 +10,15 @@ describe('ui/route_based_notifier', function () { | |||
|
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.
?
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.
Clearing the notifier before each test doesn't clean up the changes you've made. It needs to happen in the after each handler, right?
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.
But what does that have to do with aggregation field options? I'm trying to understand the connection to the purpose of the PR so that I can review it better. If it's not connected, that makes the PR a lot harder to review.
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.
Fair enough, it was useful for debugging the issues but can be done in it's own pr
@@ -6,6 +6,7 @@ import chrome from 'ui/chrome'; | |||
import Nonsense from 'Nonsense'; |
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.
?
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.
Since the courier lives outside of angular, it's state is not reset in between tests. With the new valid check in #8723 calls to notify.error()
were breaking the notifier tests, so I figured it would be a good idea to fail a test if it left notifications in the notifier (tests need to clean up after themselves).
} | ||
] | ||
}); | ||
|
||
let field = indexPattern.fields.byName.ssl; | ||
let field = indexPattern.fields.byName.bytes; |
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.
ssl -> bytes makes sense, but why timestamp -> time?
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.
@timestamp
isn't a field in the stubbed logstash index pattern, so this fails the new valid check in #8723
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.
That was incorrect, I misread the field list and miscategorized the issue. Removed the changes.
Maybe it wasn't a good idea to pull these changes out of #8723. I don't want to loose the inline feedback by closing this issue but I didn't notice that much of the changes here are only necessary with the new valid check in agg deserialization. |
It's less than ideal because they seem so similar, but at least it points the user and gives them a hint why their field parameter is no longer defined. |
Maybe we could just make the first one a little more descriptive? Something like ""field" parameter in saved Vis is invalid. Select a new field." The double message would still be slightly redundant, but it might be a little more clear what's going on. |
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.
Not an expert on this topic, but LGTM.
Only minor comments.
lang, | ||
scripted, | ||
}; | ||
}); |
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.
I think I am missing what changed here. Is this a rewrite of the original? I guess 'expression' is now no longer hardcoded.
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 primary driver was to add aggregatable and searchable, which overflowed the rows when added in the previous style.
--------- **Commit 1:** [aggConfig] unify field option handling * Original sha: e49ba04 * Authored by spalger <[email protected]> on 2016-10-18T19:45:24Z **Commit 2:** [tests] fix tests that were improperly using fields * Original sha: a9c139a * Authored by spalger <[email protected]> on 2016-10-18T19:56:22Z **Commit 3:** [logstash_fields] remove sortable and filterable, which do nothing * Original sha: 0757c45 * Authored by spalger <[email protected]> on 2016-10-18T22:11:23Z **Commit 4:** [notifier] ensure that notifications are not left around * Original sha: 2dbb462 * Authored by spalger <[email protected]> on 2016-10-18T22:48:01Z **Commit 5:** [aggParams/field] support aggParamType#scriptable * Original sha: 95d704c * Authored by spalger <[email protected]> on 2016-10-17T22:40:04Z **Commit 6:** [aggConfig] add light validation for aggConfig field param * Original sha: 0e11c22 * Authored by spalger <[email protected]> on 2016-10-18T22:47:27Z **Commit 7:** [aggConfig] restore use of `@timestamp` * Original sha: e71b0f2 * Authored by spalger <[email protected]> on 2016-10-25T00:04:13Z **Commit 8:** [tests] revert changes to notifier clearing * Original sha: 6157275 * Authored by spalger <[email protected]> on 2016-10-25T00:07:31Z **Commit 9:** [aggType/test] remove unnecessary change * Original sha: fbf884a * Authored by spalger <[email protected]> on 2016-10-25T00:20:55Z **Commit 10:** [aggTypes/fieldParam] move orderby back into condition * Original sha: 0018786 * Authored by spalger <[email protected]> on 2016-10-25T00:22:46Z **Commit 11:** [aggParams/field] use a more descriptive warning * Original sha: 7205993 * Authored by spalger <[email protected]> on 2016-10-27T18:38:36Z
[backport] PR #8734 to 5.x - Unify getting fields for aggs, and filter scripted fields for significant terms agg
--------- **Commit 1:** [aggConfig] unify field option handling * Original sha: 8a0a6c9df8961b9dc910a2b405b6f7029e96421b [formerly e49ba04] * Authored by spalger <[email protected]> on 2016-10-18T19:45:24Z **Commit 2:** [tests] fix tests that were improperly using fields * Original sha: a7d47ac1d423ebe4181c3adb5283b54670497624 [formerly a9c139a] * Authored by spalger <[email protected]> on 2016-10-18T19:56:22Z **Commit 3:** [logstash_fields] remove sortable and filterable, which do nothing * Original sha: bc102c56db9e76b326597cac7feec5ff4cda200f [formerly 0757c45] * Authored by spalger <[email protected]> on 2016-10-18T22:11:23Z **Commit 4:** [notifier] ensure that notifications are not left around * Original sha: bd5ec0bb0bb23a420bbfd01c4c4a50ca91bb2b53 [formerly 2dbb462] * Authored by spalger <[email protected]> on 2016-10-18T22:48:01Z **Commit 5:** [aggParams/field] support aggParamType#scriptable * Original sha: b5f84211b0a37f711bf9515d4a8c4eff962e1994 [formerly 95d704c] * Authored by spalger <[email protected]> on 2016-10-17T22:40:04Z **Commit 6:** [aggConfig] add light validation for aggConfig field param * Original sha: dec5b418360f6c82a430d8719574c8a5b145c816 [formerly 0e11c22] * Authored by spalger <[email protected]> on 2016-10-18T22:47:27Z **Commit 7:** [aggConfig] restore use of `@timestamp` * Original sha: 0a77eead0688fa2fa82e937ff7079b36e66cfbbe [formerly e71b0f2] * Authored by spalger <[email protected]> on 2016-10-25T00:04:13Z **Commit 8:** [tests] revert changes to notifier clearing * Original sha: c81c25aa61be5afc85a8e03a44eb678a5bf9be97 [formerly 6157275] * Authored by spalger <[email protected]> on 2016-10-25T00:07:31Z **Commit 9:** [aggType/test] remove unnecessary change * Original sha: da013cda95081110696582836a6ac9fab21d8447 [formerly fbf884a] * Authored by spalger <[email protected]> on 2016-10-25T00:20:55Z **Commit 10:** [aggTypes/fieldParam] move orderby back into condition * Original sha: cf19934513af0dd96f0c87d7a835cd22d25588c7 [formerly 0018786] * Authored by spalger <[email protected]> on 2016-10-25T00:22:46Z **Commit 11:** [aggParams/field] use a more descriptive warning * Original sha: ffdd5c74d1055ca94864ba354c159b2b0defbf16 [formerly 7205993] * Authored by spalger <[email protected]> on 2016-10-27T18:38:36Z Former-commit-id: 01ca5dd
[backport] PR elastic#8734 to 5.x - Unify getting fields for aggs, and filter scripted fields for significant terms agg Former-commit-id: fa11c03
`102.3.0` ⏩ `103.0.0` [Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams) ## Changes [#8736](elastic/eui#8736), [#8732](elastic/eui#8732), and [#8732](elastic/eui#8732) include a number of small style tweaks `EuiResizableCollapseButton`, `EuiTitle`, and `EuiListGroupItem`. [#8756](elastic/eui#8756) and [#8744](elastic/eui#8744) rename a couple of icons: `questionInCircle` -> `question` `iInCircle` > `info` In both cases, the old name is **backwards-compatible** (unless importing directly from `assets` folder (see more in the release notes regarding that). However, the old name will eventually be deprecated as a part of a larger set of deprecations. **No action is required at this time to handle this renaming. We will issue a dedicated PR to Kibana to replace the old names with the new names in the future** [#8725](elastic/eui#8725) adds Sky Blue, Yellow, and Orange palettes to EUI's [color palettes](https://eui.elastic.co/docs/utilities/color-palettes/#recommended-quantitative-palettes), as well as new tokens for Risk, Neutral, and Warning. **[Breaking change]** Please note that as part of this change, the following tokens have been renamed: `euiColorVisNeutral0` -> `euiColorVisBase0` `euiColorVisWarning0` -> `euiColorVisWarning1` The original tokens still exist, but have been updated to use new colors in a way that would be breaking. This PR updates the existing references in 0b21d2d. ## Package updates ### `@elastic/eui` ## [`v103.0.0`](https://github.com/elastic/eui/releases/v103.0.0) - Replaced `question` icon glyph ([#8756](elastic/eui#8756)) - Updated `EuiResizableCollapseButton` to use an empty button ([#8736](elastic/eui#8736)) - Added `info` icon glyph ([#8744](elastic/eui#8744)) - Removed uppercase styling from `EuiText` `h6` headings to match `EuiTitle` ([#8732](elastic/eui#8732)) - Removed heavier font weight from `xs` and `s` `EuiListGroupItem` sizes for consistency ([#8732](elastic/eui#8732)) - Updated the `font-weight` of default `EuiFilterButton` and `EuiButtonGroupButton` to `450` ([#8734](elastic/eui#8734)) - Added color pallete functions and related hooks: ([#8725](elastic/eui#8725)) - `euiPaletteSkyBlue`, `useEuiPaletteSkyBlue` - `euiPaletteYellow`, `useEuiPaletteYellow` - `euiPaletteOrange`, `useEuiPaletteOrange` - Added new tokens on `colors.vis`: ([#8725](elastic/eui#8725)) - `euiColorVisNeutral0` - `euiColorVisNeutral1` - `euiColorVisWarning1` - `euiColorVisRisk0` - `euiColorVisRisk1` - Updated the value of token `colors.vis.euiColorVisWarning0` ([#8725](elastic/eui#8725)) - Updated EuiFilterButton's `numActiveFilters` prop to accept percentage values ([#8705](elastic/eui#8705)) **Bug fixes** - Fixed visual positioning issue for notifications in `EuiHeaderSectionItemButton` ([#8736](elastic/eui#8736)) - Fixed a visual issue where `EuiCollabsibleNavItem` did not have a visible selected state ([#8736](elastic/eui#8736)) - Fixed handling of unregistered code block languages in `EuiMarkdownFormat` ([#8729](elastic/eui#8729)) **Breaking changes** - Renamed `colors.vis.euiColorVisNeutral0` to `euiColorVisBase0` ([#8725](elastic/eui#8725)) ### `@elastic/eui-theme-borealis` ## [`v2.0.0`](https://github.com/elastic/eui/blob/main/packages/eui-theme-borealis/changelogs/CHANGELOG_2025.md#v200) - Added new tokens on `colors.vis`: ([#8725](elastic/eui#8725)) - `euiColorVisNeutral0` - `euiColorVisNeutral1` - `euiColorVisWarning1` - `euiColorVisRisk0` - `euiColorVisRisk1` - Updated the value of token `colors.vis.euiColorVisWarning0` ([#8725](elastic/eui#8725)) **Bug fixes** - Fixed missing source map warnings emitted by some bundlers by excluding source maps from being published ([#8764](elastic/eui#8764)) - To align with `@elastic/eui` and many other popular packages, we made a call to not ship source maps anymore **Breaking changes** - Renamed `colors.vis.euiColorVisNeutral0` to `euiColorVisBase0` ([#8725](elastic/eui#8725)) <!--ONMERGE {"backportTargets":["8.19","9.0"]} ONMERGE--> --------- Co-authored-by: Lene Gadewoll <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
# Backport This will backport the following commits from `main` to `8.19`: - [Upgrade EUI to v103.0.0 (#223414)](#223414) <!--- Backport version: 10.0.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Jason Stoltzfus","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-06-17T10:16:40Z","message":"Upgrade EUI to v103.0.0 (#223414)\n\n`102.3.0` ⏩ `103.0.0`\n\n[Questions? Please see our Kibana upgrade\nFAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)\n\n## Changes\n\n[#8736](https://github.com/elastic/eui/pull/8736),\n[#8732](https://github.com/elastic/eui/pull/8732), and\n[#8732](elastic/eui#8732) include a number of\nsmall style tweaks `EuiResizableCollapseButton`, `EuiTitle`, and\n`EuiListGroupItem`.\n\n[#8756](elastic/eui#8756) and\n[#8744](elastic/eui#8744) rename a couple of\nicons:\n\n`questionInCircle` -> `question`\n`iInCircle` > `info`\n\nIn both cases, the old name is **backwards-compatible** (unless\nimporting directly from `assets` folder (see more in the release notes\nregarding that). However, the old name will eventually be deprecated as\na part of a larger set of deprecations.\n\n**No action is required at this time to handle this renaming. We will\nissue a dedicated PR to Kibana to replace the old names with the new\nnames in the future**\n\n[#8725](elastic/eui#8725) adds Sky Blue, Yellow,\nand Orange palettes to EUI's [color\npalettes](https://eui.elastic.co/docs/utilities/color-palettes/#recommended-quantitative-palettes),\nas well as new tokens for Risk, Neutral, and Warning.\n\n**[Breaking change]** Please note that as part of this change, the\nfollowing tokens have been renamed:\n`euiColorVisNeutral0` -> `euiColorVisBase0`\n`euiColorVisWarning0` -> `euiColorVisWarning1`\n\nThe original tokens still exist, but have been updated to use new colors\nin a way that would be breaking. This PR updates the existing references\nin 0b21d2d.\n\n## Package updates\n\n### `@elastic/eui`\n\n## [`v103.0.0`](https://github.com/elastic/eui/releases/v103.0.0)\n\n- Replaced `question` icon glyph\n([#8756](https://github.com/elastic/eui/pull/8756))\n- Updated `EuiResizableCollapseButton` to use an empty button\n([#8736](https://github.com/elastic/eui/pull/8736))\n- Added `info` icon glyph\n([#8744](https://github.com/elastic/eui/pull/8744))\n- Removed uppercase styling from `EuiText` `h6` headings to match\n`EuiTitle` ([#8732](https://github.com/elastic/eui/pull/8732))\n- Removed heavier font weight from `xs` and `s` `EuiListGroupItem` sizes\nfor consistency ([#8732](https://github.com/elastic/eui/pull/8732))\n- Updated the `font-weight` of default `EuiFilterButton` and\n`EuiButtonGroupButton` to `450`\n([#8734](https://github.com/elastic/eui/pull/8734))\n- Added color pallete functions and related hooks:\n([#8725](https://github.com/elastic/eui/pull/8725))\n - `euiPaletteSkyBlue`, `useEuiPaletteSkyBlue`\n - `euiPaletteYellow`, `useEuiPaletteYellow`\n - `euiPaletteOrange`, `useEuiPaletteOrange`\n- Added new tokens on `colors.vis`:\n([#8725](https://github.com/elastic/eui/pull/8725))\n - `euiColorVisNeutral0`\n - `euiColorVisNeutral1`\n - `euiColorVisWarning1`\n - `euiColorVisRisk0`\n - `euiColorVisRisk1`\n- Updated the value of token `colors.vis.euiColorVisWarning0`\n([#8725](https://github.com/elastic/eui/pull/8725))\n- Updated EuiFilterButton's `numActiveFilters` prop to accept percentage\nvalues ([#8705](https://github.com/elastic/eui/pull/8705))\n\n**Bug fixes**\n\n- Fixed visual positioning issue for notifications in\n`EuiHeaderSectionItemButton`\n([#8736](https://github.com/elastic/eui/pull/8736))\n- Fixed a visual issue where `EuiCollabsibleNavItem` did not have a\nvisible selected state\n([#8736](https://github.com/elastic/eui/pull/8736))\n- Fixed handling of unregistered code block languages in\n`EuiMarkdownFormat` ([#8729](https://github.com/elastic/eui/pull/8729))\n\n**Breaking changes**\n\n- Renamed `colors.vis.euiColorVisNeutral0` to `euiColorVisBase0`\n([#8725](https://github.com/elastic/eui/pull/8725))\n\n### `@elastic/eui-theme-borealis`\n\n##\n[`v2.0.0`](https://github.com/elastic/eui/blob/main/packages/eui-theme-borealis/changelogs/CHANGELOG_2025.md#v200)\n\n- Added new tokens on `colors.vis`:\n([#8725](https://github.com/elastic/eui/pull/8725))\n - `euiColorVisNeutral0`\n - `euiColorVisNeutral1`\n - `euiColorVisWarning1`\n - `euiColorVisRisk0`\n - `euiColorVisRisk1`\n- Updated the value of token `colors.vis.euiColorVisWarning0`\n([#8725](https://github.com/elastic/eui/pull/8725))\n\n**Bug fixes**\n\n- Fixed missing source map warnings emitted by some bundlers by\nexcluding source maps from being published\n([#8764](https://github.com/elastic/eui/pull/8764))\n- To align with `@elastic/eui` and many other popular packages, we made\na call to not ship source maps anymore\n\n**Breaking changes**\n\n- Renamed `colors.vis.euiColorVisNeutral0` to `euiColorVisBase0`\n([#8725](https://github.com/elastic/eui/pull/8725))\n\n\n\n---------\n\nCo-authored-by: Lene Gadewoll <[email protected]>\nCo-authored-by: Elastic Machine <[email protected]>","sha":"61ea2f398f8f8e2dcac7f36719557f6999ef6e9b","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["review","release_note:skip","EUI","ci:cloud-deploy","Team:obs-ux-infra_services","backport:version","v9.1.0","v8.19.0"],"title":"Upgrade EUI to v103.0.0","number":223414,"url":"https://github.com/elastic/kibana/pull/223414","mergeCommit":{"message":"Upgrade EUI to v103.0.0 (#223414)\n\n`102.3.0` ⏩ `103.0.0`\n\n[Questions? Please see our Kibana upgrade\nFAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)\n\n## Changes\n\n[#8736](https://github.com/elastic/eui/pull/8736),\n[#8732](https://github.com/elastic/eui/pull/8732), and\n[#8732](elastic/eui#8732) include a number of\nsmall style tweaks `EuiResizableCollapseButton`, `EuiTitle`, and\n`EuiListGroupItem`.\n\n[#8756](elastic/eui#8756) and\n[#8744](elastic/eui#8744) rename a couple of\nicons:\n\n`questionInCircle` -> `question`\n`iInCircle` > `info`\n\nIn both cases, the old name is **backwards-compatible** (unless\nimporting directly from `assets` folder (see more in the release notes\nregarding that). However, the old name will eventually be deprecated as\na part of a larger set of deprecations.\n\n**No action is required at this time to handle this renaming. We will\nissue a dedicated PR to Kibana to replace the old names with the new\nnames in the future**\n\n[#8725](elastic/eui#8725) adds Sky Blue, Yellow,\nand Orange palettes to EUI's [color\npalettes](https://eui.elastic.co/docs/utilities/color-palettes/#recommended-quantitative-palettes),\nas well as new tokens for Risk, Neutral, and Warning.\n\n**[Breaking change]** Please note that as part of this change, the\nfollowing tokens have been renamed:\n`euiColorVisNeutral0` -> `euiColorVisBase0`\n`euiColorVisWarning0` -> `euiColorVisWarning1`\n\nThe original tokens still exist, but have been updated to use new colors\nin a way that would be breaking. This PR updates the existing references\nin 0b21d2d.\n\n## Package updates\n\n### `@elastic/eui`\n\n## [`v103.0.0`](https://github.com/elastic/eui/releases/v103.0.0)\n\n- Replaced `question` icon glyph\n([#8756](https://github.com/elastic/eui/pull/8756))\n- Updated `EuiResizableCollapseButton` to use an empty button\n([#8736](https://github.com/elastic/eui/pull/8736))\n- Added `info` icon glyph\n([#8744](https://github.com/elastic/eui/pull/8744))\n- Removed uppercase styling from `EuiText` `h6` headings to match\n`EuiTitle` ([#8732](https://github.com/elastic/eui/pull/8732))\n- Removed heavier font weight from `xs` and `s` `EuiListGroupItem` sizes\nfor consistency ([#8732](https://github.com/elastic/eui/pull/8732))\n- Updated the `font-weight` of default `EuiFilterButton` and\n`EuiButtonGroupButton` to `450`\n([#8734](https://github.com/elastic/eui/pull/8734))\n- Added color pallete functions and related hooks:\n([#8725](https://github.com/elastic/eui/pull/8725))\n - `euiPaletteSkyBlue`, `useEuiPaletteSkyBlue`\n - `euiPaletteYellow`, `useEuiPaletteYellow`\n - `euiPaletteOrange`, `useEuiPaletteOrange`\n- Added new tokens on `colors.vis`:\n([#8725](https://github.com/elastic/eui/pull/8725))\n - `euiColorVisNeutral0`\n - `euiColorVisNeutral1`\n - `euiColorVisWarning1`\n - `euiColorVisRisk0`\n - `euiColorVisRisk1`\n- Updated the value of token `colors.vis.euiColorVisWarning0`\n([#8725](https://github.com/elastic/eui/pull/8725))\n- Updated EuiFilterButton's `numActiveFilters` prop to accept percentage\nvalues ([#8705](https://github.com/elastic/eui/pull/8705))\n\n**Bug fixes**\n\n- Fixed visual positioning issue for notifications in\n`EuiHeaderSectionItemButton`\n([#8736](https://github.com/elastic/eui/pull/8736))\n- Fixed a visual issue where `EuiCollabsibleNavItem` did not have a\nvisible selected state\n([#8736](https://github.com/elastic/eui/pull/8736))\n- Fixed handling of unregistered code block languages in\n`EuiMarkdownFormat` ([#8729](https://github.com/elastic/eui/pull/8729))\n\n**Breaking changes**\n\n- Renamed `colors.vis.euiColorVisNeutral0` to `euiColorVisBase0`\n([#8725](https://github.com/elastic/eui/pull/8725))\n\n### `@elastic/eui-theme-borealis`\n\n##\n[`v2.0.0`](https://github.com/elastic/eui/blob/main/packages/eui-theme-borealis/changelogs/CHANGELOG_2025.md#v200)\n\n- Added new tokens on `colors.vis`:\n([#8725](https://github.com/elastic/eui/pull/8725))\n - `euiColorVisNeutral0`\n - `euiColorVisNeutral1`\n - `euiColorVisWarning1`\n - `euiColorVisRisk0`\n - `euiColorVisRisk1`\n- Updated the value of token `colors.vis.euiColorVisWarning0`\n([#8725](https://github.com/elastic/eui/pull/8725))\n\n**Bug fixes**\n\n- Fixed missing source map warnings emitted by some bundlers by\nexcluding source maps from being published\n([#8764](https://github.com/elastic/eui/pull/8764))\n- To align with `@elastic/eui` and many other popular packages, we made\na call to not ship source maps anymore\n\n**Breaking changes**\n\n- Renamed `colors.vis.euiColorVisNeutral0` to `euiColorVisBase0`\n([#8725](https://github.com/elastic/eui/pull/8725))\n\n\n\n---------\n\nCo-authored-by: Lene Gadewoll <[email protected]>\nCo-authored-by: Elastic Machine <[email protected]>","sha":"61ea2f398f8f8e2dcac7f36719557f6999ef6e9b"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223414","number":223414,"mergeCommit":{"message":"Upgrade EUI to v103.0.0 (#223414)\n\n`102.3.0` ⏩ `103.0.0`\n\n[Questions? Please see our Kibana upgrade\nFAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)\n\n## Changes\n\n[#8736](https://github.com/elastic/eui/pull/8736),\n[#8732](https://github.com/elastic/eui/pull/8732), and\n[#8732](elastic/eui#8732) include a number of\nsmall style tweaks `EuiResizableCollapseButton`, `EuiTitle`, and\n`EuiListGroupItem`.\n\n[#8756](elastic/eui#8756) and\n[#8744](elastic/eui#8744) rename a couple of\nicons:\n\n`questionInCircle` -> `question`\n`iInCircle` > `info`\n\nIn both cases, the old name is **backwards-compatible** (unless\nimporting directly from `assets` folder (see more in the release notes\nregarding that). However, the old name will eventually be deprecated as\na part of a larger set of deprecations.\n\n**No action is required at this time to handle this renaming. We will\nissue a dedicated PR to Kibana to replace the old names with the new\nnames in the future**\n\n[#8725](elastic/eui#8725) adds Sky Blue, Yellow,\nand Orange palettes to EUI's [color\npalettes](https://eui.elastic.co/docs/utilities/color-palettes/#recommended-quantitative-palettes),\nas well as new tokens for Risk, Neutral, and Warning.\n\n**[Breaking change]** Please note that as part of this change, the\nfollowing tokens have been renamed:\n`euiColorVisNeutral0` -> `euiColorVisBase0`\n`euiColorVisWarning0` -> `euiColorVisWarning1`\n\nThe original tokens still exist, but have been updated to use new colors\nin a way that would be breaking. This PR updates the existing references\nin 0b21d2d.\n\n## Package updates\n\n### `@elastic/eui`\n\n## [`v103.0.0`](https://github.com/elastic/eui/releases/v103.0.0)\n\n- Replaced `question` icon glyph\n([#8756](https://github.com/elastic/eui/pull/8756))\n- Updated `EuiResizableCollapseButton` to use an empty button\n([#8736](https://github.com/elastic/eui/pull/8736))\n- Added `info` icon glyph\n([#8744](https://github.com/elastic/eui/pull/8744))\n- Removed uppercase styling from `EuiText` `h6` headings to match\n`EuiTitle` ([#8732](https://github.com/elastic/eui/pull/8732))\n- Removed heavier font weight from `xs` and `s` `EuiListGroupItem` sizes\nfor consistency ([#8732](https://github.com/elastic/eui/pull/8732))\n- Updated the `font-weight` of default `EuiFilterButton` and\n`EuiButtonGroupButton` to `450`\n([#8734](https://github.com/elastic/eui/pull/8734))\n- Added color pallete functions and related hooks:\n([#8725](https://github.com/elastic/eui/pull/8725))\n - `euiPaletteSkyBlue`, `useEuiPaletteSkyBlue`\n - `euiPaletteYellow`, `useEuiPaletteYellow`\n - `euiPaletteOrange`, `useEuiPaletteOrange`\n- Added new tokens on `colors.vis`:\n([#8725](https://github.com/elastic/eui/pull/8725))\n - `euiColorVisNeutral0`\n - `euiColorVisNeutral1`\n - `euiColorVisWarning1`\n - `euiColorVisRisk0`\n - `euiColorVisRisk1`\n- Updated the value of token `colors.vis.euiColorVisWarning0`\n([#8725](https://github.com/elastic/eui/pull/8725))\n- Updated EuiFilterButton's `numActiveFilters` prop to accept percentage\nvalues ([#8705](https://github.com/elastic/eui/pull/8705))\n\n**Bug fixes**\n\n- Fixed visual positioning issue for notifications in\n`EuiHeaderSectionItemButton`\n([#8736](https://github.com/elastic/eui/pull/8736))\n- Fixed a visual issue where `EuiCollabsibleNavItem` did not have a\nvisible selected state\n([#8736](https://github.com/elastic/eui/pull/8736))\n- Fixed handling of unregistered code block languages in\n`EuiMarkdownFormat` ([#8729](https://github.com/elastic/eui/pull/8729))\n\n**Breaking changes**\n\n- Renamed `colors.vis.euiColorVisNeutral0` to `euiColorVisBase0`\n([#8725](https://github.com/elastic/eui/pull/8725))\n\n### `@elastic/eui-theme-borealis`\n\n##\n[`v2.0.0`](https://github.com/elastic/eui/blob/main/packages/eui-theme-borealis/changelogs/CHANGELOG_2025.md#v200)\n\n- Added new tokens on `colors.vis`:\n([#8725](https://github.com/elastic/eui/pull/8725))\n - `euiColorVisNeutral0`\n - `euiColorVisNeutral1`\n - `euiColorVisWarning1`\n - `euiColorVisRisk0`\n - `euiColorVisRisk1`\n- Updated the value of token `colors.vis.euiColorVisWarning0`\n([#8725](https://github.com/elastic/eui/pull/8725))\n\n**Bug fixes**\n\n- Fixed missing source map warnings emitted by some bundlers by\nexcluding source maps from being published\n([#8764](https://github.com/elastic/eui/pull/8764))\n- To align with `@elastic/eui` and many other popular packages, we made\na call to not ship source maps anymore\n\n**Breaking changes**\n\n- Renamed `colors.vis.euiColorVisNeutral0` to `euiColorVisBase0`\n([#8725](https://github.com/elastic/eui/pull/8725))\n\n\n\n---------\n\nCo-authored-by: Lene Gadewoll <[email protected]>\nCo-authored-by: Elastic Machine <[email protected]>","sha":"61ea2f398f8f8e2dcac7f36719557f6999ef6e9b"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
The logic for getting the list of fields usable in an aggregations is currently implemented in two places, and both do things slightly different.
This combines the two implementations into
aggConfig.getFieldOptions()
, which will return either anIndexedArray
of fields that can be used for the agg config's field param, ornull
if theaggConfig
does not have a field param.The purpose of these changes it to enable filtering the field list based on the properties of the agg (in this case the
scriptable
property) which fixes #8643