-
Notifications
You must be signed in to change notification settings - Fork 111
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
[WIP] Add a block/task to an existing job #451
Conversation
Really nice work. I can add the methods to the afcmd module when it has been pulled in. |
Indeed, I'll add afcmd to the todo-list for the record! |
Hi! |
If some new block will be added, job state should be recalculated automatically in v_refresh() at the next afserver heartbeat. Or you have tried and it was not? |
Added a pull request to the pull request :) |
Example:
Example:
|
aha didn't know that one could PR a PR, thanks @lithorus I'll merge it beginning next week! @timurhai no worry for the check boxes, I fixed them ;) I did not try to rely on Also, do you think of anything that may be indirectly broken by this new feature, and so that I should take care of checking? |
Remove debug Co-Authored-By: Elie Michel <[email protected]>
@eliemichel i do not think that lots of things can break on a new block(s) append. Depend blocks are stored as a list of integers (blocks numbers) And job progress and its storing should be checked. Also afwatch/webgi should reconstruct job - may be just close it and reopen. |
Hey Elie, I was able to build afanasy on Centos7 and Centos6 so far. Everythings working there fine. I also applied @lithorus changes to afcmd and tested this here in our environment. This works fine, too. I will have a deeper look into this at the end of the week and will let you know if I find any issues or if there is something that needs to be changed. Thanks so far! |
@yannci Thanks a lot for your feedback! :) |
Hi! |
Append tasks
@timurhai What is the recommended way to update to the documentation? Is the website managed through a git repository? Is there anywhere I should put doc within cgru repo? |
Hi! For now all documentation is here: I (and not only me) think that this is no good. But this new detailed documentation is just started and empty. |
I added doc to the website project: CGRU/cgru.github.com#7 And I introduced a howto section in the new doc to put a guide about adding new tasks/blocks: https://github.com/eliemichel/cgru/blob/append-tasks/docs/howto/appendtask/index.rst I think the howto is a good format as long as there is no automated doc generation. And even after it can still remain usefull for such specific task. |
Hi. I still have not enough time for all issues of the project. ps |
Hi! |
Hello! Much time passed... How is going with this issue? After the code review, the first thing that I want to change is storing tasks and blocks in std::vector<int32_t>, to not to use double pointers. But that code is ancient, written long before this issue, it works and do not need immediate fix. |
Hi Timur, I am currently testing this feature while developing a PDG workflow with Houdini and Afanasy, which was one of the reasons for this feature (see #292 and #436). After merging my PR (#489) this works quite well for me. I didn't observe any crashes or problems so far. There is still the PR regarding the flags to indicate wether a job has a appended blocks or tasks (#490) open which might come in handy in afwatch etc. Otherwise this works so far. In regard to the refactoring the use of double pointers I don't have an opinion so far since I didn't dig that deep in the code. Best, |
Hi Yannic! I think that adding a block/task feature we (i) need to see/test/develop from PDG side. Is there some other common (not Houdini) things that i should to check for this issue? Some c++ code? The entire Houdini PDG/TOPs connection i can check only when i will be familiar with PDG/TOPs. |
… contains new block/task ids. Now if there is Action::answer_kind is not set (an empty string, used to be 'error','log','info'), Action::answer data will be written as a raw string in 'object' field. This was server can return a custom JSON object containing some data as an answer on action. Needed on appending new tasks on a dynamic Houdini PDG job. References #451, #436.
Hello,
I started working on issue #292 (Add a block/task to an existing job) and this is a work in progress PR so not meant to be merged right away. Feel free to review and discuss it though.
Done
afcmd
(@lithorus)Known issues
Numeric block
I'm not sure it makes sense to append tasks to numeric blocks, so I did not implement it. Only non-numeric block can have tasks appent.
Block dependencies
I haven't checked that the newly created tasks respect the dependency system, but they should without too much trouble. However, a conceptual issue occurs for blocks that depend on the one where new tasks are appent because now a job/block can switch from "DONE" back to "RUN". Since it was once Done, dependent jobs may have started already, so what should they become? Restart? Pause? Continue?
Anyway I see no use of making a job depend on one that may be extended with new tasks eventually, so the question may actually never be an issue in real life applications.
afwatch
When appending new blocks to a job that is opened in afwatch, one must reopen the job window to see the update. It feels like a minor issue so I don't plan on fixing it.
API
JSON
The JSON API changes are new operation types:
append_tasks
which takes atasks
list following the very same spec as when submitting new jobs, e.g.:append_blocks
which takes ablocks
list also following jobs submission spec, e.g.:Python
Two command methods have been added to the
Cmd
object inaf.py
:appendBlocks(jobId, blocks)
Example:
appendTasks(jobId, blockId, tasks)
Example: