Skip to content
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

Update dependency @elastic/charts to v37 (master) #113968

Merged
merged 17 commits into from
Oct 12, 2021

Conversation

markov00
Copy link
Member

@markov00 markov00 commented Oct 5, 2021

[skip-ci]

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@elastic/charts 34.2.1 -> 37.0.0 age adoption passing confidence

The code changes are due to the following @elastic/charts breaking changes:

  • the textContrast textInvertible and textOpacity in the Font type has been removed. This affect the HeatmapConfig type in the cell.label, xAxisLabel, and yAxisLabel properties. This also affect the PartitionConfig properties: fillLabel and linkLabel. The textInvertible and textContrast properties are also removed from the DisplayValueStyle used to display bar values labels. The mentioned changes are replaced with the following behavior: always invert the text color depending on the color contrast with its background using pure black or white colors.

  • on Heatmap the config.label.fontSize prop is replaced by config.label.minFontSize and config.label.maxFontSize. You can specify the same value for both properties to have a fixed font size.
    The config.label.align and config.label.baseline props are removed from the HeatmapConfig object. These props handle the alignment of the text within the text and they are not currently compatible with the font size scaling feature introduced. Is not very common to change the alignment of text within rectangular boxes where the centered option is the most used one

  • on Heatmap the onBrushEnd props was moved from the config to the Settings. The onBrushEndListener prop signature was changed to type BrushEndListener = (brushEvent: XYBrushEvent | HeatmapBrushEvent) => void;

  • The public type varieties for domains are discontinued, in favor of retaining the single DomainRange export, which now has a mandatory {min: number, max: number}. The developer can supply NaN where a finite min, max or both aren't defined (ie. in place of former effective undefined)


Release Notes

elastic/elastic-charts

37.0.0 (2021-10-05)

Bug Fixes

  • debug: add predictable axis labels sorting order (#1418) (60fbe7a)
  • deps: update dependency @elastic/eui to ^38.1.0 (#1409) (4ffd018)
  • deps: update dependency @elastic/eui to ^38.2.0 (#1416) (34707c3)

Code Refactoring

BREAKING CHANGES

  • DEFAULT_CHART_MARGINS, DEFAULT_GEOMETRY_STYLES, DEFAULT_CHART_PADDING and DEFAULT_MISSING_COLOR are no longer exposed as part of the API
  • The public type varieties for domains are discontinued, in favor of retaining the single DomainRange export, which now has a mandatory {min: number, max: number}. The developer can supply NaN where a finite min, max or both aren't defined (ie. in place of former effective undefined). In addition, some console.warn punctuations changed

Co-authored-by: Marco Vettorello [email protected]
Co-authored-by: Nick Partridge [email protected]

36.0.0 (2021-09-15)

Features

  • heatmap: move onBrushEnd from config to Settings (#1369) (409a0c4)

BREAKING CHANGES

  • heatmap: remove onBrushEnd from heatmap config and merge onBrushEnd in Settings with cartesian onBrushEnd

35.0.0 (2021-09-13)

Bug Fixes

  • a11y: restore focus after popover close with color picker (#1272) (0c6f945), closes #1266 #935
  • build: fix license in package.json (#1362) (d524fdf)
  • deps: update dependency @elastic/eui to ^37.5.0 (#1341) (fb05c98)
  • deps: update dependency @elastic/eui to ^37.6.1 (#1359) (2ae90ce)
  • deps: update dependency @elastic/eui to ^37.7.0 (#1373) (553b6b0)
  • heatmap: filter out tooltip picked shapes in x-axis area (#1351) (174047d), closes #1215
  • heatmap: remove values when brushing only over axes (#1364) (77ff8d3)

Features

BREAKING CHANGES

  • xy: - feat: removes the axis deduplication feature
  • fix: showDuplicatedTicks causes a duplication check on the actual axis tick label (possibly yielded by Axis.tickLabel rather than the more general tickFormat)
  • heatmap: the config.label.fontSize prop is replaced by config.label.minFontSize and config.label.maxFontSize. You can specify the same value for both properties to have a fixed font size. The config.label.align and config.label.baseline props are removed from the HeatmapConfig object.

@markov00 markov00 added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v7.16.0 labels Oct 5, 2021
Comment on lines +268 to +272
const allPieSlicesColor = await pieChart.getAllPieSliceColor('80,000');
const whitePieSliceCounts = allPieSlicesColor.reduce((count, color) => {
// converting the color to a common format, testing the color, not the string format
return chroma(color).hex().toUpperCase() === '#FFFFFF' ? count + 1 : count;
}, 0);
Copy link
Member Author

Choose a reason for hiding this comment

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

I've relaxed this check to verify that the color on the slice is white removing the check of the actual color string format.
getAllPieSliceStyles was also renamed to getAllPieSliceColor because we always return a set of colors, not styles

@markov00 markov00 marked this pull request as ready for review October 7, 2021 16:53
@markov00 markov00 requested review from a team as code owners October 7, 2021 16:53
@markov00
Copy link
Member Author

@elasticmachine merge upstream

@botelastic botelastic bot added Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability labels Oct 11, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

Copy link
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

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

Uptime Changes LGTM !!

@@ -91,7 +92,7 @@ export const DocumentCountChart: FC<Props> = ({
[data]
);

const onBrushEnd: BrushEndListener = ({ x }) => {
const onBrushEnd = ({ x }: XYBrushEvent) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove BrushEndListener here if it is force casted below then?

Copy link
Member Author

Choose a reason for hiding this comment

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

At the moment we have two ways of doing that:

  • force casting it as BrushEndListener
  • force casting the arguments of the BrushEndListener to XYBrushEvent

Both methods are not ideal at the moment. We will introduce soon a better type system for those union types (probably through a property to discriminate between union types)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I understand that. I was asking as in this component both routes have been chosen: force casting the arguments and few lines below force casting the function.
My point was: can we leave the force cast in one place rather than duplicate?

Not a big blocker, just curious on the reasons of the move.

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

ML changes LGTM

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

Data Discovery team owned files LGTM, just type changes. Didn't test.

Copy link
Member

@sabarasaba sabarasaba left a comment

Choose a reason for hiding this comment

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

watcher changes lgtm, didn't test locally

@markov00
Copy link
Member Author

markov00 commented Oct 11, 2021

10:29:55     │ proc [kibana]  FATAL  Error: Port 61191 is already in use. Another instance of Kibana may be running!

Something flaky is going on with the last CI run

@markov00
Copy link
Member Author

@elasticmachine merge upstream

Copy link
Contributor

@smith smith left a comment

Choose a reason for hiding this comment

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

APM changes look good

@markov00
Copy link
Member Author

@elasticmachine merge upstream

unrelated issues in CI

@kibanamachine
Copy link
Contributor

kibanamachine commented Oct 11, 2021

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / general / X-Pack Accessibility Tests.x-pack/test/accessibility/apps/index_lifecycle_management·ts.Index Lifecycle Management "before all" hook for "Add policy to index template modal"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 2 times on tracked branches: https://github.com/elastic/kibana/issues/114541

[00:00:00]     │
[00:06:02]       └-: Index Lifecycle Management
[00:06:02]         └-> "before all" hook for "Add policy to index template modal"
[00:06:02]         └-> "before all" hook for "Add policy to index template modal"
[00:06:02]           │ info Taking screenshot "/dev/shm/workspace/parallel/21/kibana/x-pack/test/functional/screenshots/failure/Index Lifecycle Management _before all_ hook for _Add policy to index template modal_.png"
[00:06:02]           │ info Current URL is: http://localhost:61211/app/management/ingest/ingest_pipelines/create
[00:06:02]           │ info Saving page source to: /dev/shm/workspace/parallel/21/kibana/x-pack/test/functional/failure_debug/html/Index Lifecycle Management _before all_ hook for _Add policy to index template modal_.html
[00:06:02]           └- ✖ fail: Index Lifecycle Management "before all" hook for "Add policy to index template modal"
[00:06:02]           │      ResponseError: illegal_argument_exception: [illegal_argument_exception] Reason: no such repository [test], the snapshot repository referenced by the [searchable_snapshot] action in the [frozen] phase must exist before it can be referenced by an ILM policy
[00:06:02]           │       at onBody (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:361:23)
[00:06:02]           │       at IncomingMessage.onEnd (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:285:11)
[00:06:02]           │       at endReadableNT (internal/streams/readable.js:1317:12)
[00:06:02]           │       at processTicksAndRejections (internal/process/task_queues.js:82:21)
[00:06:02]           │ 
[00:06:02]           │ 

Stack Trace

ResponseError: illegal_argument_exception: [illegal_argument_exception] Reason: no such repository [test], the snapshot repository referenced by the [searchable_snapshot] action in the [frozen] phase must exist before it can be referenced by an ILM policy
    at onBody (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:361:23)
    at IncomingMessage.onEnd (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:285:11)
    at endReadableNT (internal/streams/readable.js:1317:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  meta: {
    body: { error: [Object], status: 400 },
    statusCode: 400,
    headers: {
      'x-elastic-product': 'Elasticsearch',
      'content-type': 'application/json;charset=utf-8',
      'content-length': '487'
    },
    meta: {
      context: null,
      request: [Object],
      name: 'elasticsearch-js',
      connection: [Object],
      attempts: 0,
      aborted: false
    }
  }
}

Kibana Pipeline / general / X-Pack Accessibility Tests.x-pack/test/accessibility/apps/index_lifecycle_management·ts.Index Lifecycle Management "after all" hook for "Index templates flyout"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 2 times on tracked branches: https://github.com/elastic/kibana/issues/114542

[00:00:00]     │
[00:06:02]       └-: Index Lifecycle Management
[00:06:02]         └-> "before all" hook for "Add policy to index template modal"
[00:06:02]         └-> "before all" hook for "Add policy to index template modal"
[00:06:02]           │ info Taking screenshot "/dev/shm/workspace/parallel/21/kibana/x-pack/test/functional/screenshots/failure/Index Lifecycle Management _before all_ hook for _Add policy to index template modal_.png"
[00:06:02]           │ info Current URL is: http://localhost:61211/app/management/ingest/ingest_pipelines/create
[00:06:02]           │ info Saving page source to: /dev/shm/workspace/parallel/21/kibana/x-pack/test/functional/failure_debug/html/Index Lifecycle Management _before all_ hook for _Add policy to index template modal_.html
[00:06:02]           └- ✖ fail: Index Lifecycle Management "before all" hook for "Add policy to index template modal"
[00:06:02]           │      ResponseError: illegal_argument_exception: [illegal_argument_exception] Reason: no such repository [test], the snapshot repository referenced by the [searchable_snapshot] action in the [frozen] phase must exist before it can be referenced by an ILM policy
[00:06:02]           │       at onBody (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:361:23)
[00:06:02]           │       at IncomingMessage.onEnd (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:285:11)
[00:06:02]           │       at endReadableNT (internal/streams/readable.js:1317:12)
[00:06:02]           │       at processTicksAndRejections (internal/process/task_queues.js:82:21)
[00:06:02]           │ 
[00:06:02]           │ 
[00:06:02]           └-> "after all" hook for "Index templates flyout"
[00:06:02]             │ info Taking screenshot "/dev/shm/workspace/parallel/21/kibana/x-pack/test/functional/screenshots/failure/Index Lifecycle Management _after all_ hook for _Index templates flyout_.png"
[00:06:02]             │ info Current URL is: http://localhost:61211/app/management/ingest/ingest_pipelines/create
[00:06:02]             │ info Saving page source to: /dev/shm/workspace/parallel/21/kibana/x-pack/test/functional/failure_debug/html/Index Lifecycle Management _after all_ hook for _Index templates flyout_.html
[00:06:02]             └- ✖ fail: Index Lifecycle Management "after all" hook for "Index templates flyout"
[00:06:02]             │      ResponseError: resource_not_found_exception: [resource_not_found_exception] Reason: Lifecycle policy not found: ilm-a11y-test
[00:06:02]             │       at onBody (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:361:23)
[00:06:02]             │       at IncomingMessage.onEnd (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:285:11)
[00:06:02]             │       at endReadableNT (internal/streams/readable.js:1317:12)
[00:06:02]             │       at processTicksAndRejections (internal/process/task_queues.js:82:21)
[00:06:02]             │ 
[00:06:02]             │ 

Stack Trace

ResponseError: resource_not_found_exception: [resource_not_found_exception] Reason: Lifecycle policy not found: ilm-a11y-test
    at onBody (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:361:23)
    at IncomingMessage.onEnd (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:285:11)
    at endReadableNT (internal/streams/readable.js:1317:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  meta: {
    body: { error: [Object], status: 404 },
    statusCode: 404,
    headers: {
      'x-elastic-product': 'Elasticsearch',
      'content-type': 'application/json;charset=utf-8',
      'content-length': '223'
    },
    meta: {
      context: null,
      request: [Object],
      name: 'elasticsearch-js',
      connection: [Object],
      attempts: 0,
      aborted: false
    }
  }
}

Kibana Pipeline / general / X-Pack Accessibility Tests.x-pack/test/accessibility/apps/index_lifecycle_management·ts.Index Lifecycle Management "before all" hook for "Add policy to index template modal"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 2 times on tracked branches: https://github.com/elastic/kibana/issues/114541

[00:00:00]     │
[00:06:08]       └-: Index Lifecycle Management
[00:06:08]         └-> "before all" hook for "Add policy to index template modal"
[00:06:08]         └-> "before all" hook for "Add policy to index template modal"
[00:06:08]           │ info Taking screenshot "/dev/shm/workspace/parallel/21/kibana/x-pack/test/functional/screenshots/failure/Index Lifecycle Management _before all_ hook for _Add policy to index template modal_.png"
[00:06:08]           │ info Current URL is: http://localhost:61211/app/management/ingest/ingest_pipelines/create
[00:06:08]           │ info Saving page source to: /dev/shm/workspace/parallel/21/kibana/x-pack/test/functional/failure_debug/html/Index Lifecycle Management _before all_ hook for _Add policy to index template modal_.html
[00:06:08]           └- ✖ fail: Index Lifecycle Management "before all" hook for "Add policy to index template modal"
[00:06:08]           │      ResponseError: illegal_argument_exception: [illegal_argument_exception] Reason: no such repository [test], the snapshot repository referenced by the [searchable_snapshot] action in the [frozen] phase must exist before it can be referenced by an ILM policy
[00:06:08]           │       at onBody (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:361:23)
[00:06:08]           │       at IncomingMessage.onEnd (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:285:11)
[00:06:08]           │       at endReadableNT (internal/streams/readable.js:1317:12)
[00:06:08]           │       at processTicksAndRejections (internal/process/task_queues.js:82:21)
[00:06:08]           │ 
[00:06:08]           │ 

Stack Trace

ResponseError: illegal_argument_exception: [illegal_argument_exception] Reason: no such repository [test], the snapshot repository referenced by the [searchable_snapshot] action in the [frozen] phase must exist before it can be referenced by an ILM policy
    at onBody (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:361:23)
    at IncomingMessage.onEnd (/dev/shm/workspace/parallel/21/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:285:11)
    at endReadableNT (internal/streams/readable.js:1317:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  meta: {
    body: { error: [Object], status: 400 },
    statusCode: 400,
    headers: {
      'x-elastic-product': 'Elasticsearch',
      'content-type': 'application/json;charset=utf-8',
      'content-length': '487'
    },
    meta: {
      context: null,
      request: [Object],
      name: 'elasticsearch-js',
      connection: [Object],
      attempts: 0,
      aborted: false
    }
  }
}

and 2 more failures, only showing the first 3.

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
lens 1.0MB 1.0MB +104.0B
ml 3.6MB 3.6MB -56.0B
observability 361.9KB 361.9KB -12.0B
stackAlerts 159.0KB 159.0KB +8.0B
uptime 568.6KB 568.6KB +8.0B
visTypePie 51.1KB 51.1KB -18.0B
visTypeTimelion 92.5KB 92.6KB +98.0B
visTypeXy 61.8KB 61.7KB -131.0B
watcher 271.3KB 271.3KB +8.0B
total +9.0B

Page load bundle

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

id before after diff
kbnUiSharedDeps-npmDll 5.1MB 5.1MB +13.8KB

History

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

@mistic
Copy link
Member

mistic commented Oct 11, 2021

@elasticmachine merge upstream

@markov00
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

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
lens 1.0MB 1.0MB +104.0B
ml 3.6MB 3.6MB -56.0B
observability 361.9KB 361.9KB -12.0B
stackAlerts 159.0KB 159.0KB +8.0B
uptime 568.6KB 568.6KB +8.0B
visTypePie 51.1KB 51.1KB -18.0B
visTypeTimelion 92.5KB 92.6KB +98.0B
visTypeXy 61.8KB 61.7KB -131.0B
watcher 271.3KB 271.3KB +8.0B
total +9.0B

Page load bundle

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

id before after diff
kbnUiSharedDeps-npmDll 5.1MB 5.1MB +13.8KB

History

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

Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

Discussed offline about the typings thing and sorted out.
Tested locally and all good. 👍

Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Presentation team changes LGTM! Anything that makes the dashboard_state functional test better is a win in my books, thanks for doing this @markov00

@markov00 markov00 merged commit ff1b014 into elastic:master Oct 12, 2021
@markov00 markov00 deleted the 2021_10_05-upgrade_ech_v37 branch October 12, 2021 14:36
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 12, 2021
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

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 buildkite-ci release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.16.0 v8.0.0
Projects
None yet