The Simplest Way to Make Dataproc and Gerrit Work Like They Should
Teams pair dataproc and gerrit to review and run big data jobs in production. Gerrit holds the code reviews, and Dataproc runs the approved Spark or Hadoop jobs. This setup keeps bad code out of your data lake. Developers push changes to Gerrit for peer review before any job runs. Once a reviewer approves the patch, an automation server sends the job to Dataproc. The cluster processes the data and writes the output to cloud storage. Every change leaves a clear trail from code review to cluster
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 pair dataproc and gerrit to review and run big data jobs in production. Gerrit holds the code reviews, and Dataproc runs the approved Spark or Hadoop jobs.
This setup keeps bad code out of your data lake. Developers push changes to Gerrit for peer review before any job runs. Once a reviewer approves the patch, an automation server sends the job to Dataproc. The cluster processes the data and writes the output to cloud storage. Every change leaves a clear trail from code review to cluster execution.
How dataproc and gerrit handle identity and data flow
Gerrit manages code access through user accounts, SSH keys, and group permissions. Developers log in to Gerrit and push their Spark or PySpark scripts for review. Gerrit checks that the user has the right role to propose changes. It then triggers a build runner to test the new code.
Dataproc relies on cloud service accounts and IAM roles to run jobs. The build runner uses a service account to talk to the Dataproc API. It packs the reviewed code from Gerrit and sends it to a storage bucket. Then, it tells Dataproc to start a cluster or run a job. Dataproc reads the code from the bucket and reads source data tables. Both tools must share a clear identity path so logs show who changed what.
Common failure modes and how to scope roles
Many teams fail by using one shared service account for all Gerrit runners. That single account often gets broad admin rights over every Dataproc cluster. If a bad script slips past review, it can delete production data tables. Shared keys also make it hard to see which team ran a costly job.
Another common issue is leaving network paths wide open between tools. Developers sometimes log in to Dataproc master nodes to fix broken Gerrit builds. When engineers run manual fixes on clusters, those actions go unlogged. Plus, test jobs might read raw customer emails, phone numbers, or card numbers.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
You can fix this by giving each Gerrit project its own service role. Grant that role only the right to submit jobs to one specific cluster. Lock down network firewall rules so only your build runner can reach Dataproc. Turn on data masking so queries rewrite emails and card numbers in results. Keep humans off the cluster nodes and force all changes through Gerrit.
How to set up a clean workflow
Start by mapping each Gerrit repo to a single data domain. Create a dedicated cloud service account for each repo in your project. Give that account permission to read only the buckets it needs. Next, set up Gerrit branch rules so every merge requires two peer approvals.
Configure your build tool to pull the exact commit hash after approval. Have the build tool upload the job files to a staging bucket. Finally, trigger the Dataproc job using the scoped service account for that repo. Check your cloud logs to confirm that every job links back to a Gerrit change.
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
How does Gerrit trigger a Dataproc job after code approval?
Gerrit sends an event to a build runner when a reviewer merges a change. The build runner packages the code and calls the cloud API to start the Dataproc job.
Should developers have direct SSH access to Dataproc nodes?
No, direct node logins bypass code review and leave gaps in your audit logs. Developers should push all fixes through Gerrit and read job output from cloud logs.
How do we protect sensitive data during Gerrit test runs on Dataproc?
Use separate test clusters that only read from scrubbed or masked data buckets. You can also apply masking rules that rewrite phone numbers and national IDs in query results.
Related guides
In this post