Add manager host to list of nodes when deploy method is Server #256
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
This PR addresses #255, in which I was not able to generate and deploy physical graphs because only a single node was being returned to the translator when the ManagerClient was queried for current nodes.
This is only an issue with the Server deploy method; the Browser Direct method is working fine.
Cause
The server and the Browser Direct method use different REST calls:
This is likely due to their requiring different pieces of information at runtime.
They do get the same list of nodes, albeit in different through different methods. What they do with this list, however, is the difference.
\gen_pg
, Serverdaliuge/daliuge-translator/dlg/dropmake/web/translator_rest.py
Lines 637 to 641 in bf3a8fc
\gen_pg_spec
, Browser Directdaliuge/daliuge-translator/dlg/dropmake/web/translator_rest.py
Lines 721 to 726 in bf3a8fc
It is clear that for the Browser Direct case (i.e., the one that works) we are adding the manager to the start of any list of nodes, which is what we need when we split the list of nodes into island and node managers in
to_pg_spec
:daliuge/daliuge-translator/dlg/dropmake/pgt.py
Lines 279 to 280 in bf3a8fc
Solution
The following is necessary to resolve the issue: