Skip to content

Commit 48538fa

Browse files
committed
Merge pull request rust-lang#56 from emberjs/two-dot-x-improvements
Release cycle improvements
2 parents 7c43fb4 + 3604f24 commit 48538fa

File tree

1 file changed

+199
-0
lines changed

1 file changed

+199
-0
lines changed

active/0000-improved-release-cycle.md

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
# Refining the Release Process
2+
3+
Ember balances a desire for overall stability with a desire for continued improvements using a two-pronged approach:
4+
5+
* General adherence to Semantic Versioning, which means that we don't
6+
make breaking changes to public, documented APIs except when the
7+
major version changes.
8+
* A rapid release cycle that allows us to ship additive changes to the
9+
framework on a regular, digestible basis.
10+
11+
Since Ember 1.0, we have refined this approach:
12+
13+
* All new public APIs are added using feature flags onto the master
14+
branch. Feature flagged features are not included in beta or release
15+
builds until they are "Go"ed by the core team.
16+
* We avoid breaking heavily used but private APIs in minor versions.
17+
* When we feel we must break a private API that is heavily used, we
18+
use a two-step deprecation approach: deprecate the private API in
19+
one release and remove it in a subsequent release, once apps and
20+
add-ons have had an opportunity to upgrade.
21+
* When we plan to make breaking changes in a future major release,
22+
we first deprecate the changes in a previous minor release.
23+
* We never deprecate features until there is an already-landed
24+
transition path to a new approach whose feature flag has already
25+
been "Go"ed.
26+
27+
And finally:
28+
29+
* A major release does not introduce any new breaking changes that
30+
were not previously deprecated. Major versions simply remove
31+
deprecated features that already landed.
32+
33+
Ember 2.0 is the first major release cycle where we have followed these refinements; this document is an attempt to outline some additional refinements that we might adopt going forward.
34+
35+
## Benefits of the 1.x Model
36+
37+
* New features are added predictably, and it's relatively easy to
38+
follow the list of new APIs that are under development, and where
39+
they are in the process.
40+
* There is little pressure for contributors to land a feature
41+
prematurely, because missing a release deadline isn't
42+
catastrophic–there will be another train six weeks hence.
43+
* We have a lot of very good automation tools that keep the trains
44+
running–commits can be (mostly) automatically backported to the
45+
current beta or release version.
46+
* Upgrading Ember itself from version to version is typically a quick
47+
process, except when private APIs are in use. We aim for upgrades to
48+
be possible to slot into existing product sprints, and the nature of
49+
the process means that we tend to hit this goal for most users.
50+
* Upgrading Ember across a number of versions is typically pretty
51+
straightforward, at least in theory.
52+
53+
In total, this process provides a way for us to clearly message medium-term changes in a way that helps you make the changes predictably and as mechanically as possible.
54+
55+
The process of getting from *here* to *there* is a series of incremental releases with deprecations, which gives you a trail of breadcrumbs to follow as things change.
56+
57+
## Problems with the 1.x Model
58+
59+
While the approach we're using has provided a lot of benefits, there are a number of areas that could still use improvement:
60+
61+
* While it is in theory possible to upgrade only once every few
62+
releases, there is no guidance about exactly how to do that, and
63+
little clarity about how many releases we plan to support with
64+
security fixes. (Because of the two-step deprecations of heavily
65+
used private APIs, it is in practice important to go through each
66+
intermediate release to clear deprecation warnings before
67+
proceeding.)
68+
* While SemVer guarantees apply to public APIs, many addons are forced
69+
to use private APIs as part of experiments. These experiments are a
70+
crucial part of the evolution of the Ember ecosystem, and the Ember
71+
1.x series has had a fair bit of churn in these APIs.
72+
* While the SemVer guarantees apply to Ember proper, they do not apply
73+
to parts of the blessed experience that have not yet reached 1.0.
74+
* While the SemVer guarantees promise that your code will continue
75+
working, they do not address changes to idiomatic Ember usage, which
76+
can change over time. In practice, this means that there can be
77+
churn in the experience of using Ember without actual breakages.
78+
* While deprecations technically don't force you to change anything,
79+
in practice clearing deprecations is a part of the upgrade process.
80+
A constant stream of deprecations, like in the lead-up to Ember 2.0,
81+
can feel almost as bad as breaking changes.
82+
* In the lead-up to Ember 2.0, a desire to remove as much cruft as
83+
quickly as possible led to a need to land new features with much
84+
more urgency than usual.
85+
86+
In total, these problems introduce churn in the experience of using Ember. In practice, things like moving to ES6 modules, moving to Ember CLI, and the changes in Ember Data have made the experience of "keeping up" more frenetic than we would have liked.
87+
88+
Because Ember releases a new version every six-weeks, it's easy to associate the overall churn with the rapid pace of releases.
89+
90+
## Non-Goals of the Improvements
91+
92+
The release process does not attempt to change the overall pace of change, but rather to make changes more predictable, easy to track, and easy to upgrade to.
93+
94+
The six-week cycle can incidentally affect the pace of change, because it means that large changes usually need to be broken up into pieces that can land a bit at a time. However, in practice this speeds up ecosystem-wide adoption of the entire feature, because people do not find themselves stuck behind a big-bang change that they can't schedule the time to upgrade to.
95+
96+
A recent survey of the Ember ecosystem, which had close to 1,000 respondents, showed that the vast majority of Ember users are using one of the past three versions of Ember.
97+
98+
## Proposal: LTS Releases
99+
100+
In theory, it's possible to upgrade every few releases, instead of every release. This has a few drawbacks:
101+
102+
* Because of the two-step deprecation process for heavily-used
103+
private APIs that we want to remove, it is in practice necessary
104+
to go through all intermediate releases in order to catch possible
105+
deprecations.
106+
* We currently don't have any official policy about which exact
107+
releases we backport security patches to, other than a promise
108+
that we will always backport to the previous released version.
109+
* Since different people upgrade at different rates, it's hard for
110+
add-ons and other parts of the Ember ecosystem that are not
111+
bound by the same SemVer guarantees to know which versions to
112+
continue to support.
113+
114+
**I propose that every 4 releases is considered a "Long-Term-Support (LTS) release" . With the six-week cycle, that means every 24 weeks, or roughly twice per year.**
115+
116+
This means:
117+
118+
* We will only remove heavily used private APIs if they were
119+
deprecated in a previous LTS release. This means that
120+
if a feature is deprecated in 2.3, the first LTS release that
121+
the deprecation will appear in is 2.4, and it can therefore be
122+
removed in 2.5.
123+
* We will provide release notes for each LTS release that
124+
roll up the changes for the releases it includes, including new
125+
deprecations and new features.
126+
* We will use the LTS releases to provide better big-picture
127+
messaging on the goals of any deprecations and changes to
128+
idiomatic Ember.
129+
* Security fixes will always be backported to the most recent
130+
LTS release.
131+
* We will encourage the Ember ecosystem to maintain support for
132+
the LTS releases, and lead by example with our own
133+
projects that have not yet reached SemVer stability. Ideally, this
134+
will give more of a voice to people who are upgrading less
135+
frequently.
136+
137+
This means that people who want to stay on the latest and greatest can continue to upgrade every six weeks (with the same SemVer guarantees we've come to expect), and people who want to upgrade less frequently can do so.
138+
139+
In practice, since these releases still abide by SemVer, upgrading from LTS release to LTS release should not be significantly more work than upgrading along the six-week release cycle.
140+
141+
Upgrading less frequently will mean, of course, that you would need to wait to take advantage of new features, and experience less gradual changes to idioms. It will also mean that every upgrade will come with a bigger bundle of deprecations to clear.
142+
143+
> It is important for us to keep an eye on the situation to see whether less frequent updates result in people getting left behind.
144+
145+
## Proposal: Svelte Releases and Major Releases
146+
147+
Another problem worth addressing is that, as Ember gradually deprecates old idioms to make way for new ones, SemVer guarantees require that we continue shipping deprecated features until the next major release.
148+
149+
This has two related problems:
150+
151+
1. Ember users who are not using deprecated features need to continue
152+
shipping deprecated code, which increases both code bloat and
153+
an opportunity to accidentally slip back into older idioms.
154+
2. Ember itself needs to continue maintaining support for
155+
deprecated features in its internals, which, over time, results
156+
in cruft that impacts our ability to improve Ember.
157+
158+
However, we also need to be cognizant of the fact that changes to Ember idioms take time to be reflected in online materials, so it's important for snippets copy-and-pasted from tutorials to continue to produce deprecation notices for some time.
159+
160+
In general, this is the question of how to "garbage collect" cruft in the framework gradually and with minimal impact.
161+
162+
Leading up to the 2.0 release, we thought we would address this issue with periodic "cruft removal" major releases. Every so often, we would issue a major release with the primary purpose of clearing out accumulated cruft. Minor releases could create deprecations, but not purge their associated code.
163+
164+
Unfortunately, because of the fact that **Ember does not generally deprecate features without a clear transition to something else**, this meant that the 2.0 release became a critical release for adding new features as well. In the run-up to 2.0, we felt a higher degree of urgency to add new features in the programming model to replace ones we expected to want to remove early in the 2.x series.
165+
166+
The goal of the train release model is to eliminate big-bang releases and the attendant stress on releasing particular features by a given date, and the 2.0 release has been far too disruptive to that goal.
167+
168+
In the 2.x cycle, I propose a few enhancements:
169+
170+
1. Ember itself will more clearly mark deprecated features in a
171+
similar way that it marks new features, including with the
172+
release it was deprecated in.
173+
2. Ember CLI will support "svelte builds", which strip out
174+
deprecated features.
175+
3. In development mode, Ember CLI will convert deprecated features
176+
into errors, to ensure that people running svelte builds can still
177+
get clear messages when using code that was designed for earlier
178+
builds, including addons.
179+
4. We will still use major releases to remove built up cruft,
180+
especially deeply intertwined cruft, but the svelte releases
181+
should take the pressure off of the major release timeline.
182+
183+
**The 1.x release cycle helped us establish an orderly process for adding features; this proposal establishes a more orderly process for removing them.**
184+
185+
## Proposal: Plugin APIs
186+
187+
Since the release of Ember 1.0, we have worked on refining the public APIs while maintaining stability. However, those public APIs do not cover all possible use-cases, and add-ons have cropped up to fill the gaps.
188+
189+
Unfortunately, this has placed a heavy compatibility burden on add-on authors who want to maintain stability in their public APIs even as versions of Ember have changed the private APIs they rely on.
190+
191+
In practice, the costs of the six-week release cycle weigh most heavily on add-on authors, who are often forced into using private APIs, but still want to keep their add-ons working with every release.
192+
193+
The canary and beta cycles help to ensure that popular add-ons work by the time the release version comes out, but only because add-on authors keep a close eye on the beta releases and absorb the churn on behalf of their users.
194+
195+
**I propose that as of Ember 2.0, any use of a private API in a plugin is considered a bug in Ember to be fixed.**
196+
197+
That doesn't mean that add-on authors should never use private APIs: to the contrary, use of private APIs when no other choice is available helps us discover what APIs are missing.
198+
199+
But a major goal of the 2.x series of Ember should be to identify ways to extend the stability promises that Ember offers to application authors to add-on authors.

0 commit comments

Comments
 (0)