New to Kestra?
Use blueprints to kickstart your first workflows.
Audit Azure ML data asset version counts, alert Slack when they sprawl past a threshold, and log the result for AI platform teams.
Every retrain of a model that registers its training data as a new Azure Machine Learning data asset version adds one more entry nobody ever prunes; a data asset can accumulate hundreds of versions with no policy enforcing which ones still matter. Azure ML's own studio shows a version list if someone opens it; it does not compare the count against a limit you declare or notify anyone when it sprawls.
This blueprint was created by Mohit Jeswani.
list_data_versions (io.kestra.plugin.azure.ml.ListDataVersions) lists every
registered version of data_name, most recent first. Read-only; nothing in Azure ML is
changed. allowFailure: true covers a missing data asset or an auth error without
failing the flow outright.evaluate (io.kestra.plugin.core.output.OutputValues) counts the versions and reads
the newest one with a jq filter.route (io.kestra.plugin.core.flow.If):summary logs the count and severity, closing the governance cycle.errors alerts Slack if the flow itself fails, for example an expired service principal
secret.ml.ListDataVersions used
as a standing resource quota check, the first blueprint in this repo to use the ml
sub-package of the Azure plugin at all.Azure ML lists a data asset's versions on request; it does not keep a schedule, compare the
count against a tolerance you declare, or notify a Slack channel when it sprawls. Kestra
keeps max_version_count as a flow input, turns the list into a Slack page naming the real
count and latest version, and keeps a full execution history of every run.
This flow calls the Azure Resource Manager API directly over HTTPS; there is no official
local Azure ML emulator, so list_data_versions cannot be exercised against a local Docker
container.
AZURE_TENANT_ID / AZURE_CLIENT_ID / AZURE_CLIENT_SECRET / AZURE_SUBSCRIPTION_ID:
the Entra ID service principal credentials used by list_data_versions. In Kestra OSS,
provide them as the base64-encoded environment variables SECRET_AZURE_TENANT_ID,
SECRET_AZURE_CLIENT_ID, SECRET_AZURE_CLIENT_SECRET, and
SECRET_AZURE_SUBSCRIPTION_ID.SLACK_WEBHOOK_URL: used by alert and the errors block. In Kestra OSS, provide it as
the base64-encoded environment variable SECRET_SLACK_WEBHOOK_URL.| Input | Default | Purpose |
|---|---|---|
data_name |
<your-data-asset-name> |
Data asset to audit |
max_version_count |
20 |
Registered-version count at or above which the alert fires |
{{ outputs.list_data_versions.versions }}: every registered version (version, uri),
most recent first.{{ outputs.evaluate.values.version_count }} / .latest_version: how many versions exist
and the newest version name.{{ outputs.evaluate.values.severity }}: OK, VERSION_SPRAWL, or CRITICAL.ListDataVersions throws if data_name does not exist in the workspace at all; a typo
in the name surfaces via allowFailure as CRITICAL, not a silently empty version list.max_version_count does not mean the versions are all still in use;
this is a volume check, not a usage audit.SLACK_WEBHOOK_URL.resource_group_name, workspace_name, and data_name to a real data asset.summary logs a count.max_version_count below the real current count to confirm alert fires.weekly trigger.data_name values with io.kestra.plugin.core.flow.Loop to audit every
data asset in a workspace in one scheduled run.confirm_prune input, since this plugin has no delete-version task of its own to
call directly.io.kestra.plugin.azure.ml.ListDataVersions results from multiple data assets into one
combined sprawl report instead of auditing one asset per run.