Ohara: [Manager] Errors encountered were not handled correctly when user establish a pipeline

Created on 27 May 2020  ·  3Comments  ·  Source: oharastream/ohara

Describe the bug
沒有正確地處理錯誤的情形

To Reproduce
Steps to reproduce the behavior:

  1. 在 Quickstart VM, 建立一個 workspace
  2. 建立一個 pipeline
  3. 拖入 Shabondi Source: s1
  4. 拖入 Shabondi Sink: s2
  5. 連線 s1 --> s2: 自動建立 T1
  6. T1 始終呈現橘色, 但 Event log 沒有錯誤訊息
  7. 打開 Web Developer Tools

    • 發現有 request 出現 Response 500

  8. 在 Manager 頁面重新 refresh 後, 在 pipeline(p1) 發現 T1 沒有被建立
  9. 單獨呼叫 GET /api/topics, 其實 T1 有被建立

Expected behavior

  • 操作過程中若有錯誤,須能在 Pipeline 及 Event Log 呈現出來
  • 頁面 refresh 後, 能呈現 T1

Screenshots

  • Pipeline
    screenshot 33
  • Web Developer Tools, 發現有 http response 500, 且 Event Logs 沒有記錄
    screenshot 34
    screenshot 35
    screenshot 36
  • Web page after refresh, topic T1 沒有建立(沒有顯示)
    screenshot 37
  • T1 實際建立成功
    screenshot 38
  • 在 workspace settings 裡可以找到 T1, 看出沒有對應的 Pipeline. T1 成了不能刪除的孤兒. XD
    screenshot 39

Operation System (please complete the following information):

  • Browser & Version - Firefox 76.0.1

Additional context
Add any other context about the problem here.

QA bug v0.11.0

All 3 comments

@vitojeng I can confirm this is a bug. And the issue here is that shabondi is trying to connect to a topic which is not yet ready (still starting...) so Configurator will return a failed response and thus the error described in the above.

{
  "code": "oharastream.ohara.configurator.route.ObjectCheckException",
  "message": "type:topic {\"group\":\"3e1117d3c\",\"name\":\"zx5wd\"} does not exist ",
  "stack": "oharastream.ohara.configurator.route.ObjectCheckException: type:topic {\"group\":\"3e1117d3c\",\"name\":\"zx5wd\"} does not exist \n\tat oharastream.ohara.configurator.route.ObjectChecker$$anon$1$$anon$2.compare(ObjectChecker.scala:653)\n\tat oharastream.ohara.configurator.route.ObjectChecker$$anon$1$$anon$2.$anonfun$check$24(ObjectChecker.scala:718)\n\tat scala.concurrent.impl.Promise$Transformation.run(Promise.scala:430)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n"
}

Look at the snapshot, the POST /topics (create topic) seems executes successfully.
This is due to the topic creation and connector update requests sent at the same time; the connector update request may failed if the topic object is not ready yet in configurator.

LGTM, QA passed.

Was this page helpful?
0 / 5 - 0 ratings