acceptance.md 4.41 KB
Newer Older
1
2
3
4
# Homer MergeRequest Acceptance process

The Acceptance process slightly differs whether you are a project's *developer* (or higher) or not.

Simon Latapie's avatar
Simon Latapie committed
5
### Voting system
6

7
8
9
10
11
12
13
14
15
#### General rules

- Only project *developers* (with a *developer* role in the project or higher) votes are taken into account.
- Votes on your own Merge Request (either positive or negative) are ignored.

#### New Method

- The **Score** is computed by counting the current number of approvals from the project *developers*.

16
17
Note: there is no real replacement for downvotes (:thumbsdown:) from the old method: this action is merged with the unresolved thread requirement.

18
19
20
#### Old method

- The **Score** is computed by comparing the number of :thumbsup: and :thumbsdown: given to the MergeRequest.
21

Simon Latapie's avatar
Simon Latapie committed
22
### Process Diagram
23
24

![](acceptance.svg)
25

26

Simon Latapie's avatar
Simon Latapie committed
27
# Implementation
28
29
30

Homer uses a simple decision graph to determine the status of the merge requests.

Simon Latapie's avatar
Simon Latapie committed
31
32
33
34
35
36
37
38
### Status Definitions

Visible status:
- NotCompliant: This MR doesn't pass the mandatory requirements such as a successful pipeline
- Reviewable: This MR has passed the pipeline and can now be reviewed by developers
- InReview: This MR is being reviewed and has opened discussions
- Acceptable: This MR will be accepted once the cooldown period has passed (24h or 72h)
- Accepted: This MR can be rebased and merged by a developer
Simon Latapie's avatar
Simon Latapie committed
39
- Stale: This MR is not acceptable and inactive for too long (60 days)
Simon Latapie's avatar
Simon Latapie committed
40
41
42
43
44
45
46
47

Internal status:
- Submitted: Initial status
- PipelineReady: Is it possible to check the pipeline result
- QuantumState: It is not possible to know if the merge request is mergeable (the mergeability check is not finished)
- PipelineNotFinished: The pipeline check is not finished.


48
### If the MergeRequest author has Developer role (or higher)
49
50

```mermaid
51
graph TD
52
53
54
55
    Submitted([Submitted]) --> Q1{Is it mergeable?}
    Q1 -->|Yes| PipelineReady([PipelineReady])
    Q1 -->|No| NotCompliant([NotCompliant])
    Q1 -->|Cannot determine| QuantumState([QuantumState])
56
    PipelineReady --> Q2{Is CI OK?}
57
    Q2 -->|Yes| Reviewable([Reviewable])
58
    Q2 -->|No| NotCompliant
59
    Q2 -->|Cannot determine| PipelineNotFinished([PipelineNotFinished])
Simon Latapie's avatar
Simon Latapie committed
60
    Reviewable -->|"No vote (1) and No thread opened during 72h (2)"| Accepted([Accepted])
Simon Latapie's avatar
Simon Latapie committed
61
    Reviewable -->|"Thread opened or another Developer voted"| InReview([InReview])
62
    InReview -->|"All threads resolved and Score >= 0"| Acceptable([Acceptable])
63
    InReview -->|"Inactive for 60 days"| Stale([Stale])
64
    Acceptable -->|Wait for 24h| Accepted
65
66
67
68
69
70
71
72
classDef default fill:#fff,stroke-width:2px
classDef internal stroke-dasharray: 5 5
class Submitted,PipelineReady,QuantumState,PipelineNotFinished internal
style Acceptable color:#8fbc8f,stroke:#8fbc8f
style Accepted color:#009966,stroke:#009966
style InReview color:#FF8800,stroke:#FF8800
style NotCompliant color:#6699cc,stroke:#6699cc
style Reviewable color:#FF610A,stroke:#FF610A
73
style Stale color:#6699cc,stroke:#6699cc
74
75
```

Simon Latapie's avatar
Simon Latapie committed
76
77
78
79
80
#### Notes

*(1)*: Upvotes/approval only do no extend the 72h timer. A downvote or a thread discussion will inhibit this graph transition.

*(2)*: 72h after the creation time of the MR, if there is no new version of it. The exact deadline is the later of:
81
82
- `(time of the first version of the MR or out-of-draft time) + 72h`
- `(time of the last "non simple/fast-forward rebase" version of the MR) + 24h`
Simon Latapie's avatar
Simon Latapie committed
83

84

85
### If the MergeRequest author is **NOT** a project's developer
86
87

```mermaid
88
graph TD
89
90
91
92
    Submitted([Submitted]) --> Q1{Is it mergeable?}
    Q1 -->|Yes| PipelineReady([PipelineReady])
    Q1 -->|No| NotCompliant([NotCompliant])
    Q1 -->|Cannot determine| QuantumState([QuantumState])
93
    PipelineReady --> Q2{Is CI OK?}
94
    Q2 -->|Cannot determine| PipelineNotFinished([PipelineNotFinished])
95
    Q2 -->|No| NotCompliant
96
97
98
    Q2 -->|Yes| Reviewable([Reviewable])
    Reviewable -->|"Thread opened or a Developer voted"| InReview([InReview])
    InReview -->|"All threads resolved and Score > 0"| Acceptable([Acceptable])
99
    InReview -->|"Inactive for 60 days"| Stale([Stale])
100
101
102
103
104
105
106
107
108
    Acceptable -->|Wait for 72h| Accepted([Accepted])
classDef default fill:#fff,stroke-width:2px
classDef internal stroke-dasharray: 5 5
class Submitted,PipelineReady,QuantumState,PipelineNotFinished internal
style Acceptable color:#8fbc8f,stroke:#8fbc8f
style Accepted color:#009966,stroke:#009966
style InReview color:#FF8800,stroke:#FF8800
style NotCompliant color:#6699cc,stroke:#6699cc
style Reviewable color:#FF610A,stroke:#FF610A
109
style Stale color:#6699cc,stroke:#6699cc
110
111
```