Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dials/blank: Add/use BlockingReportNewValue #65

Merged
merged 2 commits into from
Jul 13, 2022
Merged

dials/blank: Add/use BlockingReportNewValue #65

merged 2 commits into from
Jul 13, 2022

Conversation

dfinkel
Copy link
Contributor

@dfinkel dfinkel commented Jul 13, 2022

Blank has been almost impossible to use correctly, with only a few
(constrained) cases where it can be used safely without having terrible
races (hence the complexity in the ez package wrapping it).

Fix this by adding a BlockingReportNewValue method to the WatchArgs
interface that returns any errors in stacking or validation to the
caller, (and returns successfully if the new config has been
successfully installed)

ez: simplify impl with blank fixes, cbs & generics

With the last few changes, the building-blocks which ez is wrapping
and/or working with are much more robust and easier to use.

Update ez to reflect this new state:

  • eliminate the extra channels now that Blank blocks and returns
    errors.
  • register the OnNewConfig callback at the end, just before returning.
  • rename p to dp to eliminate some confusion with params

@dfinkel dfinkel force-pushed the robust_blank branch 2 times, most recently from a9195fa to 329b471 Compare July 13, 2022 18:48
Blank has been almost impossible to use correctly, with only a few
(constrained) cases where it can be used safely without having terrible
races (hence the complexity in the `ez` package wrapping it).

Fix this by adding a BlockingReportNewValue method to the `WatchArgs`
interface that returns any errors in stacking or validation to the
caller, (and returns successfully if the new config has been
successfully installed)
With the last few changes, the building-blocks which ez is wrapping
and/or working with are much more robust and easier to use.

Update ez to reflect this new state:
 - eliminate the extra channels now that Blank blocks and returns
   errors.
 - register the OnNewConfig callback at the end, just before returning.
 - rename `p` to `dp` to eliminate some confusion with `params`
@dfinkel dfinkel enabled auto-merge July 13, 2022 18:56
@dfinkel dfinkel merged commit 8d6b060 into master Jul 13, 2022
@dfinkel dfinkel deleted the robust_blank branch July 13, 2022 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants