Skip to content

Commit

Permalink
Force collect nodes to always be reprocessed
Browse files Browse the repository at this point in the history
This avoids and edge case where collect is resolved at compile time
(because we are collecting over a production rule) and the dependencies
have changed inadvertently. To remedy that we simply force the node to
always be reevaluated.
  • Loading branch information
Zaharid committed Apr 29, 2021
1 parent 26a0b4e commit e6482da
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/reportengine/resourcebuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,16 @@ def _process_requirement(self, name, nsspec, *, extraargs=None,

log.debug("Processing requirement: %s" % (name,))


ns = namespaces.resolve(self.rootns, nsspec)
if extraargs is None:
extraargs = ()


is_provider = self.is_provider_func(name)
if ( is_provider and isinstance(self.get_provider_func(name), collect)):
log.debug("Resolving collect node for %s", name)
yield from self._make_node(name, nsspec, extraargs, parents)
return
#First try to find the name in the namespace
try:
put_index, val = self.input_parser.resolve_key(name, ns, parents=parents, currspec=nsspec)
Expand Down

0 comments on commit e6482da

Please sign in to comment.