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

[ML] View DFA results causes page crash if destination index is missing or invalid #73118

Closed
sophiec20 opened this issue Jul 23, 2020 · 1 comment · Fixed by #73539
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Frame Analytics ML data frame analytics features :ml v7.9.0

Comments

@sophiec20
Copy link
Contributor

Found in 7.9.0 BC4 "build_hash" : "b7f2f5c1c07dfcf3543fddc5bd606cab21bd8280", "build_date" : "2020-07-23T13:07:28.754059Z",

Outlier detection job was created but failed to start due to an invalid configuration. This job was listed in the DFA job management page. Upon selecting "View" this causes an application crash. In this case the destination index was missing.

Upon investigation, the page crash also occurred when destination index contained incorrect mappings and whilst an outlier job was in progress (moving from phase 1 to next phase).

Steps to replicate

  1. Restore kibana_sample_data_flights
  2. In ML UI, click to create new data frame analytics job
  3. Select outlier detection
  4. Switch to JSON editor
  5. Give the job a name and paste in config below
{
  "description": "this is a test",
  "source": {
    "index": [
      "kibana_sample_data_flights"
    ],
    "query": {
      "match_all": {}
    }
  },
  "dest": {
    "index": "bananas",
    "results_field": "ml"
  },
  "analysis": {
    "outlier_detection": {
      "compute_feature_influence": true,
      "outlier_fraction": 0.05,
      "standardization_enabled": true
    }
  },
  "analyzed_fields": {
    "includes": [
      "Carrier",
      "Cancelled",
      "DistanceKilometers",
      "DistanceMiles",
      "FlightDelay",
      "FlightDelayMin",
      "FlightTimeMin",
      "dayOfWeek"
    ],
    "excludes": []
  },
  "model_memory_limit": "17mb",
  "allow_lazy_start": false,
  "max_num_threads": 1
}
  1. Select create
    You will see the job failed to start because the field Carrier is not a supported data type.
    image

  2. Return to the job management page and click "View"

Page will go completely blank. A hard refresh is needed to reload the ML app.

No destination index has been created, however a kibana index pattern does exist.

If using the Wizard to create the job, this would not have been possible so the user is protected from creating the invalid job config, however it is still possible to achieve using the API or JSON editor and causes an application crash, so should be handled.

There are a few additional scenarios to test for that should be handled when viewing results. Check for crashes and that we display useful error message if appropriate.

  • no kibana index pattern exists - currently handled
  • kibana index pattern exists but no destination index - currently crashes
  • no index pattern and no destination index - currently crashes
  • a job that is in progress - if you immediately click "View" the page will crash as it transitions from phase 1 to the next phase
  • an empty destination index - manually delete destination docs using delete_by_query - currently handled
  • an empty destination index with invalid mappings - for an existing successful job, delete the dest index and then create a dummy index PUT dest-index - currently crashes
@sophiec20 sophiec20 added bug Fixes for quality problems that affect the customer experience :ml Feature:Data Frame Analytics ML data frame analytics features v7.9.0 labels Jul 23, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Frame Analytics ML data frame analytics features :ml v7.9.0
Projects
None yet
3 participants