Skip to content

Commit

Permalink
fixup! Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Serge Croisé <SergeCroise@users.noreply.github.com>
Co-authored-by: bougue-pe <150040524+bougue-pe@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 2, 2024
1 parent 67029a0 commit c4fa560
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/docs/guides/contribute/code-review.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ We propose you a few tips and recommendations that we think are relevant to a hu

## Script for testing a PR

When reviewing a PR, it is usefull to test the changes by starting an instance of the OSRD app based on the PR branch.
When reviewing a PR, it is useful to test the changes by starting an instance of the OSRD app based on the PR branch.

A script is available to spin up a separate and dedicated app instance using the PR number. The script uses the Docker images already built by the CI and launches the app, rin an isolated manner. This allows you to run both instances simultaneously without conflicts (ideal for comparing changes, for example). The key advantage is that reviews become faster since you don’t need to recompile code; you only need to download the pre-built images.
A script is available to spin up a separate and dedicated app instance using the PR number. The script uses the Docker images already built by the CI and launches the app, rin an isolated manner. This allows you to run both instances simultaneously without conflicts (ideal for comparing changes, for example).

Additionally, you can specify a database backup, which the script will load directly into the app.

Expand All @@ -32,8 +32,8 @@ Additionally, you can specify a database backup, which the script will load dire
* `./scripts/pr-infra-compose.sh 8914 up`: Downloads the CI-generated images for PR #8914 and launches the application.
* `./scripts/pr-infra-compose.sh 8914 up-and-load-backup ./path_to_backup`: Downloads the images for PR #8914, restores data from the provided backup, and starts the application.
* `./scripts/pr-infra-compose.sh 8914 down`: Shuts down the test application instance for PR #8914.
* `./scripts/pr-infra-compose.sh 8914 down-and-clean`: Shuts down the test instance and cleans all data from the instance's docker volumes (PG data, Redis cache, RabbitMQ) to prevent all side-effects.
* `./scripts/pr-infra-compose.sh 8914 down-and-clean`: Shuts down the test instance and cleans all the instance's docker volumes (PG data, Redis cache, RabbitMQ) to prevent any side-effects.

### Accessing Services:

Apart from the `frontend` server, all localhost services are available on localhost, with a minor adjustment: you’ll need to add 1 to each port number (to avoid conflicts with the dev environment) : for a list of common ports, have a lok at the [dedicated docker compose file](https://github.com/OpenRailAssociation/osrd/blob/dev/docker/docker-compose.pr-test.yml).
Apart from the `frontend` server, all localhost services are available on localhost, with a minor port adjustment (to avoid conflicts with the dev environment): for a list of common ports, have a look at the [dedicated docker-compose file](https://github.com/OpenRailAssociation/osrd/blob/dev/docker/docker-compose.pr-test.yml).

0 comments on commit c4fa560

Please sign in to comment.