Skip to content

Commit 36e543d

Browse files
authored
Add a document describing release cycle and backporting criteria. (#18636)
This document specifies the new release cycle and criteria for backporting PRs from the `main` branch to the LTS line. The backporting flowchart was discussed before. I think it reflects the compiler team's consensus. The release cycle part is new, and I'm looking forward to feedback.
2 parents 5bb6f0d + a189999 commit 36e543d

File tree

1 file changed

+172
-0
lines changed

1 file changed

+172
-0
lines changed

project/RELEASES.md

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# Scala LTS maintenance and release cycle
2+
3+
## Scala LTS and Scala Next
4+
5+
Since Scala 3.3.0, there are always two versions of Scala 3 being developed at the same time: Scala Next and Scala LTS.
6+
7+
Scala Next continues all practices since before the 3.3.0. It maintains backward output (TASTy and binary) compatibility between all versions and forward output compatibility between patch releases of the same minor version. This version is being actively developed on the `main` branch. All new bug fixes and features will be merged to that version, i.e., to the `main` branch.
8+
9+
Scala LTS is a selected minor version (currently 3.3) that, unlike all other minor versions, has patch releases even though there is a newer minor version. Aside from our standard output compatibility guarantees, it is intended to preserve backward source compatibility. As no new features and bugfixes (with the rare exception of LTS-only hotfixes) will be developed for LTS, but instead, selected changes from the Next branch will be backported, there is no development branch for Scala LTS. All changes are merged to release branches instead. The commit marked with a full release tag for any version is the base for the release branch for the next version.
10+
11+
## What should be backported?
12+
13+
The decision of what changes merged to the `main` branch should be backported is taken according to the following flowchart:
14+
15+
```mermaid
16+
flowchart TB
17+
start(["PR relevant for LTS was merged to main branch"])
18+
-->
19+
cve{"Is this
20+
a fix for a CVE?"}
21+
-- yes --> ocb
22+
23+
subgraph "CVE"
24+
ocb{"Does it cause
25+
any new failures
26+
in the full CB?"}
27+
28+
-- yes -->
29+
regFix[\"Try to provide
30+
a followup fix for
31+
a regressions"/]
32+
33+
-- failure -->
34+
debate[\"Possible workarounds
35+
for new regressions are discussed
36+
by the compiler team"/]
37+
38+
regFix -- success --> ocb
39+
end
40+
ocb -- no --> acc
41+
debate -->|"decision on
42+
the recommended
43+
workarounds"| acc
44+
45+
cve -- no -->
46+
incompat{"Does the fix
47+
break forward
48+
compatibiliy?"}
49+
-- yes --> reject
50+
51+
incompat -- no -->
52+
53+
regression{"Is this a fix for
54+
a regression present
55+
also in LTS?"}
56+
-- yes -->
57+
58+
regIsLTS{"Was the last version
59+
affected by
60+
the regression released
61+
before 3.3.0?"}
62+
-- yes --> ocbReg
63+
64+
subgraph "LTS Regression"
65+
ocbReg{"Does it cause
66+
any new failures
67+
in the full CB?"}
68+
69+
-- yes -->
70+
regFixReg[\"Try to provide
71+
a followup fix for
72+
a regressions"/]
73+
74+
-- failure -->
75+
debateReg[\"Impact of both new and old regression
76+
and possible workarounds
77+
are discussed by the compiler team."/]
78+
79+
regFixReg -- success --> ocbReg
80+
end
81+
ocbReg -- no --> acc
82+
debateReg -->|"decision on
83+
the recommended
84+
workarounds for
85+
the new regression"| acc
86+
debateReg -->|"decision on
87+
the recommended
88+
workarounds for
89+
the old regression"| reject
90+
91+
regression -- no --> types
92+
regIsLTS -- no --> types
93+
types{"Can the fix
94+
change types
95+
in any correct
96+
Scala 3 code?"}
97+
-- yes --> request
98+
types -- no --> ocbOther
99+
100+
request{"Is backport
101+
of the fix
102+
heavily requested?"}
103+
-- yes --> debateReq
104+
request -- no --> reject
105+
106+
debateReq[\"Possibility of
107+
the backport is discussed
108+
by the compiler team"/]
109+
--> |"backport is rejected"| reject
110+
debateReq --> |"backport is accepted"| ocbOther
111+
112+
subgraph "Other Fixes"
113+
ocbOther{"Does it cause
114+
any new failures
115+
in the full CB?"}
116+
117+
-- yes -->
118+
regFixOther[\"Try to provide
119+
a followup fix for
120+
a regressions"/]
121+
-- success --> ocbOther
122+
123+
ocbOther -- no -->
124+
lint{"Does it introduce
125+
any new warnings
126+
behind flags?"}
127+
-- yes -->
128+
lintOcb{"Does it cause any
129+
new failures in the full CB
130+
after forcing a new flag?"}
131+
-- yes --> regFixOther
132+
end
133+
134+
lint -- no --> acc
135+
lintOcb -- no --> acc
136+
regFixOther -- failure --> reject
137+
138+
acc(["The PR is backported"])
139+
reject(["The PR is not backported"])
140+
```
141+
142+
CVE stands for Common Vulnerabilities and Exposures and in the chart above it means an issue with an CVE-ID assigned to it.
143+
144+
CB stands for Community Build, and by full CB we mean the full run of [the Scala 3 Open Community Build](https://github.com/VirtusLab/community-build3).
145+
146+
## How should things be backported?
147+
148+
The backporting process is tracked by [a GitHub Project](https://github.com/orgs/lampepfl/projects/6) in the lampepfl organization. Every PR merged to the `main` branch is automatically added to the `Needs Assessment` column. Those PRs are reviewed by the release officer or other appointed person. They can decide to remove them from the project (backport rejected) or to move them to the `Backporting in progress` column. If the PR with the backport has any differences from the original PR, the person doing the backport will ask the author and reviewers of the original change to review the backport. After merging the backport, the PR will be moved to the `Backport done` column and, after the release, to the `Released` column.
149+
150+
Maintainers can request backporting the entirety or a part of previously rejected PR by adding it to the `Backport requested` column.
151+
152+
Labels from the `backport:*` are used only for backports that targets versions with already released RCs. They can be used to mark changes on the main that are fixing a critical bug present in the Scala Next RC release or changes that were backported to the future Scala LTS versions that should be also backported to the current RCs.
153+
154+
## The release cycles
155+
156+
Two separate lines of the compiler require two intertwined release cycles.
157+
158+
Scala Next strictly follows a six-week release train model. Every six weeks, a release candidate for the next version is published. During the next six weeks, we may release subsequent RCs containing fixes to critical bugs found in the previous RCs. A bug may be considered critical only if it is a regression; that is, some code that was correctly passing a compilation in any earlier versions of Scala 3 is now either failing compilation, crashing the compiler, or generating incorrect output (bytecode or TASTy). The compiler team decides which regression is considered a critical bug that requires a new RC and which can be fixed in the next release. After six weeks, the clock resets, the last released RC is promoted to a stable release, and the RC for the next version is published.
159+
160+
If there is less than a week left before the release, and the last RC still contains critical bugs, the compiler team may decide to postpone publishing the stable version. There will always be at least one whole week between publishing the last RC and promoting it to the status of a stable release. This delay doesn't affect the RC1 date for the next version. It will be released six weeks after the previous version's RC1. The goal is to ensure that delay in releasing one version doesn't cause future releases to be larger in terms of the number of merged PRs, as it can make regressions inside of them more complex to pinpoint and fix, leading to the accumulation of delays for future versions.
161+
162+
Scala LTS has a more relaxed release model. RC1 for the next version is published after the stable release of the previous version. Similar to Scala Next, we may release more RCs, fixing bugs. Unlike Scala Next, the bug doesn't need to be considered critical to guarantee the new RC. For Sala LTS, our primary goal is stability, so delays are acceptable. We guarantee that a stable release is at least six weeks after the first RC and at least one week after the last RC.
163+
164+
The two release cycles are not synchronized in any way, as any synchronization would be broken on any delay in the Scala LTS cycle.
165+
166+
The compiler team may pause the release cycles for a week or two on occasions such as New Year or a conference that most of the team is attending.
167+
168+
### What is being released?
169+
170+
For the Scala LTS, what is released as an RC is always the current head of the release branch for the next release.
171+
172+
For the Scala Next minor releases RC, by default, it is the head of the `main` branch. Based on the Open Community Build results, the compiler team may decide to base the release on some earlier state of the branch.

0 commit comments

Comments
 (0)