Skip to content
65 changes: 64 additions & 1 deletion docs/community/setting-up-a-dev-env.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -835,5 +835,68 @@ Now, set up debug points in the codebase and click "Launch Go Code".

## 7. OLake UI Setup

**UI setup**: Please follow the setup instructions at [https://github.com/datazip-inc/olake-ui/](https://github.com/datazip-inc/olake-ui/)
**UI setup**: Please follow the setup instructions at [Quick Start (Docker Compose)](https://olake.io/docs/getting-started/quickstart/#quick-start-docker-compose)

### Local Testing with Custom Drivers

This guide explains how to test changes made in the [olake-cli](https://github.com/datazip-inc/olake) repository within the [olake-ui](https://github.com/datazip-inc/olake-ui) environment. This is useful for testing new features, or JSON schema changes

#### 1. Build Custom Images

Before running the tests, build custom Docker images for the driver under test.

Execute the following commands from the root of the [olake-cli](https://github.com/datazip-inc/olake) repository on your current working branch.
Build the image for the desired source driver and also build the MySQL image, as MySQL is used as the default driver for destination-related operations.

Before building the images, make sure the JAR file exists:

```bash
mvn -f destination/iceberg/olake-iceberg-java-writer/pom.xml clean package -DskipTests
```

```bash
# Build source image for the selected driver
docker build \
Comment thread
deepanshupal09-datazip marked this conversation as resolved.
--build-arg DRIVER_NAME=<driver_name> \
-t olakego/source-<driver_name>:<version_tag> \
.
```

```bash
# Build image for MySQL (required for destination related operations)
docker build \
--build-arg DRIVER_NAME=mysql \
-t olakego/source-mysql:<version_tag> \
.
```


#### 2. Configure Environment Variables

The UI server needs to be informed to use these custom images and bypass the standard version compatibility checks.

Set the following environment variables to the `olake-ui` service in the `docker-compose-v1.yml` file:

| Variable | Value | Description |
| :--- | :--- | :--- |
| `APP_ENV` | `development` | Enables developement environment. |
| `CUSTOM_DRIVER_VERSION` | `<version_tag>` | The specific tag you used when building your custom image. |

#### Docker compose:
Comment thread
deepanshupal09-datazip marked this conversation as resolved.
```bash title="docker-compose-v1.yml"
olake-ui:
image: ${CONTAINER_REGISTRY_BASE:-registry-1.docker.io}/olakego/ui:latest
pull_policy: always
container_name: olake-ui
environment:
APP_ENV: development
CUSTOM_DRIVER_VERSION: <version_tag>
```

#### 3. How It Works
Comment thread
deepanshupal09-datazip marked this conversation as resolved.

`CUSTOM_DRIVER_VERSION` takes effect only when `APP_ENV` is set to `development`.

When both are set:
- The specified version is added to the driver version dropdown in the UI.
- Semver compatibility checks are bypassed.
Loading