Skip to content

Commit

Permalink
Augment kwargs with values from applicationArgs
Browse files Browse the repository at this point in the history
When creating drops from a graph specification we used to use only the
top-level key-values to build the keyword map passed down to
applications, which then inspected it to obtain their user-provided
arguments. For some time now LGs (and their translation into PGs) have
separated how arguments are provided to applications though, grouping
them together inside an applicationArgs map instead of placing them at
the top-level of each drop specification. This means that applications
cannot access these values directly, and that the mechanism to declare
arguments at the class level (using dlg_string_param and friends)
doesn't pick them up.

This commit merges the information contained in applicationArgs into the
set of arguments passed down to drops via kwargs. This is enough for the
dlg_*_param declarations to pick these up.

This is part of YAN-968.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
  • Loading branch information
rtobar authored and awicenec committed Apr 21, 2022
1 parent 8715f0a commit 9d02aa2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions daliuge-engine/dlg/graph_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,8 @@ def _getKwargs(dropSpec):
for kw in REMOVE:
if kw in kwargs:
del kwargs[kw]
for name, spec in dropSpec.get('applicationArgs', dict()).items():
kwargs[name] = spec['value']
return kwargs


Expand Down

0 comments on commit 9d02aa2

Please sign in to comment.