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

Fix k8s overview dashboard version #26972

Merged
merged 5 commits into from
Jul 21, 2021

Conversation

ChrsMark
Copy link
Member

What does this PR do?

Fixes version of Dashboard so as to avoid breaking the testing as was mentioned at #26919 (comment).

@ChrsMark ChrsMark added the Team:Integrations Label for the Integrations team label Jul 20, 2021
@ChrsMark ChrsMark self-assigned this Jul 20, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jul 20, 2021
@jsoriano jsoriano added backport-v7.14.0 Automated backport with mergify backport-v7.15.0 Automated backport with mergify labels Jul 20, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 20, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-07-20T15:56:08.342+0000

  • Duration: 136 min 15 sec

  • Commit: 9a90383

Test stats 🧪

Test Results
Failed 0
Passed 48780
Skipped 5267
Total 54047

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 48780
Skipped 5267
Total 54047

@jsoriano
Copy link
Member

Feel free to cherry-pick #26976 here to ensure that the dashboard is fixed.

@@ -399,7 +399,7 @@
"coreMigrationVersion": "7.14.0",
Copy link
Member

Choose a reason for hiding this comment

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

There are still some references to 7.14.

@ChrsMark
Copy link
Member Author

@jsoriano I guess this will need to be backported to 7.x and 7.14?

@jsoriano
Copy link
Member

@jsoriano I guess this will need to be backported to 7.x and 7.14?

Yes, I already added the labels 🙂

Signed-off-by: chrismark <[email protected]>
@ChrsMark
Copy link
Member Author

Tested locally too, so it should be ready for merge if CI goes green.

Screenshot 2021-07-20 at 2 55 21 PM

@jsoriano
Copy link
Member

Running the tests locally I see this error in kibana logs Document \"e0381d10-e4a6-11eb-9d53-3b3d1d47c519\" has property \"dashboard\" which belongs to a more recent version of Kibana [7.12.0]. The last known version is [7.11.0]:

