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

Failing test: Chrome UI Functional Tests.test/functional/apps/saved_objects_management/show_relationships·ts - saved objects management saved objects relationships flyout displays the invalid references #179977

Closed
kibanamachine opened this issue Apr 3, 2024 · 18 comments · Fixed by #187545
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Apr 3, 2024

A test failed on a tracked branch

Error: expected [ { type: 'dashboard',
    id: 'missing-dashboard-ref',
    relationship: 'Child',
    error: 'Saved object [dashboard/missing-dashboard-ref] not found' } ] to sort of equal [ { error: 'Saved object [visualization/missing-vis-ref] not found',
    id: 'missing-vis-ref',
    relationship: 'Child',
    type: 'visualization' },
  { error: 'Saved object [dashboard/missing-dashboard-ref] not found',
    id: 'missing-dashboard-ref',
    relationship: 'Child',
    type: 'dashboard' } ]
    at Assertion.assert (node_modules/@kbn/expect/expect.js:100:11)
    at Assertion.eql (node_modules/@kbn/expect/expect.js:244:8)
    at Context.<anonymous> (test/functional/apps/saved_objects_management/show_relationships.ts:40:35)
    at Object.apply (node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:78:16) {
  actual: '[\n' +
    '  {\n' +
    '    "error": "Saved object [dashboard/missing-dashboard-ref] not found"\n' +
    '    "id": "missing-dashboard-ref"\n' +
    '    "relationship": "Child"\n' +
    '    "type": "dashboard"\n' +
    '  }\n' +
    ']',
  expected: '[\n' +
    '  {\n' +
    '    "error": "Saved object [visualization/missing-vis-ref] not found"\n' +
    '    "id": "missing-vis-ref"\n' +
    '    "relationship": "Child"\n' +
    '    "type": "visualization"\n' +
    '  }\n' +
    '  {\n' +
    '    "error": "Saved object [dashboard/missing-dashboard-ref] not found"\n' +
    '    "id": "missing-dashboard-ref"\n' +
    '    "relationship": "Child"\n' +
    '    "type": "dashboard"\n' +
    '  }\n' +
    ']',
  showDiff: true
}

First failure: CI Build - 7.17

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Apr 3, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 3, 2024
@mistic mistic added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Apr 4, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Apr 4, 2024
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - 8.14

@afharo
Copy link
Member

afharo commented May 8, 2024

The recent error looks like a webdriver hiccup:

│ WebDriverError: disconnected: not connected to DevTools
--
  | │   (failed to check if window was closed: disconnected: not connected to DevTools)
  | │   (Session info: chrome=124.0.6367.118)

Closing for now.

@afharo afharo closed this as completed May 8, 2024
@kibanamachine kibanamachine reopened this Jun 2, 2024
@kibanamachine
Copy link
Contributor Author

New failure: kibana-elasticsearch-snapshot-verify - 7.17

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 7.17

@jloleysens
Copy link
Contributor

jloleysens commented Jun 25, 2024

Looks like some kind of unstable array sorting causing an issue in displays the invalid references


│1)    saved objects management
--
  | │       saved objects relationships flyout
  | │         displays the invalid references:
  | │
  | │
  | │       Error: expected [ { type: 'dashboard',
  | │     id: 'missing-dashboard-ref',
  | │     relationship: 'Child',
  | │     error: 'Saved object [dashboard/missing-dashboard-ref] not found' } ] to sort of equal [ { error: 'Saved object [visualization/missing-vis-ref] not found',
  | │     id: 'missing-vis-ref',
  | │     relationship: 'Child',
  | │     type: 'visualization' },
  | │   { error: 'Saved object [dashboard/missing-dashboard-ref] not found',
  | │     id: 'missing-dashboard-ref',
  | │     relationship: 'Child',
  | │     type: 'dashboard' } ]
  | │       + expected - actual
  | │
  | │        [
  | │          {
  | │       +    "error": "Saved object [visualization/missing-vis-ref] not found"
  | │       +    "id": "missing-vis-ref"
  | │       +    "relationship": "Child"
  | │       +    "type": "visualization"
  | │       +  }
  | │       +  {
  | │            "error": "Saved object [dashboard/missing-dashboard-ref] not found"
  | │            "id": "missing-dashboard-ref"
  | │            "relationship": "Child"
  | │            "type": "dashboard"

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 7.17

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 7.17

@kibanamachine
Copy link
Contributor Author

New failure: kibana-elasticsearch-snapshot-verify - 7.17

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 7.17

jloleysens added a commit to jloleysens/kibana that referenced this issue Jul 16, 2024
…lastic#187545)

## Summary

Per the title

Close elastic#179977

(cherry picked from commit 809a83d)

# Conflicts:
#	test/functional/page_objects/management/saved_objects_page.ts
jloleysens added a commit that referenced this issue Jul 17, 2024
…rom UI (#187545) (#188406)

Close #179977

# Backport

This will backport the following commits from `main` to `7.17`:
- [[Saved Objects] Provide stable sorting to the rows extracted from UI
(#187545)](#187545)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Jean-Louis
Leysens","email":"jeanlouis.leysens@elastic.co"},"sourceCommit":{"committedDate":"2024-07-08T10:40:32Z","message":"[Saved
Objects] Provide stable sorting to the rows extracted from UI
(#187545)\n\n## Summary\r\n\r\nPer the title\r\n\r\nClose
https://github.com/elastic/kibana/issues/179977","sha":"809a83df82ffe53102e7b1c4df1f6db120a054ea","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Core","Feature:Saved
Objects","release_note:skip","backport:skip","v8.16.0"],"number":187545,"url":"https://github.com/elastic/kibana/pull/187545","mergeCommit":{"message":"[Saved
Objects] Provide stable sorting to the rows extracted from UI
(#187545)\n\n## Summary\r\n\r\nPer the title\r\n\r\nClose
https://github.com/elastic/kibana/issues/179977","sha":"809a83df82ffe53102e7b1c4df1f6db120a054ea"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/187545","number":187545,"mergeCommit":{"message":"[Saved
Objects] Provide stable sorting to the rows extracted from UI
(#187545)\n\n## Summary\r\n\r\nPer the title\r\n\r\nClose
https://github.com/elastic/kibana/issues/179977","sha":"809a83df82ffe53102e7b1c4df1f6db120a054ea"}}]}]
BACKPORT-->
@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 7.17

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 7.17

@kibanamachine
Copy link
Contributor Author

Skipped

7.17: faae6da

jloleysens added a commit that referenced this issue Jul 23, 2024
## Summary

Close #179977 🧟 🔫 

Trying this again, this time with a `retry.waitFor`. FTRs for this test
succeeded 25/25 flaky test runs with a failure for another SO management
FTR 🙈 , but this should fix this test for 7.17 branch.
@gsoldevila
Copy link
Contributor

If we look at the artifacts produced on the failed CI test, we can see that the 2 SOs with invalid references are on the list:

image

So IMO this could be a problem with the await PageObjects.savedObjects.getInvalidRelations(); implementation.

Will investigate a bit more.

@gsoldevila
Copy link
Contributor

gsoldevila commented Jul 31, 2024

@jloleysens Sorry I just realised the failure + skip was before your commit.
Nonetheless, main does not have this flaky behaviour and they are not using a retry mechanism.

What I noticed is that Bluebird's mapAsync as replaced by native Promise.all with this PR.

That's the only noticeable difference between 7.x and 8.x, so I'd say it's worth updating the test with this change instead. WDYT?

@jloleysens
Copy link
Contributor

jloleysens commented Jul 31, 2024

Hey @gsoldevila I was not aware of this PR

I'm not sure bluebird is the reason we needed the retry logic... There might be something else and so would be good to put any future changes through flaky test runner. In principle happy to go ahead with your approach though!

Also, not sure why my PR didn't close this issue 😅 .

@gsoldevila
Copy link
Contributor

gsoldevila commented Jul 31, 2024

Triggered a 300x FTR
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6649

UPDATE: getting rid of bluebird does not fix the issue.

I still don't know why it does NOT fail on 8.x 🤔

@gsoldevila
Copy link
Contributor

JLs fix should have closed this issue automatically.

adelisle pushed a commit to Makila-AI/kibana that referenced this issue Aug 5, 2024
…rom UI (elastic#187545) (elastic#188406)

Close elastic#179977

# Backport

This will backport the following commits from `main` to `7.17`:
- [[Saved Objects] Provide stable sorting to the rows extracted from UI
(elastic#187545)](elastic#187545)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Jean-Louis
Leysens","email":"jeanlouis.leysens@elastic.co"},"sourceCommit":{"committedDate":"2024-07-08T10:40:32Z","message":"[Saved
Objects] Provide stable sorting to the rows extracted from UI
(elastic#187545)\n\n## Summary\r\n\r\nPer the title\r\n\r\nClose
https://github.com/elastic/kibana/issues/179977","sha":"809a83df82ffe53102e7b1c4df1f6db120a054ea","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Core","Feature:Saved
Objects","release_note:skip","backport:skip","v8.16.0"],"number":187545,"url":"https://github.com/elastic/kibana/pull/187545","mergeCommit":{"message":"[Saved
Objects] Provide stable sorting to the rows extracted from UI
(elastic#187545)\n\n## Summary\r\n\r\nPer the title\r\n\r\nClose
https://github.com/elastic/kibana/issues/179977","sha":"809a83df82ffe53102e7b1c4df1f6db120a054ea"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/187545","number":187545,"mergeCommit":{"message":"[Saved
Objects] Provide stable sorting to the rows extracted from UI
(elastic#187545)\n\n## Summary\r\n\r\nPer the title\r\n\r\nClose
https://github.com/elastic/kibana/issues/179977","sha":"809a83df82ffe53102e7b1c4df1f6db120a054ea"}}]}]
BACKPORT-->
adelisle pushed a commit to Makila-AI/kibana that referenced this issue Aug 5, 2024
adelisle pushed a commit to Makila-AI/kibana that referenced this issue Aug 5, 2024
## Summary

Close elastic#179977 🧟 🔫 

Trying this again, this time with a `retry.waitFor`. FTRs for this test
succeeded 25/25 flaky test runs with a failure for another SO management
FTR 🙈 , but this should fix this test for 7.17 branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants