HUE-8732 [jb] Rerun button for scheduler tasks is not working

Review Request #13674 - Created March 5, 2019 and updated

Ivan Dzikovsky
hue
HUE-8732
hue

Fixed some logic that enables "Rerun" button.

Also, changed "openJob" function scope from global to local, as before this fix, openJob for "is_mini == True" was overriding openJob for normal view.

Manual.
I've checked that I can rerun schedule-tasks from Scheduler view, and that ability to rerun Workflows was not broken after this fix.
Also, there is still some issues when rerunning schedule-task from "JobBrowser mini preview" window, and I was not able to fix it.

  • 0
  • 0
  • 3
  • 0
  • 3
Description From Last Updated
  1. Nice one!

    Just one question about the action apiStatus in general

  2. If we do below, might be able to revert this (as it unifies the apiStatus)

  3. Wondering: aren't we using the coordinator job status and not the coordinator worklow action instance here?

    (so the status is about the coordinator and not the task).

    Maybe we could massage the task list there? (and maybe reuse something similar to WorkflowApi from workflow_api.py)

    https://github.com/cloudera/hue/blob/master/apps/jobbrowser/src/jobbrowser/apis/schedule_api.py#L89

    https://github.com/cloudera/hue/blob/master/apps/jobbrowser/src/jobbrowser/apis/schedule_api.py#L124

  4. 
      
  1. Really nice!

    Only one last potential nit!

  2. IIRC, there are 4 status for the APIs, so returning 'FAILED' for those is probably safer?

    https://github.com/cloudera/hue/blob/master/apps/jobbrowser/src/jobbrowser/apis/base_api.py#L80

    (we could add 'FAILED' to the comment above too)

  3. 
      
Review request changed

Change Summary:

added FAILED state to comment in
https://github.com/cloudera/hue/blob/1da717c/apps/jobbrowser/src/jobbrowser/apis/base_api.py#L80

btw, there is following list of states: [RUNNING, FINISHED, PAUSED, FAILED]
while in fact we are using following list of states: [RUNNING, SUCCEEDED, PAUSED, FAILED]

should we rewrite comment, or change "SUCCEEDED" to "FINISHED" everywhere in the code?

Diff:

Revision 11 (+89 -44)

Show changes

  1. Let's just go with run remaning the comment in a commit on top (simpler and copying the original YARN states)

    https://review.cloudera.org/r/13681/

  2. 
      
Loading...