The Simplest Way to Make Dagster and Harness Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use dagster and harness together to build, deploy, and run data pipelines. Harness ships code updates and triggers jobs while Dagster manages data assets. This setup connects software delivery with data processing in one clear workflow. Developers push code to a git repo and let the pipeline run. Harness tests the code, builds container images, and updates the Dagster deployment. Then Dagster runs the updated data assets on a set schedule or trigger. How auth and data flow between dagst

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use dagster and harness together to build, deploy, and run data pipelines. Harness ships code updates and triggers jobs while Dagster manages data assets.

This setup connects software delivery with data processing in one clear workflow. Developers push code to a git repo and let the pipeline run. Harness tests the code, builds container images, and updates the Dagster deployment. Then Dagster runs the updated data assets on a set schedule or trigger.

How auth and data flow between dagster and harness

Good workflows need clear rules for how systems talk to each other. Harness needs a secure way to deploy code and trigger Dagster runs. Teams store API keys or cloud role details inside the Harness secret manager. When a deployment pipeline runs, Harness reads these keys to log in.

For cloud setups, Harness updates the container tasks that run Dagster code servers. Once the new code is live, Dagster loads the updated asset definitions. Harness can also send a request to the Dagster GraphQL API. This API call tells Dagster to start a specific job right after deployment.

Data flows the other way too when Dagster needs to report status. Harness can poll the Dagster API to check if a data job finished. If the data check fails, Harness can roll back the recent code change. Both tools pass small status messages rather than moving large raw data sets.

Common failure modes and how to scope roles

Many teams make mistakes when they first link their delivery and data tools. The most common error is using one shared admin account for all tasks. If a single token has full admin rights, a small bug can break production. Broad tokens also make it hard to see who triggered a specific run.

Another common issue is running unlogged queries or hidden scripts during a deploy. Engineers sometimes add manual database checks inside a Harness step without proper tracking. When these steps fail, the team has no clear log of what changed. Secrets can also leak into build logs if teams do not mask outputs.

End-to-End Encryption + Harness Security Features: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix this, give each Harness pipeline its own narrow cloud role. Scope the role so it can only update specific Dagster code servers. Create separate API tokens for deployment tasks and for job trigger tasks. Never let a build pipeline use a token meant for human admins.

Lock down the network path between the runner and the data plane. Place the Harness delegate inside your private network close to the Dagster services. Use strict firewall rules so only the delegate can call the Dagster API. Turn on audit logs in both tools to track every deploy and run.

Managing secrets and test runs across stages

Data teams need separate dev, staging, and prod spaces to test pipeline changes. Harness handles this by running different pipeline stages for each target space. Each stage should use its own isolated credentials and point to separate databases.

When a developer opens a pull request, Harness can spin up a test branch. Dagster runs a quick check on small sample data to verify the code. If sensitive fields like emails or phone numbers exist, masking rewrites matched fields in results. Once the team approves the change, Harness promotes the build to production.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Should Harness trigger Dagster jobs or let Dagster schedules run them?

Use Dagster schedules and sensors for regular daily or hourly data work. Use Harness to trigger Dagster jobs only when a run must follow a code deploy.

Where should teams store database keys used by Dagster assets?

Store deployment keys in Harness, but keep runtime database keys in your cloud secret store. Let the Dagster worker read those runtime keys when the data job starts.

How do we stop a bad code deploy from breaking active Dagster runs?

Set up Dagster to run user code in separate containers from the main daemon. When Harness updates the code server, active runs finish using their original container image.

The query runs. The emails stay hidden.