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

Use deltas in GScan #542

Closed
kinow opened this issue Nov 29, 2020 · 5 comments · Fixed by #543
Closed

Use deltas in GScan #542

kinow opened this issue Nov 29, 2020 · 5 comments · Fixed by #543
Assignees
Milestone

Comments

@kinow
Copy link
Member

kinow commented Nov 29, 2020

Describe exactly what you would like to see in an upcoming release

The issue to add hierarchy to GScan #502 would benefit of having deltas in GScan. That way we can more easily update the hierarchy with the deltas.

This should also fix #416

Additional context

Pull requests welcome!

@kinow
Copy link
Member Author

kinow commented Nov 29, 2020

Current GScan subscription query

subscription {
  workflows {
    id
    name
    status
    owner
    host
    port
    taskProxies(sort: { keys: ["cyclePoint"] }) {
      id
      name
      state
      cyclePoint
      latestMessage
      task {
        meanElapsedTime
        name
      }
      jobs(sort: { keys: ["submit_num"], reverse:true }) {
        id
        batchSysName
        batchSysJobId
        host
        startedTime
        submittedTime
        finishedTime
        state
        submitNum
      }
    }
  }
}

The new subscription query with deltas.

subscription OnGScanData {
  deltas (stripNull: true) {
		added {
			...GscanAddedData
    }
    updated {
      ...GscanUpdatedData
    }
  }
}

fragment GscanAddedData on Added {
  workflow {
    ...WorkflowData
  }
  taskProxies (ghosts: true) {
    ...TaskProxyData
  }
  jobs {
    ...JobData
  }
}

fragment GscanUpdatedData on Updated {
  workflow {
    ...WorkflowData
  }
  taskProxies (ghosts: true) {
    ...TaskProxyData
  }
  jobs {
    ...JobData
  }
}

fragment WorkflowData on Workflow {
  id
  name
  status
  owner
  host
  port
}

fragment TaskProxyData on TaskProxy {
  id
  name
  state
  isHeld
  cyclePoint
  latestMessage
  firstParent {
    id
    name
    cyclePoint
    state
  }
  task {
    meanElapsedTime
    name
  }
}

fragment JobData on Job {
  id
  firstParent: taskProxy {
    id
  }
  batchSysName
  batchSysJobId
  host
  startedTime
  submittedTime
  finishedTime
  state
  submitNum
}

A workflow first appears as running in the added section. A few moments (1 second?) later it appears in updated too. But I think we should display it as running as soon as we can.

When the workflow is stopped, its status changes in updated. So we do not need to use the pruned in this query.

The task proxies & jobs are necessary now, I think, until we have fixed #401

@kinow kinow mentioned this issue Nov 29, 2020
9 tasks
@hjoliver
Copy link
Member

hjoliver commented Dec 3, 2020

the task proxies & jobs are necessary now, I think, until we have fixed #401

@kinow as per comments on Element just now, I'd suggest just use a placeholder for gscan tool-tip content until we have the right data from the front end. It sounds overly difficult to do it by iterating over all the tasks (which gscan should not need) in the meantime. (Or have I missed something?)

@kinow
Copy link
Member Author

kinow commented Dec 3, 2020

No, I was just trying to add the deltas now, for hierarchy. But I think we can wait or leave that out for now. Would it be OK if we had deltas and the hierarchy without the tooltips? And then hopefully add back the tooltips before the beta release?

@hjoliver
Copy link
Member

hjoliver commented Dec 3, 2020

(Typo corrected above - I meant DO use a placeholder for gscan tool-tip content)

@hjoliver
Copy link
Member

hjoliver commented Dec 3, 2020

Would it be OK if we had deltas and the hierarchy without the tooltips? And then hopefully add back the tooltips before the beta release?

Yes, that's fine - better than complicating the code to generate the tooltips the wrong way just because the data isn't there yet. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants