Skip to content
This repository has been archived by the owner on Mar 13, 2020. It is now read-only.

Commit

Permalink
chore: update LABS.md
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondfeng committed May 13, 2019
1 parent 49ce157 commit 3749d6f
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 14 deletions.
71 changes: 57 additions & 14 deletions LABS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## LoopBack 4 Labs
# LoopBack 4 Labs

We created `loopback-labs` monorepo to facilitate development of experimental
features without interfering with `loopback-next`.

`loopback-labs` is a logical `fork` of `loopback-next` (github does not allow us
to folk `loopback-next` into the same organization (`strongloop`)).
`loopback-labs` is a logical `fork` of `loopback-next` as github does not allow
us to folk `loopback-next` into the same organization (`strongloop`).

We divide responsibilities as follows:
We divide responsibilities of the two repositories as follows:

- `loopback-next`: the repository to develop and release production-ready
features.
Expand All @@ -20,25 +20,31 @@ Two-way interactions can happen between `loopback-labs` and `loopback-next`.

2. Graduate experimental features from `loopback-labs` into `loopback-next`.

## Set up local git repository for `loopback-labs`
![loopback-labs](./loopback-labs.png)

## Workflow

### Work on an experimental feature in `@loopback-labs`

1. Set up local git repository for `loopback-labs`

```sh
git clone [email protected]:strongloop/loopback-labs.git
cd loopback-labs
git remote add next [email protected]:strongloop/loopback-next.git
```

## Work on an experimental feature
2. Work on an experimental feature

It follows the same process and flow as `loopback-next`:

1. Create a feature branch
2. Make changes in the feature branch
3. Submit a PR against `loopback-labs@master`
- Create a feature branch
- Make changes in the feature branch
- Submit a PR against `loopback-labs@master`

Please make sure changes to production packages

## Pull in changes from `loopback-next@master`
3. Pull in changes from `loopback-next@master`

```sh
cd loopback-labs
Expand All @@ -48,7 +54,7 @@ git rebase next/master
git push --force-with-lease
```

## Rebase the experimental feature branch against master
4. Rebase the experimental feature branch against master

```
cd loopback-labs
Expand All @@ -58,16 +64,16 @@ git rebase origin/master
git push --force-with-lease
```

## Graduate an experimental feature
### Graduate an experimental feature

### Set up local git repository for `loopback-next`
1. Set up local git repository for `loopback-next`

```sh
cd loopback-next
git remote add labs [email protected]:strongloop/loopback-labs.git
```

### Pull in the experimental feature from `loopback-labs` into `loopback-next`
2. Pull in the experimental feature from `loopback-labs` into `loopback-next`

```sh
cd loopback-next
Expand All @@ -80,3 +86,40 @@ git fetch --all

// Create a PR
```

## Questions

- Do we merge experimental features into `loopback-labs@master` or keep each of
them isolated in `loopback-labs@labs/<my-experimental-feature>` branch?

To keep an experimental feature fully isolated and make it easy to graduate into
`loopback-next`, we should consider the following branching strategy illustrated
by an experimental feature named `socketio`.

1. Create an integration branch for SocketIO:

```sh
git checkout -b labs/socketio
```

2. Create a development branch for SocketIO:

```sh
git checkout -b experimental/socketio
```

3. Start to commit code into `experimental/socketio`

4. Submit a PR against `labs/socketio`

5. Merge the PR from `experimental/socketio` into `labs/socketio`

6. Graduate `socketio` into `loopback-next`:

```sh
cd loopback-next
git checkout -b feature/sockeio
git fetch --all
git rebase labs/labs/socketio
git push
```
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Experimental features for

## Contributing

Check out [LABS.md](./LABS.md) to understand the workflow to develop
experimental features in `loopback-labs`.

See the following resources to get you started:

- [Contributing Guidelines](./docs/CONTRIBUTING.md)
Expand Down
Binary file added loopback-labs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3749d6f

Please sign in to comment.