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

docs(sequelize): explain what options.retry accepts #11643

merged 3 commits into from Nov 9, 2019


Copy link

@davidjb davidjb commented Nov 5, 2019

Pull Request check-list

Please make sure to review and check all of these items:

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you update the typescript typings accordingly (if applicable)?
  • Did you follow the commit message conventions explained in

Description of change

This explains that options.retry accepts additional options and refers users to that documentation within retry-as-promised's library. Inspired by this comment: #2113 (comment)

For what it's worth, if useful, all the other options from could be documented in Sequelize directly, but there's a risk they could make things confusing or dangerous (eg especially the timeout option within retry).

Copy link

@codecov codecov bot commented Nov 5, 2019

Codecov Report

Merging #11643 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11643   +/-   ##
  Coverage   96.26%   96.26%           
  Files          94       94           
  Lines        9190     9190           
  Hits         8847     8847           
  Misses        343      343
Impacted Files Coverage Δ
lib/sequelize.js 95.93% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afb8cc3...822953e. Read the comment docs.

Copy link

@papb papb commented Nov 9, 2019

Nice, thanks for the PR. This addition is good.

I am now asking myself if our docs for the max and match options should actually be removed, making the reader go to the main source to check it out. What do you think?

Copy link
Contributor Author

@davidjb davidjb commented Nov 9, 2019

It's a tough one -- I think it'd be best to expand Sequelize's documentation to cover at least the most common or useful options and then treat them as "features" of Sequelize itself, since the retry functionality is just that.

The existing options are useful to know about and if they were removed, then they'd be a lot less obvious because someone may not click through to the underlying library. Even if they did, it's hard to make the connection between the retry option object in Sequelize and the second argument in I've started using retry-as-promised in other code and it took a while to get my head around it all -- I was able to see the options in Sequelize's docs and notice the common properties. There's also the risk of being dependent on the structure and quality of the underlying library's documentation too.

papb approved these changes Nov 9, 2019
Copy link

@papb papb left a comment

Thanks, I'm convinced, let's keep it this way!

Thanks for the PR!

@papb papb merged commit c3dd6a3 into sequelize:master Nov 9, 2019
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants