-
Notifications
You must be signed in to change notification settings - Fork 284
Allow to push resources after query_extra_data #4017
Conversation
@@ -277,10 +276,35 @@ def _get_mask_for_task(client, task: coretask.CoreTask) -> masking.Mask: | |||
|
|||
|
|||
@defer.inlineCallbacks | |||
def _inform_subsystems(client, task, packager_result): | |||
task_id = task.header.task_id | |||
def add_resources(client, resources, res_id, timeout): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider passing a resource_server directly, since you are never using client, but only it's field.
golem/task/rpc.py
Outdated
client_options=client_options, | ||
) | ||
|
||
logger.info( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this log message. What subsystems are we informing here and where do we do that?
golem/task/tasksession.py
Outdated
common.deadline_to_timeout(ctd["deadline"]) | ||
) | ||
resources = self.task_server.get_resources(ctd['subtask_id']) | ||
ctd["resources"] = resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why resources from task_server
are reassigned to CTD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because previously they were in the form that the app may give (just paths to files) and we want to change them to the one that were serialized properly by resource_manage (to_wire function). Provider expects to get resources in the serialized form (so from_wire function may be applied).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a brief comment?
I rebased on my |
Your PR will need to align with https://github.com/golemfactory/golem/issues/2223 |
86ae134
to
653740e
Compare
For QA team: I need you to focus on testing typical computation scenarios. Especially the one with:
No specific and modified version of Electron is needed |
@badb the task is under "testing" status ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks okay as far as I could tell :)
Codecov Report
@@ Coverage Diff @@
## develop #4017 +/- ##
===========================================
+ Coverage 88.79% 88.82% +0.02%
===========================================
Files 215 215
Lines 18675 18690 +15
===========================================
+ Hits 16583 16601 +18
+ Misses 2092 2089 -3 |
We want to make sure that user is able to push additional resource for new subtasks. That can be useful if there is a task that may have dynamic resources that cannot be all defined and pushed during task creation (for example they are based on previous subtasks results).
Previously resources were only send during task creation and it was not possible to add them later.