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

Plan function add_facts should return a Target object #1211

Closed
donoghuc opened this issue Sep 10, 2019 · 0 comments · Fixed by #1313
Closed

Plan function add_facts should return a Target object #1211

donoghuc opened this issue Sep 10, 2019 · 0 comments · Fixed by #1313
Assignees
Labels
Feature New features and improvements.
Milestone

Comments

@donoghuc
Copy link
Member

Use Case

The set_* plan functions should all return a Target object for consistency and to allow chaining. Currently the add_facts function returns a hash of the updated facts.

Describe the Solution You Would Like

Return a Target when invoking add_facts in a plan.

Describe Alternatives You've Considered

Introduce a set_facts method similar to set_config.

Additional Context

Changing the return type is a breaking change, it should be part of Bolt 2.0 effort.

@donoghuc donoghuc added Feature New features and improvements. 2.0 labels Sep 10, 2019
@donoghuc donoghuc added this to the 2.0 milestone Oct 1, 2019
donoghuc added a commit to donoghuc/bolt that referenced this issue Oct 14, 2019
In order to be more consistent with the other `set_*` plan methods for setting target data, this commit updates the `add_facts` function to return a `Target` where previously a `Hash` of the updated facts was returned. Given this is a breaking change it is gated with the `future` flag.
donoghuc added a commit to donoghuc/bolt that referenced this issue Oct 14, 2019
adreyer added a commit that referenced this issue Oct 16, 2019
(GH-1211) Return Target object with plan function `add_facts`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New features and improvements.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant