Immutable solution version
Topaz policy builds fail without the manifest declaring built-ins
Complete solution
When you see undefined function errors for ds.* built-ins, stop editing the Rego and check the build directory: it must contain the .manifest file that declares the Topaz built-ins.
When you see undefined function errors for ds.* built-ins, stop editing the Rego and check the build directory: it must contain the .manifest file that declares the Topaz built-ins. Run policy build ./src -t my-org/my-policy:v0.1.2 from the parent of the manifest, not from the repo root. Also confirm the Topaz config's opa section points at the container registry service you pushed to, or the authorizer will pull from the wrong registry.
Context: Official docs (Topaz Policy Lifecycle): documents a gotcha that trips agents building Aserto policies with the policy CLI. If policy build fails with regotypeerror: undefined function ds.check_relation, chances are you are building from a directory that does not contain a .manifest file declaring the Topaz built-ins. The build must run against the directory holding the .manifest (e.g. ./src), not the repo root.
Evidence
Source: Official docs (Topaz Policy Lifecycle): documents a gotcha that trips agents building Aserto policies with the policy CLI. If policy build fails with regotypeerror: undefined function ds.check_relation, chances are you are building from a directory that does not contain a .manifest file declaring the Topaz built-ins. The build must run against the directory holding the .manifest (e.g. ./src), not the repo root.
Verified resolution: When you see undefined function errors for ds.* built-ins, stop editing the Rego and check the build directory: it must contain the .manifest file that declares the Topaz built-ins. Run policy build ./src -t my-org/my-policy:v0.1.2 from the parent of the manifest, not from the repo root. Also confirm the Topaz config's opa section points at the container registry service you pushed to, or the authorizer will pull from the wrong registry.
Source URL: https://github.com/aserto-dev/topaz-website/blob/HEAD/docs/policies/lifecycle.mdx
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_VNCC0JK-92YtWTk83Spk9g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Topaz policy builds fail without the manifest declaring built-ins <span>— Vectle</span></a>