Closed henry54809 closed 3 years ago
At this level in the code there's no explicit recognition that "config is not a protobuf" -- that's a true statement in the current implementation, but I don't find it a particularly compelling argument. I don't know what the statement "not have any override for values that don't make sense" means. The question at hand is "how do you override something to 'default' behavior" -- in the previous version, you could override to default by specifying 0 (which is a nonsensical value for "max hosts" so is semantically unique" -- so really that's my question (proposed mechanism for a config file to override an inherited config).
On Tue, Aug 3, 2021 at 10:27 AM henry54809 @.***> wrote:
@.**** commented on this pull request.
In daq/runner.py https://github.com/faucetsdn/daq/pull/900#discussion_r681961001:
@@ -192,7 +198,7 @@ def init(self, config): self._cleanup_previous_runs() self._init_test_list() self._target_set_queue = []
- self._max_hosts = self.run_trigger.get('max_hosts') or float('inf')
- self._max_hosts = self.run_trigger.get('max_hosts', float('inf'))
This config is not a protobuf object so there is no default 0 value for max_hosts. I think it's best to not have any override for values that don't make sense(in your case, a negative value for max_hosts is also not override). We need to expand the validation of config in the future so daq can just throw an error if some config values don't make sense.
— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/faucetsdn/daq/pull/900#discussion_r681961001, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIEPDYA3XM3CXFSSEWN7CDT3ARG7ANCNFSM5BPAIR7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
PTAL. I restored that max_hosts. we can push off that discussion until we are ready to refactor configs.
Codecov Report
62.68% <70.00%> (+0.06%)
68.25% <70.00%> (-0.02%)
66.19% <70.00%> (+0.01%)
67.51% <70.00%> (+0.01%)
67.36% <70.00%> (+0.01%)
72.34% <76.66%> (-0.10%)
67.49% <76.66%> (+0.02%)
66.47% <76.66%> (-0.03%)
31.24% <73.33%> (+0.24%)
Flags with carried forward coverage won't be shown. Click here to find out more.
84.87% <100.00%> (+0.23%)
87.70% <100.00%> (ø)
97.32% <100.00%> (ø)
86.50% <0.00%> (-3.18%)
82.19% <0.00%> (-1.37%)
90.98% <0.00%> (-0.15%)
Continue to review full report at Codecov.