[Dataset Quality] Fix failing test on mki qa#196122
[Dataset Quality] Fix failing test on mki qa#196122achyutjhunjhunwala merged 38 commits intoelastic:mainfrom
Conversation
dmlemeshko
left a comment
There was a problem hiding this comment.
Code change lgtm, left few questions. Please give it a run against MKI before merging.
| try { | ||
| await this.client.cluster.putComponentTemplate({ | ||
| name, | ||
| template: { | ||
| mappings, | ||
| }, | ||
| }); | ||
| this.logger.info(`Component template successfully created: ${name}`); | ||
| } catch (err) { | ||
| this.logger.error(`Component template creation failed: ${name} - ${err.message}`); | ||
| } |
There was a problem hiding this comment.
Does it make sense to continue with test run when component template does not exist/failed to create?
There was a problem hiding this comment.
Well The only use case, where they will fail to create, would be either a Network issue or User roles and right issue. In that case, the test would fail.
There was a problem hiding this comment.
If it is required by test to exist, I suggest throwing an error instead of just logging it. Thoughts?
⏳ Build in-progress
History
|
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11333712852 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
@achyutjhunjhunwala were you planning to backport this? |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
## Summary Closes elastic#195466 As LogDB mode is enabled on MKI QA environment, it causes mappings for certain fields like `host.name` to be set differently. Hence causing tests to fail. As part of the fix, before ingesting data, i am statically setting the mappings so that it does not cause any collision with something outside the scope of the tests (cherry picked from commit 7237902) # Conflicts: # x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_field_analyze.ts # x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts
# Backport This will backport the following commits from `main` to `8.16`: - [[Dataset Quality] Fix failing test on mki qa (#196122)](#196122) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Achyut Jhunjhunwala","email":"achyut.jhunjhunwala@elastic.co"},"sourceCommit":{"committedDate":"2024-10-14T19:19:10Z","message":"[Dataset Quality] Fix failing test on mki qa (#196122)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/195466\r\n\r\nAs LogDB mode is enabled on MKI QA environment, it causes mappings for\r\ncertain fields like `host.name` to be set differently. Hence causing\r\ntests to fail.\r\n\r\nAs part of the fix, before ingesting data, i am statically setting the\r\nmappings so that it does not cause any collision with something outside\r\nthe scope of the tests","sha":"7237902fad6424d9556cff78e3f3ac7e62fa4bac","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport missing","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-logs","Team:obs-ux-infra_services","Feature:Dataset Health","apm:review"],"number":196122,"url":"https://github.com/elastic/kibana/pull/196122","mergeCommit":{"message":"[Dataset Quality] Fix failing test on mki qa (#196122)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/195466\r\n\r\nAs LogDB mode is enabled on MKI QA environment, it causes mappings for\r\ncertain fields like `host.name` to be set differently. Hence causing\r\ntests to fail.\r\n\r\nAs part of the fix, before ingesting data, i am statically setting the\r\nmappings so that it does not cause any collision with something outside\r\nthe scope of the tests","sha":"7237902fad6424d9556cff78e3f3ac7e62fa4bac"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196122","number":196122,"mergeCommit":{"message":"[Dataset Quality] Fix failing test on mki qa (#196122)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/195466\r\n\r\nAs LogDB mode is enabled on MKI QA environment, it causes mappings for\r\ncertain fields like `host.name` to be set differently. Hence causing\r\ntests to fail.\r\n\r\nAs part of the fix, before ingesting data, i am statically setting the\r\nmappings so that it does not cause any collision with something outside\r\nthe scope of the tests","sha":"7237902fad6424d9556cff78e3f3ac7e62fa4bac"}}]}] BACKPORT-->
|
@achyutjhunjhunwala there's a version gap with this backport. Can you check if this should also be backported to 8.x/8.17? |
|
@jbudz i am a bit confused here. So this PR was merged to main before the 8.16 release. Now what do you mean by 8.x/8.17 |
|
Active branches: we have main, 8.x, 8.16, 8.15, and 7.17. I noticed a backport message for 8.16 but not 8.x, if I misread please disregard. main is currently pointing to 9.0.0. 8.x is currently pointing to 8.17.0. |
|
@jbudz Now i understand this better. Thank you for the detailed explanation. I will create the backport now. |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
## Summary Closes elastic#195466 As LogDB mode is enabled on MKI QA environment, it causes mappings for certain fields like `host.name` to be set differently. Hence causing tests to fail. As part of the fix, before ingesting data, i am statically setting the mappings so that it does not cause any collision with something outside the scope of the tests (cherry picked from commit 7237902) # Conflicts: # x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/degraded_field_analyze.ts # x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts
# Backport This will backport the following commits from `main` to `8.x`: - [[Dataset Quality] Fix failing test on mki qa (#196122)](#196122) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Achyut Jhunjhunwala","email":"achyut.jhunjhunwala@elastic.co"},"sourceCommit":{"committedDate":"2024-10-14T19:19:10Z","message":"[Dataset Quality] Fix failing test on mki qa (#196122)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/195466\r\n\r\nAs LogDB mode is enabled on MKI QA environment, it causes mappings for\r\ncertain fields like `host.name` to be set differently. Hence causing\r\ntests to fail.\r\n\r\nAs part of the fix, before ingesting data, i am statically setting the\r\nmappings so that it does not cause any collision with something outside\r\nthe scope of the tests","sha":"7237902fad6424d9556cff78e3f3ac7e62fa4bac","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-logs","Team:obs-ux-infra_services","Feature:Dataset Health","apm:review","v8.16.0"],"number":196122,"url":"https://github.com/elastic/kibana/pull/196122","mergeCommit":{"message":"[Dataset Quality] Fix failing test on mki qa (#196122)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/195466\r\n\r\nAs LogDB mode is enabled on MKI QA environment, it causes mappings for\r\ncertain fields like `host.name` to be set differently. Hence causing\r\ntests to fail.\r\n\r\nAs part of the fix, before ingesting data, i am statically setting the\r\nmappings so that it does not cause any collision with something outside\r\nthe scope of the tests","sha":"7237902fad6424d9556cff78e3f3ac7e62fa4bac"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196122","number":196122,"mergeCommit":{"message":"[Dataset Quality] Fix failing test on mki qa (#196122)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/195466\r\n\r\nAs LogDB mode is enabled on MKI QA environment, it causes mappings for\r\ncertain fields like `host.name` to be set differently. Hence causing\r\ntests to fail.\r\n\r\nAs part of the fix, before ingesting data, i am statically setting the\r\nmappings so that it does not cause any collision with something outside\r\nthe scope of the tests","sha":"7237902fad6424d9556cff78e3f3ac7e62fa4bac"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"url":"https://github.com/elastic/kibana/pull/196816","number":196816,"branch":"8.16","state":"MERGED","mergeCommit":{"sha":"d7bbd0adf3108fc00dddf361bc4d7840ded5dc8f","message":"[8.16] [Dataset Quality] Fix failing test on mki qa (#196122) (#196816)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.16`:\n- [[Dataset Quality] Fix failing test on mki qa\n(#196122)](https://github.com/elastic/kibana/pull/196122)\n\n<!--- Backport version: 8.9.8 -->\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT [{\"author\":{\"name\":\"Achyut\nJhunjhunwala\",\"email\":\"achyut.jhunjhunwala@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2024-10-14T19:19:10Z\",\"message\":\"[Dataset\nQuality] Fix failing test on mki qa (#196122)\\n\\n##\nSummary\\r\\n\\r\\nCloses\nhttps://github.com//issues/195466\\r\\n\\r\\nAs LogDB mode is\nenabled on MKI QA environment, it causes mappings for\\r\\ncertain fields\nlike `host.name` to be set differently. Hence causing\\r\\ntests to\nfail.\\r\\n\\r\\nAs part of the fix, before ingesting data, i am statically\nsetting the\\r\\nmappings so that it does not cause any collision with\nsomething outside\\r\\nthe scope of the\ntests\",\"sha\":\"7237902fad6424d9556cff78e3f3ac7e62fa4bac\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.16.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"backport\nmissing\",\"v9.0.0\",\"backport:prev-minor\",\"ci:project-deploy-observability\",\"Team:obs-ux-logs\",\"Team:obs-ux-infra_services\",\"Feature:Dataset\nHealth\",\"apm:review\"],\"number\":196122,\"url\":\"https://github.com/elastic/kibana/pull/196122\",\"mergeCommit\":{\"message\":\"[Dataset\nQuality] Fix failing test on mki qa (#196122)\\n\\n##\nSummary\\r\\n\\r\\nCloses\nhttps://github.com//issues/195466\\r\\n\\r\\nAs LogDB mode is\nenabled on MKI QA environment, it causes mappings for\\r\\ncertain fields\nlike `host.name` to be set differently. Hence causing\\r\\ntests to\nfail.\\r\\n\\r\\nAs part of the fix, before ingesting data, i am statically\nsetting the\\r\\nmappings so that it does not cause any collision with\nsomething outside\\r\\nthe scope of the\ntests\",\"sha\":\"7237902fad6424d9556cff78e3f3ac7e62fa4bac\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"labelRegex\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/196122\",\"number\":196122,\"mergeCommit\":{\"message\":\"[Dataset\nQuality] Fix failing test on mki qa (#196122)\\n\\n##\nSummary\\r\\n\\r\\nCloses\nhttps://github.com//issues/195466\\r\\n\\r\\nAs LogDB mode is\nenabled on MKI QA environment, it causes mappings for\\r\\ncertain fields\nlike `host.name` to be set differently. Hence causing\\r\\ntests to\nfail.\\r\\n\\r\\nAs part of the fix, before ingesting data, i am statically\nsetting the\\r\\nmappings so that it does not cause any collision with\nsomething outside\\r\\nthe scope of the\ntests\",\"sha\":\"7237902fad6424d9556cff78e3f3ac7e62fa4bac\"}}]}] BACKPORT-->"}}]}] BACKPORT-->


Summary
Closes #195466
As LogDB mode is enabled on MKI QA environment, it causes mappings for certain fields like
host.nameto be set differently. Hence causing tests to fail.As part of the fix, before ingesting data, i am statically setting the mappings so that it does not cause any collision with something outside the scope of the tests