Skip to content

Commit e1555fd

Browse files
Arjun Sreedharanthitch97
andauthored
Remove rfcs contents and add redirect notice (#116)
Co-authored-by: Tim Hitchener <thitch97@users.noreply.github.com>
1 parent c04a6ea commit e1555fd

3 files changed

Lines changed: 4 additions & 169 deletions

File tree

rfcs/0000-template.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

rfcs/0001-start-command.md

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,2 @@
1-
# Writing a Yarn Start Command
2-
3-
## Proposal
4-
5-
As part of the re-architecture of the Node.js metabuildpack outlined
6-
[here](https://github.com/paketo-buildpacks/nodejs/blob/main/rfcs/0001-buildpacks-architecture.md),
7-
there is need for a `yarn-start` buildpack with the single responsibility of
8-
setting a start command which uses `tini` and `yarn`.
9-
10-
11-
## Motivation
12-
13-
Moving toward this single-responsibility architecture has a few advantages:
14-
15-
* It enables greater modularity within the Node.js language family.
16-
17-
* It sets the foundation for interoperability between buildpacks across
18-
language families.
19-
20-
* Using `tini` allows for more optimal process management within the container.
21-
22-
`tini` is a process manager for containers which manages zombie processes and
23-
performs signal forwarding. Using an app start command with `tini` ensures
24-
that containers may be stopped gracefully once started.
25-
26-
## Integration
27-
28-
The buildpack will provide no dependencies and will require `node`, `tini`,
29-
`yarn` and `node_modules` during the launch phase.
30-
31-
## Implementation (Optional)
32-
33-
Detection will pass once a `yarn.lock` file is present in the app's source
34-
code, assuming all other buildplan requirements have been met.
35-
36-
If detection is passed, the buildpack will set a start command using `tini` and
37-
`yarn`. An example of a start command could be: `tini -g -- yarn start`.
1+
This page has moved. The new location is:
2+
https://github.com/paketo-buildpacks/rfcs/blob/main/text/nodejs/0010-yarn-start-command.md
Lines changed: 2 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,2 @@
1-
# Reimplement Yarn Start Command
2-
3-
## Proposal
4-
5-
The buildpack will no longer call `yarn start` directly, but instead will
6-
reimplement the behavior of `yarn start` directly.
7-
8-
## Motivation
9-
10-
We've seen flakey issues with process signal handling once we implemented [RFC
11-
0001](0001-start-command.md). Specifically, on some container managers, it
12-
appears that `tini` is not waiting for the entire process group to exit before
13-
exiting itself. This means that our tests that make assertions that log lines
14-
appear in the output during process shutdown are unreliable.
15-
16-
Furthermore, the maintainers of the `yarn` CLI have [openly
17-
stated](https://github.com/yarnpkg/yarn/issues/4667#issuecomment-628241114)
18-
that this issue is considered resolved if you upgrade to `yarn` v2, which the
19-
buildpack has not. There is currently no backport of this functionality to v1
20-
and may never be.
21-
22-
Given all of this, it seems to make more sense now to just take on the cost of
23-
reimplementing the behavior of `yarn start` and removing the complexity of
24-
using `yarn` and `tini` together.
25-
26-
## Implementation
27-
28-
The buildpack will still require `node` and `node_modules` during the `launch`
29-
phase, but will no longer need to require `yarn` or `tini`.
30-
31-
Detection will continue to pass once a `yarn.lock` file is present in the app's
32-
source code, assuming all other buildplan requirements have been met.
33-
34-
If detection is passed, the buildpack will set a start command, optionally also
35-
running the prestart and poststart commands using using the contents of the
36-
`package.json` as follows:
37-
38-
* If `package.json` contains `scripts.start`, `scripts.prestart`, and
39-
`scripts.poststart` fields, the start command will be `<prestart command> &&
40-
<start command> && <poststart command>`. For example, given the following
41-
`package.json`,
42-
43-
```json
44-
{
45-
"scripts": {
46-
"poststart": "echo 'Done starting'",
47-
"prestart": "echo 'Starting'",
48-
"start": "node index.js"
49-
}
50-
}
51-
```
52-
53-
The start command will be `echo 'Starting' && node index.js && echo 'Done starting'`.
54-
55-
* If `package.json` contains `scripts.start` and `scripts.prestart` fields, but
56-
does not contain a `scripts.poststart` field, the start command will be
57-
`<prestart command> && <start command>`. For example, given the following
58-
`package.json`,
59-
60-
```json
61-
{
62-
"scripts": {
63-
"prestart": "echo 'Starting'",
64-
"start": "node index.js"
65-
}
66-
}
67-
```
68-
69-
The start command will be `echo 'Starting' && node index.js`.
70-
71-
* If `package.json` contains `scripts.start` and `scripts.poststart` fields,
72-
but does not contain a `scripts.prestart` field, the start command will be
73-
`<start command> && <poststart command>`. For example, given the following
74-
`package.json`,
75-
76-
```json
77-
{
78-
"scripts": {
79-
"poststart": "echo 'Done starting'",
80-
"start": "node index.js"
81-
}
82-
}
83-
```
84-
85-
The start command will be `node index.js && echo 'Done starting'`.
86-
87-
* If `package.json` contains a `scripts.start`, but does not contain either a
88-
`scripts.prestart` or `scripts.poststart` field, the start command will be
89-
`<start command>`. For example, given the following `package.json`,
90-
91-
```json
92-
{
93-
"scripts": {
94-
"start": "node index.js"
95-
}
96-
}
97-
```
98-
99-
The start command will be `node index.js`.
100-
101-
* If `package.json` does not contain `scripts.start`, `scripts.prestart`, or
102-
`scripts.poststart` fields, the start command will be `node server.js`. For
103-
example, given the following `package.json`,
104-
105-
```json
106-
{}
107-
```
108-
109-
The start command will be `node server.js`.
1+
This page has moved. The new location is:
2+
https://github.com/paketo-buildpacks/rfcs/blob/main/text/nodejs/0012-reimplement-yarn-start-command.md

0 commit comments

Comments
 (0)