lensapp / lens

Lens - The way the world runs Kubernetes
https://k8slens.dev/
MIT License
22.49k stars 1.46k forks source link

Error: are too far apart with stepSize of 1 minute #8067

Open Dunge opened 3 months ago

Dunge commented 3 months ago

Describe the bug Getting an error stack randomly since a few days

To Reproduce Click on a statefulset or node view

Environment: Windows 2024.5.271333-latest

Logs:

Component stack:

    at LensChart (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:621281:17)
    at observerComponent (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:268056:16)
    at div
    at div
    at observerComponent (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:268056:16)
    at div
    at NonInjectedMetricsWrapper (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:105444:36)
    at observerComponent (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:268056:16)
    at observerComponent (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:268056:16)
    at Component16
    at div
    at div
    at div
    at NonInjectedAnimate (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:568751:34)
    at NonInjectedDrawer (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:631873:25)
    at observerComponent (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:268056:16)
    at ObserverComponent (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:268104:23)
    at NonInjectedErrorBoundary (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:633171:32)
    at observerComponent (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:268056:16)
    at ObserverComponent (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:268104:23)
    at observerComponent (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:268056:16)
    at NonInjectedKeyboardShortcutListener (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:637940:3)
    at ThemeProvider (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:133241:24)
    at https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:585343:18
    at Router (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:500217:30)
    at https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:585343:18
    at observerComponent (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:268056:16)
Error stack:

Error: 1698801866000 and 1720040515000 are too far apart with stepSize of 1 minute
    at TimeScale._generate (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:670533:19)
    at TimeScale.buildTicks (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:670467:92)
    at TimeScale.update (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:663215:27)
    at fitBoxes (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:662341:13)
    at Object.update (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:662471:13)
    at Chart._updateLayout (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:665293:17)
    at Chart.update (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:665224:14)
    at new Chart (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:664984:18)
    at LensChart.renderChart (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:621389:20)
    at LensChart.componentDidMount (https://49996e8a7a3a89b1dd29d46bf98c992a.lens.app:55428/build/lens.js?05186eb8617cb65d0df7:621291:12)
panuhorsmalahti commented 3 months ago

It seems there is some metrics data that spans from Nov 1, 2023 to Jul 4, 2024, and this is too long with the default step size. Any idea why there would be so much data?

I wonder if there is event that happened in Nov 1, as we also show events in the chart.

That said, Lens should handle even this data properly.