Circular dependency vs. a single root config.lua file #29
Labels
No labels
Critical Bug
Documentation
Feature
Small bug
tests
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
babka/activitycolander#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm facing a problem, that appears to have no nice solution.
We want to have a single
configfile that imports other configuration files (pipelineandactions) and combines them into a single table, which is then merged with the configuration table provided by the user.The reason we haven't done this before is because it leads to a circular dependency when defining the pipeline using checks and importing the configuration table from checks.
(The same circularity applies to all checks using global configuration variables)
We have four options to resolve this circular dependency problem:
new.The first option is undesirable, because it makes the configuration of instances more complicated (a far more common activity than implementing a new action/check).
The second option, too, makes modifying the default pipeline more complicated, because the pipeline would now have to return a function (taking
checksas an argument) instead of simply returning a table. This is still a more common activity than implementing a new check or action.The third option is more involved, because it means that a checks
runfunction would have to accept the global configuration (we cannot use thenewfunction because this is called when creating thepipelineand before a configuration table is available).The fourth option has the big disadvantage that checks are limited to only using configuration provided to it directly and cannot access global config, which would mean that both the
WholeWordCheckandDomainCheckcould no longer be maintained, because they use the globaladditional_config_pathvariable. I'd have to remove them. Checks relying on web sources (SubscriptionsDomainCheck) will not be impacted by this change.Whatever option we choose, I'd implement it both for
actionsandchecks.assigned to @CSDUMMI
created branch
29-circular-dependency-vs-a-single-root-config-lua-fileto address this issuechanged the description
changed the description
changed the description
mentioned in commit 17d4a92c1c046aab6cc66e32d3ac693739131292
mentioned in commit 3fc6d1ea34d5b22e82eb1ef7e72406efa78ad4d4
mentioned in commit c5c9c92306373873ea706b908b25a42cae73a99b
mentioned in commit 034ed73109d44a1c8de87aedcf8651042dd4509d
mentioned in commit
3faf45e1daThis has been addressed by version 0.7.0 of ActivityColander. Global configuration has been removed from checks (option 4).