{"type":"log","@timestamp":"2021-07-20T12:43:24+00:00","tags":["error","http"],"pid":9,"message":"Error: Document \"e0381d10-e4a6-11eb-9d53-3b3d1d47c519\" has property \"dashboard\" which belongs to a more recen
t version of Kibana [7.12.0]. The last known version is [7.11.0]\n    at /usr/share/kibana/src/core/server/saved_objects/migrations/core/document_migrator.js:600:27\n    at Array.find (<anonymous>)\n    at nextU
nmigratedProp (/usr/share/kibana/src/core/server/saved_objects/migrations/core/document_migrator.js:591:21)\n    at applyMigrations (/usr/share/kibana/src/core/server/saved_objects/migrations/core/document_migra
tor.js:337:18)\n    at DocumentMigrator.transformAndValidate [as transformDoc] (/usr/share/kibana/src/core/server/saved_objects/migrations/core/document_migrator.js:290:22)\n    at DocumentMigrator.migrate (/usr
/share/kibana/src/core/server/saved_objects/migrations/core/document_migrator.js:81:16)\n    at KibanaMigrator.migrateDocument (/usr/share/kibana/src/core/server/saved_objects/migrations/kibana/kibana_migrator.j
s:221:34)\n    at /usr/share/kibana/src/core/server/saved_objects/service/lib/repository.js:359:74\n    at Array.map (<anonymous>)\n    at SavedObjectsRepository.bulkCreate (/usr/share/kibana/src/core/server/sav
ed_objects/service/lib/repository.js:302:49)\n    at SavedObjectsClient.bulkCreate (/usr/share/kibana/src/core/server/saved_objects/service/saved_objects_client.js:46:35)\n    at EncryptedSavedObjectsClientWrapp
er.bulkCreate (/usr/share/kibana/x-pack/plugins/encrypted_saved_objects/server/saved_objects/encrypted_saved_objects_client_wrapper.js:69:93)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections
 (internal/process/task_queues.js:93:5)\n    at SpacesSavedObjectsClient.bulkCreate (/usr/share/kibana/x-pack/plugins/spaces/server/saved_objects/spaces_saved_objects_client.js:123:12)\n    at importDashboards (
/usr/share/kibana/src/plugins/legacy_export/server/lib/import/import_dashboards.js:31:19) {\n  data: {\n    id: 'e0381d10-e4a6-11eb-9d53-3b3d1d47c519',\n    type: 'dashboard',\n    attributes: {\n      descripti
on: 'Overview of Kubernetes cluster metrics',\n      hits: 0,\n      kibanaSavedObjectMeta: [Object],\n      optionsJSON: '{\"darkTheme\": false, \"useMargins\": false}',\n      panelsJSON: '[{\"embeddableConfig
\": {\"enhancements\": {}}, \"gridData\": {\"h\": 12, \"i\": \"1\", \"w\": 24, \"x\": 24, \"y\": 0}, \"panelIndex\": \"1\", \"panelRefName\": \"panel_1\", \"type\": \"visualization\", \"version\": \"7.12.0\"}, {
\"embeddableConfig\": {\"enhancements\": {}}, \"gridData\": {\"h\": 12, \"i\": \"2\", \"w\": 24, \"x\": 0, \"y\": 24}, \"panelIndex\": \"2\", \"panelRefName\": \"panel_2\", \"type\": \"visualization\", \"version
\": \"7.12.0\"}, {\"embeddableConfig\": {\"enhancements\": {}}, \"gridData\": {\"h\": 12, \"i\": \"5\", \"w\": 7, \"x\": 9, \"y\": 0}, \"panelIndex\": \"5\", \"panelRefName\": \"panel_5\", \"type\": \"visualizat
ion\", \"version\": \"7.12.0\"}, {\"embeddableConfig\": {\"enhancements\": {}}, \"gridData\": {\"h\": 12, \"i\": \"6\", \"w\": 8, \"x\": 0, \"y\": 12}, \"panelIndex\": \"6\", \"panelRefName\": \"panel_6\", \"typ
e\": \"visualization\", \"version\": \"7.12.0\"}, {\"embeddableConfig\": {\"enhancements\": {}}, \"gridData\": {\"h\": 12, \"i\": \"7\", \"w\": 24, \"x\": 24, \"y\": 24}, \"panelIndex\": \"7\", \"panelRefName\":
 \"panel_7\", \"type\": \"visualization\", \"version\": \"7.12.0\"}, {\"embeddableConfig\": {\"enhancements\": {}}, \"gridData\": {\"h\": 12, \"i\": \"8\", \"w\": 24, \"x\": 24, \"y\": 36}, \"panelIndex\": \"8\"
, \"panelRefName\": \"panel_8\", \"type\": \"visualization\", \"version\": \"7.12.0\"}, {\"embeddableConfig\": {\"enhancements\": {}}, \"gridData\": {\"h\": 12, \"i\": \"9\", \"w\": 24, \"x\": 0, \"y\": 36}, \"p
anelIndex\": \"9\", \"panelRefName\": \"panel_9\", \"type\": \"visualization\", \"version\": \"7.12.0\"}, {\"embeddableConfig\": {\"enhancements\": {}}, \"gridData\": {\"h\": 12, \"i\": \"10\", \"w\": 8, \"x\": 
16, \"y\": 0}, \"panelIndex\": \"10\", \"panelRefName\": \"panel_10\", \"type\": \"visualization\", \"version\": \"7.12.0\"}, {\"embeddableConfig\": {\"enhancements\": {}}, \"gridData\": {\"h\": 12, \"i\": \"11\
", \"w\": 24, \"x\": 0, \"y\": 48}, \"panelIndex\": \"11\", \"panelRefName\": \"panel_11\", \"type\": \"visualization\", \"version\": \"7.12.0\"}, {\"embeddableConfig\": {\"enhancements\": {}}, \"gridData\": {\"
h\": 12, \"i\": \"12\", \"w\": 24, \"x\": 24, \"y\": 48}, \"panelIndex\": \"12\", \"panelRefName\": \"panel_12\", \"type\": \"visualization\", \"version\": \"7.12.0\"}, {\"embeddableConfig\": {\"enhancements\": 
{}}, \"gridData\": {\"h\": 12, \"i\": \"13\", \"w\": 8, \"x\": 16, \"y\": 12}, \"panelIndex\": \"13\", \"panelRefName\": \"panel_13\", \"type\": \"visualization\", \"version\": \"7.12.0\"}, {\"embeddableConfig\"
: {\"enhancements\": {}}, \"gridData\": {\"h\": 12, \"i\": \"14\", \"w\": 24, \"x\": 24, \"y\": 12}, \"panelIndex\": \"14\", \"panelRefName\": \"panel_14\", \"type\": \"visualization\", \"version\": \"7.12.0\"},
 {\"embeddableConfig\": {\"enhancements\": {}}, \"gridData\": {\"h\": 12, \"i\": \"15\", \"w\": 8, \"x\": 8, \"y\": 12}, \"panelIndex\": \"15\", \"panelRefName\": \"panel_15\", \"type\": \"visualization\", \"ver
sion\": \"7.12.0\"}, {\"embeddableConfig\": {\"enhancements\": {}}, \"gridData\": {\"h\": 12, \"i\": \"43e2c937-a06e-4f6c-9e01-e2669110f160\", \"w\": 9, \"x\": 0, \"y\": 0}, \"panelIndex\": \"43e2c937-a06e-4f6c-
9e01-e2669110f160\", \"panelRefName\": \"panel_43e2c937-a06e-4f6c-9e01-e2669110f160\", \"type\": \"visualization\", \"version\": \"7.12.0\"}]',\n      timeRestore: false,\n      title: '[Metricbeat Kubernetes] O
verview ECS',\n      version: 1\n    },\n    migrationVersion: { dashboard: '7.12.0' },\n    updated_at: '2021-07-20T12:43:24.779Z',\n    references: [\n      [Object], [Object],\n      [Object], [Object],\n    
  [Object], [Object],\n      [Object], [Object],\n      [Object], [Object],\n      [Object], [Object],\n      [Object], [Object]\n    ],\n    originId: undefined\n  },\n  isBoom: true,\n  isServer: false,\n  out
put: {\n    statusCode: 422,\n    payload: {\n      statusCode: 422,\n      error: 'Unprocessable Entity',\n      message: 'Document \"e0381d10-e4a6-11eb-9d53-3b3d1d47c519\" has property \"dashboard\" which belo
ngs to a more recent version of Kibana [7.12.0]. The last known version is [7.11.0]'\n    },\n    headers: {}\n  }\n}"}
{"type":"error","@timestamp":"2021-07-20T12:43:24+00:00","tags":[],"pid":9,"level":"error","error":{"message":"Internal Server Error","name":"Error","stack":"Error: Internal Server Error\n    at HapiResponseAdap
ter.toInternalError (/usr/share/kibana/src/core/server/http/router/response_adapter.js:58:19)\n    at Router.handle (/usr/share/kibana/src/core/server/http/router/router.js:177:34)\n    at runMicrotasks (<anonym
ous>)\n    at processTicksAndRejections (internal/process/task_queues.js:93:5)\n    at handler (/usr/share/kibana/src/core/server/http/router/router.js:124:50)\n    at exports.Manager.execute (/usr/share/kibana/
node_modules/@hapi/hapi/lib/toolkit.js:60:28)\n    at Object.internals.handler (/usr/share/kibana/node_modules/@hapi/hapi/lib/handler.js:46:20)\n    at exports.execute (/usr/share/kibana/node_modules/@hapi/hapi/
lib/handler.js:31:20)\n    at Request._lifecycle (/usr/share/kibana/node_modules/@hapi/hapi/lib/request.js:370:32)\n    at Request._execute (/usr/share/kibana/node_modules/@hapi/hapi/lib/request.js:279:9)"},"url
":"http://172.28.0.3:5601/api/kibana/dashboards/import?exclude=index-pattern&force=true","message":"Internal Server Error"}

Maybe this is using the versions of the stack in metricbeat/docker-compose.yml 🤔

Did you try with 7.12? If you did and it worked for you maybe you can try to export the dashboard from this version.

Signed-off-by: chrismark <[email protected]>
@ChrsMark
Copy link
Member Author

I pinned the version to 7.11.0. I'm not sure why it is failing since #24957 should had updated the versions of the testing stack to 7.12.0.

@ChrsMark ChrsMark merged commit 4da1594 into elastic:master Jul 21, 2021
mergify bot pushed a commit that referenced this pull request Jul 21, 2021
mergify bot pushed a commit that referenced this pull request Jul 21, 2021
ChrsMark added a commit that referenced this pull request Jul 21, 2021
(cherry picked from commit 4da1594)

Co-authored-by: Chris Mark <[email protected]>
ChrsMark added a commit that referenced this pull request Jul 21, 2021
(cherry picked from commit 4da1594)

Co-authored-by: Chris Mark <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.14.0 Automated backport with mergify backport-v7.15.0 Automated backport with mergify Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants