Debian Codegraph @

docs/source/maintainers.rst

raw
1 =====================
2 Maintainer Guidelines
3 =====================
4
5 This page describes best practices for Dask maintainers.
6
7 Thank you for helping make Dask a useful library and fostering a
8 welcoming community.
9
10 Merging pull requests
11 =====================
12
13 Pull requests should be reviewed
14 --------------------------------
15
16 Pull requests from non-maintainers should be reviewed and approved by at
17 least one maintainer before being merged.
18
19 Ideally, pull requests from maintainers should also be reviewed before
20 merging. However, because reviewer bandwidth is limited, maintainers will
21 sometimes self-merge their own pull requests if the content of the pull
22 request is viewed as uncontroversial (e.g. typo fix). If a maintainer has
23 a substantial pull request which hasn't received a review, they should ping at
24 least one team or individual maintainer who might be interested in the proposed
25 change. If after some time there is no response and the maintainer is confident
26 in the proposed changes, they should post a final comment along the lines of
27 "Merging in 48 hours if no further response" and then self-merge if no further
28 comments are left within the specified time period. Please leave at least
29 48 hours to allow maintainers in other timezones to respond.
30
31 No maintainer should merge a pull request that they're not comfortable
32 supporting in the future.
33
34 CI should pass
35 --------------
36
37 Before merging a pull request, maintainers should make every effort to ensure
38 that CI passes. Often this will require looking into the logs of a failed run
39 to see what went wrong, and alerting the pull request author. Ideally, no
40 pull request should be merged if there are CI failures, as broken CI in ``main``
41 can easily mask problems with other PRs, and a consistently broken CI can be
42 demoralizing for maintainers.
43
44 However, in practice, there are occasionally flaky tests, broken upstream
45 dependencies, and failures that are otherwise obviously not related to the PR
46 at hand. If that is the case, a maintainer may merge a PR with failing tests,
47 but they should be prepared to follow up with any failures that result from
48 such an unsafe operation.
49
50 Squash merge pull requests
51 --------------------------
52
53 Use squash merging when merging pull requests, as opposed to other merging
54 strategies like rebase merging. To streamline this process, all non-squash
55 merging strategies have been disabled in repository GitHub settings.
56
57 Use clean merge commits
58 -----------------------
59
60 Dask aims to have a straightforward, yet meaningful, ``git log``. To
61 accomplish this, maintainers ensure that both the squashed merge commit
62 title and (optional) message meaningfully reflect the content of the pull
63 request before merging. For example, a merge commit title of "fix typo" should
64 be updated to something along the lines of "Fix typo in ``Array.max`` docstring".
65
66 Note that when squash merging pull requests GitHub will, by default, pre-populate
67 the squashed commit message by concatenating all the individual commit messages
68 in the corresponding pull request. Depending on how careful pull request authors
69 are during development, this default message may be quite verbose and not very
70 descriptive. For example::
71
72 * Fix DataFrame.head bug
73
74 * Handle merge conflicts
75
76 * Oops, fix typo
77
78 If this is the case, the maintainer merging the pull request should either:
79
80 1. Write their own merge commit message that describes the changes in pull request
81 (if they have the available bandwidth).
82 2. Leave the merge commit message blank (again, making sure the commit title is
83 meaningful).