Skip to content

Commit

Permalink
[8.12] [Infra] Fixing Derivative aggregation on kubernetes pods (elas…
Browse files Browse the repository at this point in the history
…tic#177295) (elastic#177366)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Infra] Fixing Derivative aggregation on kubernetes pods
(elastic#177295)](elastic#177295)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Cauê
Marcondes","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-02-20T19:05:23Z","message":"[Infra]
Fixing Derivative aggregation on kubernetes pods (elastic#177295)\n\ncloses
https://github.com/elastic/kibana/issues/177294\r\n\r\n<img
width=\"398\" alt=\"Screenshot 2024-02-20 at 14 00
41\"\r\nsrc=\"https://github.com/elastic/kibana/assets/55978943/5a7851b2-79ef-45c3-8e67-2610012a3d06\">\r\n\r\nHow
to test:\r\n- Open Inventory page\r\n- Filter by Kubernetes pods\r\n-
Hover over any
pod","sha":"4bf3e772388cf2d93e9441f0082aa634425bc1d9","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v8.12.0","v8.13.0","v8.14.0"],"title":"[Infra]
Fixing Derivative aggregation on kubernetes
pods","number":177295,"url":"https://github.com/elastic/kibana/pull/177295","mergeCommit":{"message":"[Infra]
Fixing Derivative aggregation on kubernetes pods (elastic#177295)\n\ncloses
https://github.com/elastic/kibana/issues/177294\r\n\r\n<img
width=\"398\" alt=\"Screenshot 2024-02-20 at 14 00
41\"\r\nsrc=\"https://github.com/elastic/kibana/assets/55978943/5a7851b2-79ef-45c3-8e67-2610012a3d06\">\r\n\r\nHow
to test:\r\n- Open Inventory page\r\n- Filter by Kubernetes pods\r\n-
Hover over any
pod","sha":"4bf3e772388cf2d93e9441f0082aa634425bc1d9"}},"sourceBranch":"main","suggestedTargetBranches":["8.12","8.13"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/177295","number":177295,"mergeCommit":{"message":"[Infra]
Fixing Derivative aggregation on kubernetes pods (elastic#177295)\n\ncloses
https://github.com/elastic/kibana/issues/177294\r\n\r\n<img
width=\"398\" alt=\"Screenshot 2024-02-20 at 14 00
41\"\r\nsrc=\"https://github.com/elastic/kibana/assets/55978943/5a7851b2-79ef-45c3-8e67-2610012a3d06\">\r\n\r\nHow
to test:\r\n- Open Inventory page\r\n- Filter by Kubernetes pods\r\n-
Hover over any
pod","sha":"4bf3e772388cf2d93e9441f0082aa634425bc1d9"}}]}] BACKPORT-->

Co-authored-by: Cauê Marcondes <[email protected]>
  • Loading branch information
kibanamachine and cauemarcondes authored Feb 21, 2024
1 parent 5a8c34e commit 3d70bec
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface Props {
}
export const SnapshotContainer = ({ render }: Props) => {
const { sourceId } = useSourceContext();
const { metric, groupBy, nodeType, accountId, region, view } = useWaffleOptionsContext();
const { metric, groupBy, nodeType, accountId, region } = useWaffleOptionsContext();
const { currentTime } = useWaffleTimeContext();
const { filterQueryAsJson } = useWaffleFiltersContext();
const {
Expand All @@ -44,7 +44,6 @@ export const SnapshotContainer = ({ render }: Props) => {
accountId,
region,
sendRequestImmediately: false,
includeTimeseries: view === 'table',
},
{
abortable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ describe('ConditionalToolTip', () => {
filterQuery: expectedQuery,
metrics: expectedMetrics,
groupBy: [],
includeTimeseries: false,
nodeType: 'host',
sourceId: 'default',
currentTime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export const ConditionalToolTip = ({ node, nodeType, currentTime }: Props) => {
currentTime: requestCurrentTime.current,
accountId: '',
region: '',
includeTimeseries: false,
},
{
abortable: true,
Expand Down
32 changes: 16 additions & 16 deletions x-pack/test/functional/apps/infra/home_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await retry.try(async () => {
const nodesWithValue = await pageObjects.infraHome.getNodesWithValues();
expect(nodesWithValue).to.eql([
{ name: 'demo-stack-apache-01', value: 1.2, color: '#6092c0' },
{ name: 'demo-stack-mysql-01', value: 1, color: '#93b1d3' },
{ name: 'demo-stack-nginx-01', value: 0.9, color: '#b2c7df' },
{ name: 'demo-stack-redis-01', value: 0.8, color: '#b2c7df' },
{ name: 'demo-stack-apache-01', value: 1.4, color: '#6092c0' },
{ name: 'demo-stack-mysql-01', value: 1.2, color: '#82a7cd' },
{ name: 'demo-stack-nginx-01', value: 1.1, color: '#93b1d3' },
{ name: 'demo-stack-redis-01', value: 1, color: '#a2bcd9' },
{ name: 'demo-stack-haproxy-01', value: 0.8, color: '#c2d2e6' },
{ name: 'demo-stack-client-01', value: 0.5, color: '#f0f4f9' },
{ name: 'demo-stack-client-01', value: 0.6, color: '#f0f4f9' },
]);
});
});
Expand All @@ -256,12 +256,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await retry.try(async () => {
const nodesWithValue = await pageObjects.infraHome.getNodesWithValues();
expect(nodesWithValue).to.eql([
{ name: 'demo-stack-client-01', value: 0.5, color: '#f0f4f9' },
{ name: 'demo-stack-client-01', value: 0.6, color: '#f0f4f9' },
{ name: 'demo-stack-haproxy-01', value: 0.8, color: '#c2d2e6' },
{ name: 'demo-stack-redis-01', value: 0.8, color: '#b2c7df' },
{ name: 'demo-stack-nginx-01', value: 0.9, color: '#b2c7df' },
{ name: 'demo-stack-mysql-01', value: 1, color: '#93b1d3' },
{ name: 'demo-stack-apache-01', value: 1.2, color: '#6092c0' },
{ name: 'demo-stack-redis-01', value: 1, color: '#a2bcd9' },
{ name: 'demo-stack-nginx-01', value: 1.1, color: '#93b1d3' },
{ name: 'demo-stack-mysql-01', value: 1.2, color: '#82a7cd' },
{ name: 'demo-stack-apache-01', value: 1.4, color: '#6092c0' },
]);
});
});
Expand All @@ -282,7 +282,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await retry.try(async () => {
const nodesWithValue = await pageObjects.infraHome.getNodesWithValues();
expect(nodesWithValue).to.eql([
{ name: 'demo-stack-apache-01', value: 1.2, color: '#6092c0' },
{ name: 'demo-stack-apache-01', value: 1.4, color: '#6092c0' },
]);
});
await pageObjects.infraHome.clearSearchTerm();
Expand All @@ -295,12 +295,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await retry.try(async () => {
const nodesWithValue = await pageObjects.infraHome.getNodesWithValues();
expect(nodesWithValue).to.eql([
{ name: 'demo-stack-client-01', value: 0.5, color: '#6092c0' },
{ name: 'demo-stack-client-01', value: 0.6, color: '#6092c0' },
{ name: 'demo-stack-haproxy-01', value: 0.8, color: '#b5c9df' },
{ name: 'demo-stack-redis-01', value: 0.8, color: '#d0dcea' },
{ name: 'demo-stack-nginx-01', value: 0.9, color: '#d0dcea' },
{ name: 'demo-stack-mysql-01', value: 1, color: '#eec096' },
{ name: 'demo-stack-apache-01', value: 1.2, color: '#e7664c' },
{ name: 'demo-stack-redis-01', value: 1, color: '#f1d9b9' },
{ name: 'demo-stack-nginx-01', value: 1.1, color: '#eec096' },
{ name: 'demo-stack-mysql-01', value: 1.2, color: '#eba47a' },
{ name: 'demo-stack-apache-01', value: 1.4, color: '#e7664c' },
]);
});
});
Expand Down

0 comments on commit 3d70bec

Please sign in to comment.