PageSourceSearch

https://www.buildbuddy.io/assets/js/a4f39183.72f12f49.js

js buildbuddy.io collected 2026-09-24 08:42:14 UTC 4,938 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkbuildbuddy_docs_website=self.webpackChunkbuildbuddy_docs_website||[]).push([[1908],{51761(e,n,t){t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var i=t(20273),o=t(86070),s=t(35676);const a={title:"bb detect nondeterminism",date:new Date("2026-07-01T10:00:00.000Z"),authors:"maggie",tags:["bazel","debugging"]},d=void 0,c={authorsImageUrls:[void 0]},l=[{value:"Sending notifications",id:"sending-notifications",level:2},{value:"Running on a schedule",id:"running-on-a-schedule",level:2}];function r(e){const n={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.p,{children:["You can now use the ",(0,o.jsx)(n.code,{children:"bb"})," CLI to detect non-deterministic builds using the ",(0,o.jsx)(n.code,{children:"bb detect nondeterminism"})," command."]}),"\n",(0,o.jsxs)(n.p,{children:["The command runs a Bazel command twice with caching disabled, then compares the two compact execution logs with ",(0,o.jsx)(n.a,{href:"/changelog/bb-explain",children:"bb explain"}),". Spans whose outputs differ between the two runs are reported as non-deterministic."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"# By default, the command runs \"build //...\".\nbb detect nondeterminism\n\n# You can pass any Bazel command to run.\nbb detect nondeterminism --bazel_command='build //foo:bar --config=linux'\n"})}),"\n",(0,o.jsx)(n.h2,{id:"sending-notifications",children:"Sending notifications"}),"\n",(0,o.jsxs)(n.p,{children:["To email all BuildBuddy org admins when non-determinism is detected, add ",(0,o.jsx)(n.code,{children:"--notify_email"}),".\nTo post a notification to a Slack channel, add ",(0,o.jsx)(n.code,{children:"--notify_slack=<SECRET_NAME>"}),", where ",(0,o.jsx)(n.code,{children:"<SECRET_NAME>"})," is the name of a ",(0,o.jsx)(n.a,{href:"/docs/secrets",children:"BuildBuddy secret"})," holding a Slack webhook URL."]}),"\n",(0,o.jsxs)(n.p,{children:["Sending notifications requires an API key with the ",(0,o.jsx)(n.strong,{children:"notification"})," capability. Set it via the ",(0,o.jsx)(n.code,{children:"BB_NOTIFY_API_KEY"})," environment variable:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"BB_NOTIFY_API_KEY=<API_KEY> bb detect nondeterminism --notify_email\n"})}),"\n",(0,o.jsx)(n.h2,{id:"running-on-a-schedule",children:"Running on a schedule"}),"\n",(0,o.jsx)(n.p,{children:"To schedule a nightly nondeterminism check to catch regressions, you can configure a scheduled Workflow in your buildbuddy.yaml:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-yaml",metastring:'title="buildbuddy.yaml"',children:'actions:\n  - name: Nondeterminism check\n    triggers:\n      schedule:\n        crons:\n          - "0 8 * * *" # 8:00 AM UTC every day\n    steps:\n      - run: bb detect nondeterminism --notify_email --notify_slack=SLACK_WEBHOOK_SECRET_NAME\n    platform_properties:\n      # Caching is disabled for this check anyway, so recycling adds little.\n      recycle-runner: false\n'})})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(r,{...e})}):r(e)}},35676(e,n,t){t.d(n,{R:()=>a,x:()=>d});var i=t(30758);const o={},s=i.createContext(o);function a(e){const n=i.useContext(s);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),i.createElement(s.Provider,{value:n},e.children)}},20273(e){e.exports=JSON.parse('{"permalink":"/changelog/detect-nondeterminism","editUrl":"https://github.com/buildbuddy-io/buildbuddy/edit/master/website/changelog/changelog/detect-nondeterminism.md","source":"@site/changelog/detect-nondeterminism.md","title":"bb detect nondeterminism","description":"You can now use the bb CLI to detect non-deterministic builds using the bb detect nondeterminism command.","date":"2026-07-01T10:00:00.000Z","tags":[{"inline":true,"label":"bazel","permalink":"/changelog/tags/bazel"},{"inline":true,"label":"debugging","permalink":"/changelog/tags/debugging"}],"hasTruncateMarker":false,"authors":[{"name":"Maggie Lou","title":"Engineer @ BuildBuddy","url":"https://www.linkedin.com/in/maggie-lou-4a3bb110a/","imageURL":"https://avatars.githubusercontent.com/u/13951661","key":"maggie","page":null}],"frontMatter":{"title":"bb detect nondeterminism","date":"2026-07-01T10:00:00.000Z","authors":"maggie","tags":["bazel","debugging"]},"unlisted":false,"prevItem":{"title":"Analyze slow builds with bb agent analyze-profile","permalink":"/changelog/bb-explain-profile"},"nextItem":{"title":"Schedule Workflows with cron expressions","permalink":"/changelog/scheduled-workflows"}}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.