Merged
Conversation
4 tasks
Member
|
@ritazagoni @mtuchi can you pls review and provide feedback here? |
Collaborator
Author
|
I've just updated the docs to be a bit sharper. I've also moved it all down the page. The docs should be self explanatory. Eventually this section should replace the |
ritazagoni
approved these changes
Jul 29, 2024
Member
ritazagoni
left a comment
There was a problem hiding this comment.
Left one comment for possible typo, otherwise looks great and very clear!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We've just released support in the runtime to treat every operation as a Promise.
See OpenFn/kit#722 for all the gory details.
The tl;dr on this is:
fn().catch().then()should remove the need for 95% of callbacks in adaptor codeeach($.data, fn().then())This is a really big deal and needs good documentation.
The tension here is that I want to communicate the change to users who know openfn, but to new users this promises and callbacks thing is an edge case really.
In the future, most of the existing Callbacks section of the docs will be removed, and we'll just have this Promises stuff and maybe a section explaining
fn()(because a lot of callbacks in existing job code should now migrate to using an fn block)