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 X-Pack UI Functional Tests.x-pack/test/functional/apps/lens/drag_and_drop·ts - lens app lens drag and drop tests should move the column to compatible dimension group #84941

Closed
kibanamachine opened this issue Dec 3, 2020 · 7 comments · Fixed by #84979 or #88614
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Dec 3, 2020

A test failed on a tracked branch

Error: expected [ 'Top values of clientip' ] to sort of equal [ 'Top values of @message.raw' ]
    at Assertion.assert (/dev/shm/workspace/parallel/3/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.eql (/dev/shm/workspace/parallel/3/kibana/packages/kbn-expect/expect.js:244:8)
    at Context.<anonymous> (test/functional/apps/lens/drag_and_drop.ts:78:96)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at Object.apply (/dev/shm/workspace/parallel/3/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16) {
  actual: '[\n  "Top values of clientip"\n]',
  expected: '[\n  "Top values of @message.raw"\n]',
  showDiff: true
}

First failure: Jenkins Build

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Dec 3, 2020
@tylersmalley tylersmalley added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Dec 3, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

jbudz added a commit that referenced this issue Dec 3, 2020
jbudz added a commit that referenced this issue Dec 3, 2020
@jbudz
Copy link
Member

jbudz commented Dec 3, 2020

skipped
main: 9f09c84
7.x: af2df41

@wylieconlon
Copy link
Contributor

This is one of the stranger failures, we need to figure out what's happening here:

lens app lens drag and drop tests should move the column to compatible dimension group

@wylieconlon wylieconlon self-assigned this Dec 4, 2020
gmmorris added a commit to gmmorris/kibana that referenced this issue Dec 4, 2020
* master: (28 commits)
  [Actions] fixes bug where severity is auto selected but not applied to the action in PagerDuty (elastic#84891)
  Only attempt to rollover signals index if version < builtin version (elastic#84982)
  skip flaky suite (elastic#84978)
  skip lens rollup tests
  Add geo containment tracking alert type (elastic#84151)
  Changed rollup tests to use test user rather than elastic super user. (elastic#79567)
  skip 'should allow creation of lens xy chart' elastic#84957
  [APM] Add log_level/sanitize_field_names config options to Python Agent (elastic#84810)
  [Maps] geo line source (elastic#76572)
  [data.search] Move search method inside session service and add tests (elastic#84715)
  skip lens drag and drop test.  elastic#84941
  [Ingest Node Pipelines] Integrate painless autocomplete (elastic#84554)
  [Lens] allow drag and drop reorder on xyChart for y dimension (elastic#84640)
  [Lens] Fix error when selecting the current field again (elastic#84817)
  [Metrics UI] Add metadata tab to node details flyout (elastic#84454)
  [CI] Enables APM collection (elastic#81731)
  [Workplace Search] Migrate Sources Schema tree (elastic#84847)
  Disable checking for conflicts when copying saved objects (elastic#83575)
  [SECURITY_SOLUTION] delete advanced Policy fields when they are empty (elastic#84368)
  y18n 4.0.0 -> 4.0.1 (elastic#84905)
  ...
@kibanamachine kibanamachine reopened this Jan 6, 2021
@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@spalger
Copy link
Contributor

spalger commented Jan 6, 2021

Two failures, one in 7.x and one in a PR to 7.11 since this was fixed. Do you have a chance to look at this again @flash1293?

@flash1293 flash1293 assigned flash1293 and unassigned wylieconlon Jan 18, 2021
@flash1293
Copy link
Contributor

Seems like this can still happen:
Screenshot 2021-01-18 at 17 05 21

I checked the code and I realized we are doing this to simulate dragging:

          const dragStartEvent = createEvent('dragstart');
          dispatchEvent(origin, dragStartEvent);

          setTimeout(() => {
            const dropEvent = createEvent('drop');
            dispatchEvent(target, dropEvent, dragStartEvent.dataTransfer);
            const dragEndEvent = createEvent('dragend');
            dispatchEvent(origin, dragEndEvent, dropEvent.dataTransfer);
          }, 50);

@wylieconlon Do you think it's possible the 50ms just haven't passed yet and the drag is not completed but still in progress? Or maybe the other way around, the drop event came in too early and couldn't be processed? I will prepare a PR increasing the waiting times a bit here but I think we have to test it "in the wild" by merging into master because this issue is pretty rare (happened 3 times in 30days, so flaky test runner would need a lot of cycles to rule it out).

@wylieconlon
Copy link
Contributor

@flash1293 It does seem possible that 50ms is not enough to execute a state update, since a state update is needed to mark that the drag has started. Specifically we use this code on start:

    // Chrome causes issues if you try to render from within a
    // dragStart event, so we drop a setTimeout to avoid that.
    setState({ ...state });
    setTimeout(() => setDragging(value));

So we probably have some underlying performance issues here, but I agree that increasing the timeout is a solution that would help.

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 Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
7 participants