|
| 1 | +# Manifest Runner |
| 2 | + |
| 3 | +An HTTP server for running Airbyte declarative connectors via their manifest files. |
| 4 | + |
| 5 | +## Quick Start |
| 6 | + |
| 7 | +### Installation |
| 8 | + |
| 9 | +The manifest runner is available as an extra dependency: |
| 10 | + |
| 11 | +```bash |
| 12 | +# Using Poetry (preferred) |
| 13 | +poetry install --extras manifest-runner |
| 14 | + |
| 15 | +# Using pip |
| 16 | +pip install airbyte-cdk[manifest-runner] |
| 17 | +``` |
| 18 | + |
| 19 | +### Running the Server |
| 20 | + |
| 21 | +```bash |
| 22 | +# Start the server (default port 8000) |
| 23 | +manifest-runner start |
| 24 | + |
| 25 | +# Start on a specific port |
| 26 | +manifest-runner start --port 8080 |
| 27 | + |
| 28 | +# Or using Python module |
| 29 | +python -m airbyte_cdk.cli.manifest_runner._run start |
| 30 | +``` |
| 31 | + |
| 32 | +The server will start on `http://localhost:8000` by default. |
| 33 | + |
| 34 | +## API Endpoints |
| 35 | + |
| 36 | +### `/manifest/test_read` |
| 37 | +Test reading from a specific stream in the manifest. |
| 38 | + |
| 39 | +**POST** - Test stream reading with configurable limits for records, pages, and slices. |
| 40 | + |
| 41 | +### `/manifest/resolve` |
| 42 | +Resolve a manifest to its final configuration. |
| 43 | + |
| 44 | +**POST** - Returns the resolved manifest without dynamic stream generation. |
| 45 | + |
| 46 | +### `/manifest/full_resolve` |
| 47 | +Fully resolve a manifest including dynamic streams. |
| 48 | + |
| 49 | +**POST** - Generates dynamic streams up to specified limits and includes them in the resolved manifest. |
| 50 | + |
| 51 | +## Authentication |
| 52 | + |
| 53 | +The manifest runner supports optional JWT bearer token authentication: |
| 54 | + |
| 55 | +### Configuration |
| 56 | +Set the environment variable to enable authentication: |
| 57 | +```bash |
| 58 | +export AB_JWT_SIGNATURE_SECRET="your-jwt-secret-key" |
| 59 | +``` |
| 60 | + |
| 61 | +### Usage |
| 62 | +When authentication is enabled, include a valid JWT token in the Authorization header: |
| 63 | +```bash |
| 64 | +curl -H "Authorization: Bearer <your-jwt-token>" \ |
| 65 | + http://localhost:8000/manifest/test_read |
| 66 | +``` |
| 67 | + |
| 68 | +### Behavior |
| 69 | +- **Without `AB_JWT_SIGNATURE_SECRET`**: All requests pass through |
| 70 | +- **With `AB_JWT_SIGNATURE_SECRET`**: Requires valid JWT bearer token using HS256 algorithm |
| 71 | + |
| 72 | +## OpenAPI Specification |
| 73 | + |
| 74 | +The manifest runner provides an OpenAPI specification for API client generation: |
| 75 | + |
| 76 | +### Generating the OpenAPI Spec |
| 77 | +```bash |
| 78 | +# Generate OpenAPI YAML (default location) |
| 79 | +manifest-runner generate-openapi |
| 80 | + |
| 81 | +# Generate to custom location |
| 82 | +manifest-runner generate-openapi --output /path/to/openapi.yaml |
| 83 | +``` |
| 84 | + |
| 85 | +The generated OpenAPI specification is consumed by other applications and tools to: |
| 86 | +- Generate API clients in various programming languages |
| 87 | +- Create SDK bindings for the manifest runner |
| 88 | +- Provide API documentation and validation |
| 89 | +- Enable integration with API development tools |
| 90 | + |
| 91 | +### Interactive API Documentation |
| 92 | + |
| 93 | +When running, interactive API documentation is available at: |
| 94 | +- Swagger UI: `http://localhost:8000/docs` |
| 95 | +- ReDoc: `http://localhost:8000/redoc` |
| 96 | + |
| 97 | +## Testing |
| 98 | + |
| 99 | +Run the manifest runner tests from the repository root: |
| 100 | + |
| 101 | +```bash |
| 102 | +# Run all manifest runner tests |
| 103 | +poetry run pytest unit_tests/manifest_runner/ -v |
| 104 | +``` |
| 105 | + |
| 106 | +## Docker |
| 107 | + |
| 108 | +The manifest runner can be containerized using the included Dockerfile. Build from the repository root: |
| 109 | + |
| 110 | +```bash |
| 111 | +# Build from repository root (not from manifest_runner subdirectory) |
| 112 | +docker build -f airbyte_cdk/manifest_runner/Dockerfile -t manifest-runner . |
| 113 | + |
| 114 | +# Run the container |
| 115 | +docker run -p 8080:8080 manifest-runner |
| 116 | +``` |
| 117 | + |
| 118 | +Note: The container runs on port 8080 by default. |
0 commit comments