-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issues with Dagster local development (#1479)
* fix: Decode stdout bytes from mongodump as text * fix: Resolve build failures for local docker-compose Trying to launch the local docker-compose stack fails due to trying to install the ol_orchestrate package. This adds a `--no-root` command to Poetry to address that error. * fix: Resolve GitHub token auth for Vault client The client object in the resource was constantly being recreated on every access. This adds a conditional initialization and otherwise returns the initialized object. * feat: Use Postgres for Dagster storage * feat: Migrate to UV for faster and cleaner builds * fix: Resolve errors in mongodump command for legacy edX export * fix: Set default sensor statuses to stopped When launching a local Dagster we don't want all of the sensors to automatically launch, because that will kick off a lot of compute that isn't needed unless that is what is being tested.
- Loading branch information
1 parent
816150e
commit 936f917
Showing
12 changed files
with
2,955 additions
and
5,732 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,115 @@ | ||
--- | ||
# -*- mode: yaml -*- | ||
|
||
services: | ||
dagster_init: | ||
container_name: dagster_init | ||
image: ol-dagster | ||
depends_on: | ||
postgres: | ||
condition: service_healthy | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
command: ["uv", "run", "dagster", "instance", "migrate"] | ||
environment: | ||
GITHUB_TOKEN: ${GITHUB_TOKEN} | ||
DAGSTER_CURRENT_IMAGE: "dagster-daemon" | ||
DAGSTER_PG_USERNAME: postgres | ||
DAGSTER_PG_PASSWORD: postgres # pragma: allowlist secret | ||
DAGSTER_PG_HOST: postgres | ||
DAGSTER_PG_DB: dagster | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /tmp/io_manager_storage:/tmp/io_manager_storage | ||
- ./src/ol_orchestrate/dagster_local/:/opt/dagster/dagster_home/ | ||
- ./src/ol_orchestrate/dagster.dev.yaml:/opt/dagster/dagster_home/dagster.yaml | ||
- ./src/ol_orchestrate/workspace.yaml:/opt/dagster/dagster_home/workspace.yaml | ||
- ./src/ol_orchestrate:/opt/dagster/code/ol_orchestrate | ||
- ./src/ol_dbt:/opt/dagster/code/ol_dbt | ||
|
||
# This service runs dagster-webserver, which loads your user code from the user code container. | ||
# Since our instance uses the QueuedRunCoordinator, any runs submitted from the webserver will be put on | ||
# a queue and later dequeued and launched by dagster-daemon. | ||
dagster_webserver: | ||
container_name: dagster_webserver | ||
image: ol-dagster | ||
depends_on: | ||
postgres: | ||
condition: service_healthy | ||
dagster_init: | ||
condition: service_completed_successfully | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
restart: unless-stopped | ||
entrypoint: ["poetry", "run", "dagster-webserver", "-w", "/opt/dagster/app/workspace.yaml", | ||
entrypoint: ["uv", "run", "dagster-webserver", "-w", "/opt/dagster/dagster_home/workspace.yaml", | ||
"-h", "0.0.0.0", "-p", "3000"] | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
- GITHUB_TOKEN=${GITHUB_TOKEN} | ||
- DAGSTER_CURRENT_IMAGE="dagster-webserver" | ||
volumes: # Make docker client accessible so we can terminate containers from the webserver | ||
GITHUB_TOKEN: ${GITHUB_TOKEN} | ||
DAGSTER_CURRENT_IMAGE: "ol-dagster" | ||
DAGSTER_PG_USERNAME: postgres | ||
DAGSTER_PG_PASSWORD: postgres # pragma: allowlist secret | ||
DAGSTER_PG_HOST: postgres | ||
DAGSTER_PG_DB: dagster | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /tmp/io_manager_storage:/tmp/io_manager_storage | ||
- ./src/ol_orchestrate/workspace.yaml:/opt/dagster/app/workspace.yaml | ||
- ./src/ol_orchestrate/dagster_local/:/opt/dagster/dagster_home/ | ||
- ./src/ol_orchestrate/dagster.dev.yaml:/opt/dagster/dagster_home/dagster.yaml | ||
- ./src/ol_orchestrate/workspace.yaml:/opt/dagster/dagster_home/workspace.yaml | ||
- ./src/ol_orchestrate:/opt/dagster/code/ol_orchestrate | ||
- ./src/ol_dbt:/opt/dagster/code/ol_dbt | ||
|
||
# This service runs the dagster-daemon process, which is responsible for taking runs | ||
# off of the queue and launching them, as well as creating runs from schedules or sensors. | ||
dagster_daemon: | ||
container_name: dagster_daemon | ||
image: ol-dagster | ||
depends_on: | ||
postgres: | ||
condition: service_healthy | ||
dagster_init: | ||
condition: service_completed_successfully | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
image: dagster-daemon | ||
restart: on-failure | ||
# restart: unless-stopped | ||
entrypoint: ["poetry", "run", "dagster-daemon", "run", "-w", "/opt/dagster/app/workspace.yaml"] | ||
entrypoint: ["uv", "run", "dagster-daemon", "run", "-w", "/opt/dagster/dagster_home/workspace.yaml"] | ||
environment: | ||
- GITHUB_TOKEN=${GITHUB_TOKEN} | ||
- DAGSTER_CURRENT_IMAGE="dagster-daemon" | ||
volumes: # Make docker client accessible so we can terminate containers from the webserver | ||
GITHUB_TOKEN: ${GITHUB_TOKEN} | ||
DAGSTER_CURRENT_IMAGE: "ol-dagster" | ||
DAGSTER_PG_USERNAME: postgres | ||
DAGSTER_PG_PASSWORD: postgres # pragma: allowlist secret | ||
DAGSTER_PG_HOST: postgres | ||
DAGSTER_PG_DB: dagster | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /tmp/io_manager_storage:/tmp/io_manager_storage | ||
- ./src/ol_orchestrate/workspace.yaml:/opt/dagster/app/workspace.yaml | ||
- ./src/ol_orchestrate/dagster_local/:/opt/dagster/dagster_home/ | ||
- ./src/ol_orchestrate/dagster.dev.yaml:/opt/dagster/dagster_home/dagster.yaml | ||
- ./src/ol_orchestrate/workspace.yaml:/opt/dagster/dagster_home/workspace.yaml | ||
- ./src/ol_orchestrate:/opt/dagster/code/ol_orchestrate | ||
- ./src/ol_dbt:/opt/dagster/code/ol_dbt | ||
|
||
postgres: | ||
image: postgres | ||
healthcheck: | ||
test: ["CMD", "pg_isready"] | ||
interval: 3s | ||
timeout: 3s | ||
retries: 10 | ||
ports: | ||
- 5432:5432 | ||
environment: | ||
PGUSER: postgres | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres # pragma: allowlist secret | ||
POSTGRES_DB: dagster | ||
volumes: | ||
- pgdata:/var/lib/postgresql | ||
|
||
volumes: | ||
pgdata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.