<commit_before>## Creating a Force Review App

If you want to create a deploy for a WIP feature or for QA, Hokusai supports [Review Apps](https://github.com/artsy/hokusai/blob/master/docs/Review_Apps.md).

You can create a review app via CircleCI which runs the [`build_review_app.sh`](https://github.com/artsy/force/blob/master/scripts/build_review_app.sh) script. Or, you can run that script locally, which will be slower because it involves building the docker image locally and pushing it up to AWS ECR.

The rest of the doc assumes you are working with a review app called `awesome-feature`.

### Building on Circle

This is the easiest and fastest way. Push up a branch named `review-app-awesome-feature`

CircleCI will match the `review-app-` prefix and either:

1. Create a review app using `build_review_app.sh` if the review app doesn't
   exist yet (i.e. first successful push of the branch), or
2. Update an existing review app using `update_review_app.sh`
3. Once CI is complete follow [this step](https://github.com/artsy/force/blob/master/docs/creating_review_app.md#dns-setup) to setup DNS.

### Building on Local

First, make sure `jq` is installed:

```sh
brew install jq
```

Then launch the script with:

```sh
./scripts/build_review_app.sh awesome-feature
```

The script will save a K8s spec in `hokusai/awesome-feature.yml`

### Accessing the review app.

To access the review app, you must create a DNS name for it. The name must match the name of the review app, and it must end in `artsy.net`. So it must be `awesome-feature.artsy.net`. This is required for full OAuth flow to complete. On Cloudflare, please do:

1. [Login to Cloudflare](https://dash.cloudflare.com/), and navigate to **artsy.net** > **DNS**
1. Click `+ Add Record`
1. Change `Type` dropdown to `CNAME`
1. Under `Name` enter `awesome-feature`
1. Under `Target` say `nginx-staging.artsy.net`
1. Hit `Save`
1. DNS will propagate and after a few minutes the review app will be available via `awesome-feature.artsy.net`

### Updating the review app

If you want to push subsequent changes to the review app, push a new build to the same tag with the `--overwrite` flag:

```sh
hokusai registry push --overwrite --skip-latest --force --tag awesome-feature
```

and redeploy the app:

```sh
hokusai review_app deploy awesome-feature awesome-feature
```

### Deleting a Review App

When you are done using the review app, please delete it by:

```sh
yarn delete-review-app awesome-feature
```

And please delete its DNS entry by:

1. [Login to Cloudflare](https://dash.cloudflare.com/), and navigate to **artsy.net** > **DNS**
1. In the search box, type `awesome-feature`
1. Locate the correct record in search results, hit `Edit` at end of line
1. Hit the `Delete` button on lower left

### Conclusion<commit_msg>update review app delete instruction to be more assertive.<commit_after>## Creating a Force Review App

If you want to create a deploy for a WIP feature or for QA, Hokusai supports [Review Apps](https://github.com/artsy/hokusai/blob/master/docs/Review_Apps.md).

You can create a review app via CircleCI which runs the [`build_review_app.sh`](https://github.com/artsy/force/blob/master/scripts/build_review_app.sh) script. Or, you can run that script locally, which will be slower because it involves building the docker image locally and pushing it up to AWS ECR.

The rest of the doc assumes you are working with a review app called `awesome-feature`.

### Building on Circle

This is the easiest and fastest way. Push up a branch named `review-app-awesome-feature`

CircleCI will match the `review-app-` prefix and either:

1. Create a review app using `build_review_app.sh` if the review app doesn't
   exist yet (i.e. first successful push of the branch), or
2. Update an existing review app using `update_review_app.sh`
3. Once CI is complete follow [this step](https://github.com/artsy/force/blob/master/docs/creating_review_app.md#dns-setup) to setup DNS.

### Building on Local

First, make sure `jq` is installed:

```sh
brew install jq
```

Then launch the script with:

```sh
./scripts/build_review_app.sh awesome-feature
```

The script will save a K8s spec in `hokusai/awesome-feature.yml`

### Accessing the review app.

To access the review app, you must create a DNS name for it. The name must match the name of the review app, and it must end in `artsy.net`. So it must be `awesome-feature.artsy.net`. This is required for full OAuth flow to complete. On Cloudflare, please do:

1. [Login to Cloudflare](https://dash.cloudflare.com/), and navigate to **artsy.net** > **DNS**
1. Click `+ Add Record`
1. Change `Type` dropdown to `CNAME`
1. Under `Name` enter `awesome-feature`
1. Under `Target` say `nginx-staging.artsy.net`
1. Hit `Save`
1. DNS will propagate and after a few minutes the review app will be available via `awesome-feature.artsy.net`

### Updating the review app

If you want to push subsequent changes to the review app, push a new build to the same tag with the `--overwrite` flag:

```sh
hokusai registry push --overwrite --skip-latest --force --tag awesome-feature
```

and redeploy the app:

```sh
hokusai review_app deploy awesome-feature awesome-feature
```

### Deleting a Review App

You should delete review apps as soon as QA is complete.

Delete the app by:

```sh
yarn delete-review-app awesome-feature
```

Delete its DNS entry by:

1. [Login to Cloudflare](https://dash.cloudflare.com/), and navigate to **artsy.net** > **DNS**
1. In the search box, type `awesome-feature`
1. Locate the correct record in search results, hit `Edit` at end of line
1. Hit the `Delete` button on lower left

### Conclusion
{'fraction_non_alphanumeric': 0.10102618542108988, 'fraction_numerical': 0.005307855626326964, 'mean_word_length': 4.134423251589464, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7290782', 'n_tokens_mistral': 1770, 'n_tokens_neox': 1709, 'n_words': 778}