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

data store: dont update outputs incrementally #6403

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions cylc/flow/data_store_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2428,11 +2428,25 @@ def delta_task_output(
tp_delta = self.updated[TASK_PROXIES].setdefault(
tp_id, PbTaskProxy(id=tp_id))
tp_delta.stamp = f'{tp_id}@{update_time}'
output = tp_delta.outputs[label]
output.label = label
output.message = message
output.satisfied = outputs.is_message_complete(message)
output.time = update_time

for _label in tproxy.outputs:
output = tp_delta.outputs[_label]

# set the new output
if _label == label:
output.label = label
output.message = message
output.satisfied = outputs.is_message_complete(message)

# ensure all outputs are included in the delta
else:
_output = tproxy.outputs[_label]
output.label = _output.label
output.message = _output.message
output.satisfied = _output.satisfied

output.time = update_time

self.updates_pending = True

def delta_task_outputs(self, itask: TaskProxy) -> None:
Copy link
Member

@dwsutherland dwsutherland Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well only use this (below) call instead.. Unless you want to keep the other as a placeholder.

Copy link
Member

@dwsutherland dwsutherland Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just call delta_task_outputs from within delta_task_output with a comment for future improvement.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bodge workaround, I'm not sure whether we should merge it.

The incremental update is the right thing to do (so I don't want to blast that code aside), we just didn't develop a mechanism for syncing these updates over GraphQL so the UI can't handle it.

Expand Down
Loading