|
| 1 | +# Issue and Pull Request Label System |
| 2 | + |
| 3 | +* **Owners:** |
| 4 | + * `@jan--f` |
| 5 | + |
| 6 | +* **Implementation Status:** `Not implemented` |
| 7 | + |
| 8 | +* **Related Issues and PRs:** |
| 9 | + * [PROM-66](https://github.com/prometheus/proposals/pull/66) |
| 10 | + |
| 11 | +* **Other docs or links:** |
| 12 | + * [Kubernetes Label Documentation](https://github.com/kubernetes/test-infra/blob/master/label_sync/labels.md) |
| 13 | + |
| 14 | +> TL;DR: This proposal establishes a label system for issues and pull requests |
| 15 | +> in Prometheus projects, providing clear signals about what needs attention |
| 16 | +> from reviewers or authors, what is actionable, and what is blocked. The |
| 17 | +> system is inspired by Kubernetes labels and designed to work with automated |
| 18 | +> tooling (see PROM-66). |
| 19 | +
|
| 20 | +## Why |
| 21 | + |
| 22 | +As Prometheus projects grow, the volume of issues and pull requests increases. |
| 23 | + |
| 24 | +Without a clear labeling system, it becomes difficult to: |
| 25 | + |
| 26 | +- Identify which issues and PRs need immediate attention |
| 27 | +- Understand whether action is required from maintainers, reviewers, or authors |
| 28 | +- Distinguish between items that are ready for work versus those that are blocked |
| 29 | +- Maintain an efficient review and triage workflow |
| 30 | + |
| 31 | +A systematic approach to labels helps contributors and maintainers quickly |
| 32 | +understand the state of any issue or PR and take appropriate action. |
| 33 | + |
| 34 | +### Pitfalls of the current solution |
| 35 | + |
| 36 | +Currently, there is no standardized label system across Prometheus projects. This leads to: |
| 37 | + |
| 38 | +- Inconsistent labeling practices across repositories |
| 39 | +- Difficulty in identifying what requires attention |
| 40 | +- PRs and issues that languish without clear ownership or next steps |
| 41 | +- No clear signal for when an item is blocked versus ready for action |
| 42 | +- Maintainer time wasted re-evaluating items that haven't changed state |
| 43 | + |
| 44 | +## Goals |
| 45 | + |
| 46 | +Goals and use cases for the solution as proposed in [How](#how): |
| 47 | + |
| 48 | +* Provide clear signals about issue and PR lifecycle states |
| 49 | +* Make it obvious which items need attention from reviewers versus authors |
| 50 | +* Distinguish between actionable items and those waiting on external dependencies |
| 51 | +* Enable automated tooling to assist with workflow management |
| 52 | +* Create consistency across Prometheus ecosystem repositories |
| 53 | +* Reduce maintainer cognitive load when evaluating what needs attention |
| 54 | + |
| 55 | +### Audience |
| 56 | + |
| 57 | +This proposal targets: |
| 58 | + |
| 59 | +- Prometheus maintainers who need to triage and review issues/PRs |
| 60 | +- Contributors who need to understand the state of their submissions |
| 61 | +- Automated tooling that helps manage workflow |
| 62 | + |
| 63 | +## Non-Goals |
| 64 | + |
| 65 | +* Defining how labels are automatically applied (this will be covered in a separate proposal) |
| 66 | +* Creating labels for every possible state or condition |
| 67 | +* Retroactively labeling all existing issues and PRs |
| 68 | + |
| 69 | +## How |
| 70 | + |
| 71 | +### Label Categories |
| 72 | + |
| 73 | +This proposal defines three core label categories (plus an optional fourth for future use) that work together to manage issue and PR workflow: |
| 74 | + |
| 75 | +#### 1. Triage Labels |
| 76 | + |
| 77 | +These labels indicate whether an issue has been evaluated and is ready for work: |
| 78 | + |
| 79 | +- **`triage/needs-triage`**: Initial state for all new issues. Indicates the issue needs initial evaluation by a maintainer to determine validity, priority, and next steps. |
| 80 | +- **`triage/accepted`**: Issue has been triaged and accepted as valid work. It is ready for someone to work on. |
| 81 | +- **`triage/needs-information`**: Issue needs more details from the author before it can be properly evaluated or worked on. |
| 82 | + |
| 83 | +**Workflow**: All issues start with `triage/needs-triage`. During triage, maintainers either replace this with another triage label or remove it entirely. The absence of any triage label (along with issue comments) indicates that triage action has been taken, such as declining or marking as duplicate. |
| 84 | + |
| 85 | +#### 2. Review Labels |
| 86 | + |
| 87 | +These labels manage the pull request review lifecycle: |
| 88 | + |
| 89 | +- **`review/needs-review`**: Initial state for all new PRs. Indicates the PR needs review from maintainers. |
| 90 | +- **`review/changes-requested`**: Reviewers have requested changes. Author action is needed. |
| 91 | +- **`review/lgtm`**: "Looks Good To Me" - PR has received technical approval from a reviewer with domain expertise. |
| 92 | +- **`review/approved`**: PR has received final approval from a maintainer with merge rights (per OWNERS or equivalent). |
| 93 | + |
| 94 | +**Workflow**: All PRs start with `review/needs-review`. After review, this transitions to either `review/changes-requested` or `review/lgtm`. Once approved by appropriate maintainers, it becomes `review/approved`. |
| 95 | + |
| 96 | +#### 3. Blocking Labels |
| 97 | + |
| 98 | +These labels indicate that an issue or PR cannot proceed: |
| 99 | + |
| 100 | +- **`blocked/needs-decision`**: Waiting for architectural or design decision |
| 101 | + from maintainers or community. |
| 102 | +- **`blocked/hold`**: Explicitly placed on hold by a maintainer. Should not be merged or closed even if otherwise ready. |
| 103 | + |
| 104 | +**Workflow**: These labels can be applied at any time when the item becomes blocked. They should be removed when the blocking condition is resolved. |
| 105 | + |
| 106 | +#### 4. Lifecycle Labels (Optional) |
| 107 | + |
| 108 | +These labels track the activity status of issues and PRs. This category is optional and would only be implemented if automated lifecycle management is adopted in the future: |
| 109 | + |
| 110 | +- **`lifecycle/stale`**: No activity for an extended period (e.g., 90 days). Candidate for closure if no activity resumes. |
| 111 | +- **`lifecycle/frozen`**: Should not be auto-closed due to inactivity. Reserved for important long-running items. |
| 112 | +- **`lifecycle/rotten`**: No activity after being marked stale (e.g., 30 additional days). Will be auto-closed soon. |
| 113 | + |
| 114 | +**Workflow**: These would typically be managed by automation based on activity timestamps. Currently, Prometheus projects do not use automated lifecycle management, so these labels are reserved for potential future use. |
| 115 | + |
| 116 | +### Label Interactions |
| 117 | + |
| 118 | +Labels from different categories work together: |
| 119 | + |
| 120 | +- **Active PR ready for review**: `review/needs-review` (no blocking labels) |
| 121 | +- **PR waiting on author**: `review/changes-requested` |
| 122 | +- **PR approved but held**: `review/approved` + `blocked/hold` |
| 123 | +- **Issue accepted and ready**: `triage/accepted` (no blocking labels) |
| 124 | +- **Issue needing more info**: `triage/needs-information` |
| 125 | +- **Issue declined or duplicate**: No triage label (removed after triage with explanatory comment) |
| 126 | + |
| 127 | +### Existing Label Taxonomies |
| 128 | + |
| 129 | +This section documents the existing label taxonomies currently in use across |
| 130 | +Prometheus repositories, particularly in prometheus/prometheus. These labels are |
| 131 | +included here for documentation purposes and reflect current practice. The |
| 132 | +proposal above aims to replace some of the currently in use labels. |
| 133 | + |
| 134 | +#### Component and area Labels |
| 135 | + |
| 136 | +Component labels indicate which part of the codebase an issue or PR affect. |
| 137 | +Area labels provide additional categorization for cross-cutting concerns. |
| 138 | +A few examples of currently used labels: |
| 139 | + |
| 140 | +- **`component/api`**: HTTP API |
| 141 | +- **`component/promql`**: PromQL query engine |
| 142 | +- **`component/promtool`**: promtool CLI utility |
| 143 | +- **`component/rules`**: Recording and alerting rules |
| 144 | +- **`component/scraping`**: Metric scraping and service discovery |
| 145 | +- **`component/service discovery`**: Service discovery mechanisms |
| 146 | +- **`component/tsdb`**: Time series database (storage engine) |
| 147 | +- **`component/ui`**: Web UI |
| 148 | +- **`area/build`**: Build system and build process |
| 149 | +- **`area/ci-cd`**: Continuous integration and deployment |
| 150 | +- **`area/opentelemetry`**: OpenTelemetry integration and compatibility |
| 151 | +- **`area/utf8`**: UTF-8 support and related issues |
| 152 | + |
| 153 | +**Usage**: Issues and PRs typically have one or more component labels to |
| 154 | +indicate the affected areas. Multiple component labels may be applied if changes |
| 155 | +span multiple components. Area labels are less commonly used than component |
| 156 | +labels and typically indicate cross-cutting concerns or specific initiatives. |
| 157 | + |
| 158 | +#### Kind Labels |
| 159 | + |
| 160 | +Kind labels categorize the type of change or issue: |
| 161 | + |
| 162 | +- **`kind/bug`**: Something is broken or not working as intended |
| 163 | +- **`kind/enhancement`**: Improvement to existing functionality |
| 164 | +- **`kind/feature`**: Entirely new functionality |
| 165 | +- **`kind/cleanup`**: Code cleanup, refactoring, or technical debt reduction |
| 166 | +- **`kind/optimization`**: Performance improvements |
| 167 | +- **`kind/change`**: General change that doesn't fit other categories |
| 168 | +- **`kind/breaking`**: Breaking change that affects backward compatibility |
| 169 | + |
| 170 | +**Usage**: Issues and PRs typically have exactly one kind label to indicate the primary nature of the change. The kind label helps communicate the impact and urgency of the change. |
| 171 | + |
| 172 | +#### Priority Labels |
| 173 | + |
| 174 | +Priority labels indicate the urgency and importance of an issue or PR: |
| 175 | + |
| 176 | +- **`priority/P0`**: Critical priority - requires immediate attention (e.g., production outages, security issues) |
| 177 | +- **`priority/P1`**: High priority - should be addressed in the current release cycle |
| 178 | +- **`priority/P2`**: Medium priority - should be addressed soon but not urgent |
| 179 | +- **`priority/P3`**: Low priority - nice to have but can wait |
| 180 | +- **`priority/Pmaybe`**: Lowest priority - may or may not be addressed; needs further discussion |
| 181 | + |
| 182 | +**Usage**: Priority labels are typically assigned during triage and help maintainers and contributors understand what to work on first. Not all issues have priority labels assigned. |
| 183 | + |
| 184 | +#### Other Common Labels |
| 185 | + |
| 186 | +Many other labels are currently in use. this proposal does not seek to prescribe |
| 187 | +any changes to how all labels are used. For example to following are well |
| 188 | +established and usefule: |
| 189 | + |
| 190 | +- **`help wanted`**: Good issues for external contributors |
| 191 | +- **`good first issue`**: Good for newcomers to the project |
| 192 | +- **`low hanging fruit`**: Easy to implement |
| 193 | +- **`not-as-easy-as-it-looks`**: Appears simple but has hidden complexity |
| 194 | + |
| 195 | +Other labels should probably be unified into the label taxonomy proposed above. |
| 196 | + |
| 197 | +For example: |
| 198 | + |
| 199 | +- **`duplicate`**: Duplicate of another issue |
| 200 | +- **`invalid`**: Issue is not valid or is spam |
| 201 | +- **`won't fix`**: Issue will not be addressed |
| 202 | +- **`stale`**: No recent activity |
| 203 | +- **`keepalive`**: Should not be marked stale or auto-closed |
| 204 | + |
| 205 | +**Usage**: These labels serve various workflow and community needs. Some are |
| 206 | +applied manually, while others (like `dependencies`) are often applied |
| 207 | +automatically. Some labels should be abandoned in favor of the structured labels |
| 208 | +proposed above. |
| 209 | + |
| 210 | +### Implementation Considerations |
| 211 | + |
| 212 | +This proposal focuses on defining the label taxonomy. A separate proposal will address: |
| 213 | + |
| 214 | +- Automation for applying initial labels (e.g., `triage/needs-triage` on new issues) |
| 215 | +- Automation for lifecycle labels based on activity (optional) |
| 216 | +- Integration with tooling to make it easier to apply labels consistently |
| 217 | + |
| 218 | +### Validation |
| 219 | + |
| 220 | +Success will be measured by: |
| 221 | + |
| 222 | +- Reduced time to first triage for new issues |
| 223 | +- Clearer visibility into PR review pipeline |
| 224 | +- Fewer "lost" or forgotten issues and PRs |
| 225 | +- Positive feedback from maintainers about workflow clarity |
| 226 | +- Successful integration with automated tooling |
| 227 | + |
| 228 | +## Alternatives |
| 229 | + |
| 230 | +### Alternative 1: Minimal Label Set |
| 231 | + |
| 232 | +Use only `needs-triage`, `needs-review`, and `hold` labels. |
| 233 | + |
| 234 | +**Rationale for rejection**: Too minimal. Doesn't provide enough granularity to distinguish between "waiting on author" vs "waiting on maintainer" vs "blocked externally", which are common and important states. |
| 235 | + |
| 236 | +### Alternative 3: Use Existing GitHub Features Only |
| 237 | + |
| 238 | +Rely on GitHub's built-in review states, assignees, and milestones without custom labels. |
| 239 | + |
| 240 | +**Rationale for rejection**: GitHub's native features don't provide sufficient granularity for triage states or blocking conditions. Custom labels allow for automation and clearer communication of project-specific workflow. |
| 241 | + |
| 242 | +### Alternative 4: Adopt Kubernetes Labels Exactly |
| 243 | + |
| 244 | +Use the exact label names and taxonomy from Kubernetes. |
| 245 | + |
| 246 | +**Rationale for rejection**: While Kubernetes provides excellent inspiration, Prometheus has different workflow needs. For example, the proposed `review/*` namespace is more explicit than Kubernetes's use of `lgtm` and `approved` at the root level. The proposal aims for clarity over brevity. |
| 247 | + |
| 248 | +## Action Plan |
| 249 | + |
| 250 | +* [ ] Review and accept this proposal (establishes label taxonomy) |
| 251 | +* [ ] Create labels |
| 252 | +* [ ] Pilot the label system in one repository (e.g., prometheus/prometheus) |
| 253 | +* [ ] Document label meanings in contributor guides |
| 254 | +* [ ] Set up automation for lifecycle labels (stale/rotten) (optional) |
0 commit comments