The Simplest Way to Make Azure ML and Gerrit Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair azure ml and gerrit to review code before running machine learning jobs. Gerrit checks every patch while Azure ML trains and hosts the models. This setup keeps bad code out of your training runs and tracks every change. Data scientists push code to Gerrit, and reviewers vote on the update. Once approved, a runner sends the new code to Azure ML. The cloud workspace then builds the model and logs the test metrics. How logins and data flow between azure ml and gerrit Gerrit acts as t

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 azure ml and gerrit to review code before running machine learning jobs. Gerrit checks every patch while Azure ML trains and hosts the models.

This setup keeps bad code out of your training runs and tracks every change. Data scientists push code to Gerrit, and reviewers vote on the update. Once approved, a runner sends the new code to Azure ML. The cloud workspace then builds the model and logs the test metrics.

How logins and data flow between azure ml and gerrit

Gerrit acts as the gatekeeper for all your model training scripts. Developers push a commit to Gerrit using their own SSH keys or HTTP passwords. Gerrit holds the change in a staging area until human reviewers and automated checks approve it.

Next, a build server watches Gerrit for new patches or merged changes. When a change passes review, the runner pulls the code from Gerrit. That same runner logs in to Azure ML using a cloud identity or service principal.

Azure ML takes the reviewed code and starts a compute cluster job. After the job finishes, the runner can write the test scores back to Gerrit. Reviewers see those scores as a comment or vote on the patch. This loop links code review with model results.

Common failure modes and how to scope roles

Many teams use one shared admin key to link their build server with both tools. If someone leaks that key, an attacker can push bad code or read training data. Shared keys also make it hard to see who started a cloud job.

Broad permissions cause big problems in this workflow. A build runner does not need full owner rights in your cloud workspace. It also does not need admin rights in Gerrit to post a review vote.

Azure RBAC + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix this, give the runner a dedicated bot account in Gerrit. Scope that bot so it can only read target branches and post review labels. In the cloud portal, assign a custom role that only starts jobs and reads status. Never let the build bot delete workspaces or change user roles.

Unlogged actions create another blind spot for security teams. When five engineers share one workspace identity, audit logs only show the bot name. You should map each job run to the developer who wrote the Gerrit patch. Pass the commit hash and author email into the job tags every time.

Setting up safe network paths for training jobs

Your Gerrit server often runs inside a private network while cloud compute sits outside. Opening your code server to the public internet invites attacks. Instead, place your build runners inside the same private network as Gerrit.

Let those private runners pull code locally and send job requests outbound to the cloud. Lock down your cloud workspace with private endpoints so only trusted networks can reach it. Rotate all bot keys on a fixed schedule and revoke unused tokens right away.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

How does Azure ML get code from a Gerrit server?

A build runner watches Gerrit events, pulls the approved commit, and submits it to the cloud workspace. This keeps the cloud workspace from needing direct network paths into your Git server.

What permissions does the Gerrit bot account need?

The bot only needs read rights on the target repo and permission to vote on review labels. Do not give the bot permission to merge code or bypass human review rules.

How can we track which Gerrit patch trained a model?

Have your pipeline attach the Gerrit change number and commit hash as tags on the training run. You can then trace any saved model back to the exact code review and author.

The query runs. The emails stay hidden.