@google/infra
AThis repo contains infrastructure code for Skia.
Install
agr install @google/infra --target claudeThis artifact does not publish files for Claude.
Document
{ "name": "infra", "version": "0.0.0", "description": "Skia Infrastructure Repository", "main": ".eslintrc.js", "directories": { "doc": "docs" }, "pnpm": { "onlyBuiltDependencies": [] }, "dependencies": { "@angular/animations": "^21.0.0", "@angular/cdk": "^21.0.0", "@angular/common": "^21.0.0", "@angular/compiler": "^21.0.0", "@angular/core": "^21.0.0", "@angular/forms": "^21.0.0", "@angular/material": "^21.0.0", "@angular/platform-browser": "^21.0.0", "@angular/router": "^21.0.0", "@cfworker/json-schema": "^4.1.1", "@ffmpeg/core": "^0.11.0", "@ffmpeg/ffmpeg": "^0.11.6", "@google-web-components/google-apis": "^3.0.1", "@google-web-components/google-chart": "^4.0.2", "@google/generative-ai": "^0.24.1", "@lit/context": "^1.1.2", "@lit/task": "^1.0.0", "@lottie-animation-community/lottie-specs": "^0.3.1", "@material/material-color-utilities": "^0.2.7", "@material/web": "^2.1.0", "@modelcontextprotocol/sdk": "^1.21.1", "@puppeteer/browsers": "^2.10.9", "@stylistic/eslint-plugin": "^2.8.0", "@types/chai": "^4.2.16", "@types/chai-dom": "0.0.10", "@types/codemirror": "5.60.15", "@types/codemirror5": "npm:@types/codemirror@^5.60.15", "@types/d3-array": "^2.9.0", "@types/d3-force": "^2.1.1", "@types/d3-scale": "^3.2.2", "@types/d3-selection": "^1.4.3", "@types/express": "^4.17.21", "@types/google-apps-script": "^1.0.98", "@types/google.visualization": "0.0.68", "@types/howler": "^2.2.3", "@types/karma": "^6.3.8", "@types/mocha": "^8.2.2", "@types/node": "^20.19.0", "@typescript-eslint/eslint-plugin": "^8.5.0", "@typescript-eslint/parser": "^8.5.0", "@vaadin/combo-box": "^24.7.6", "@vaadin/multi-select-combo-box": "^24.7.6", "@webgpu/types": "0.1.21", "acorn": "^8.7.0", "ajv": "^8.12.0", "assemblyscript": "^0.28.13", "bufferutil": "^4.0.9", "canvaskit-wasm": "^0.39.1", "chai": "^4.3.4", "chai-dom": "^1.9.0", "chart.js": "^3.1.0", "codemirror": "^5.60.0", "codemirror5": "npm:codemirror@^5.65.1", "csso-cli": "^3.0.0", "d3-array": "^2.12.1", "d3-force": "^2.1.1", "d3-interpolate": "^3.0.0", "d3-scale": "^4.0.2", "d3-selection": "^1.4.2", "dotenv": "^16.5.0", "encoding": "^0.1.13", "eslint": "8.57.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.30.0", "eslint-plugin-lit": "^1.15.0", "eventsource-parser": "^1.1.2", "express": "^4.18.2", "fetch-mock": "^9.11.0", "fuse.js": "^6.6.2", "glob": "^7.1.6", "google-auth-library": "^9.15.1", "howler": "^2.2.1", "http-status-codes": "^2.2.0", "jsdoc": "^4.0.2", "jszip": "^3.8.0", "karma": "^6.3.16", "karma-chai": "^0.1.0", "karma-chai-dom": "^1.1.0", "karma-chrome-launcher": "^3.1.0", "karma-mocha": "^2.0.1", "karma-sinon": "^1.0.5", "karma-spec-reporter": "0.0.32", "lit": "^3.2.0", "lit-html": "^3.2.0", "lottie-web": "^5.13.0", "marked": "^4.0.12", "mime": "^4.0.7", "mocha": "^9.2.2", "natives": "^1.1.6", "prettier": "^3.1.0", "puppeteer": "19.2.2", "puppeteer-core": "19.2.2", "rxjs": "~7.8.0", "sass": "^1.101.0", "socket.io-parser": "^4.2.3", "source-map-support": "^0.5.21", "streamx": "^2.15.5", "supports-color": "^10.2.0", "tslib": "^2.8.1", "typescript": "5.9.3", "ua-parser-js": "^0.7.34", "utf-8-validate": "^5.0.10", "vanilla-jsoneditor": "^0.23.2", "verdaccio": "^5.31.0", "zod": "^3.25.55", "zone.js": "~0.16.0" }, "scripts": { "lint": "npm run lint:ts && npm run lint:go && npm run lint:py && npm run lint:sh", "lint:ts": "ESLINT_USE_FLAT_CONFIG=false eslint .", "lint:go": "npm run lint:go:fmt && npm run lint:go:vet", "lint:go:fmt": "bazelisk run --config=mayberemote //:gofmt -- -d .", "lint:go:vet": "bazelisk run --config=mayberemote //:go -- vet ./...", "lint:py": "./run_lint.sh py", "lint:sh": "./run_lint.sh sh", "perf-type-coverage": "./perf/coverage/perf-coverage.sh type", "perf-test-coverage": "./perf/coverage/perf-coverage.sh test", "perf-mutation-testing": "./perf/coverage/perf-coverage.sh mutation", "perf-coverage": "./perf/coverage/perf-coverage.sh all", "test": "echo "Error: no test specified" && exit 1" }, "repository": { "type": "git", "url": "https://skia.googlesource.com/buildbot.git" }, "author": "", "license": "BSD", "devDependencies": { "@angular-devkit/build-angular": "^21.0.0", "@angular/cli": "^21.0.0", "@angular/compiler-cli": "^21.0.0", "@stryker-mutator/core": "^8.2.6", "@stryker-mutator/mocha-runner": "^8.2.6", "@stryker-mutator/typescript-checker": "^8.2.6", "@types/marked": "^4.3.2", "@types/sinon": "^7.5.2", "babel-plugin-istanbul": "^6.1.1", "c8": "^10.1.3", "istanbul-lib-instrument": "^6.0.2", "jsdom": "^24.0.0", "jsdom-global": "^3.0.2", "karma-coverage": "^2.2.1", "postcss-lit": "^1.4.1", "react": "^18.2.0", "react-dom": "^18.2.0", "rfdc": "^1.3.0", "semantic-ui-css": "^2.5.0", "semantic-ui-react": "^2.1.5", "shellcheck": "^4.1.0", "sinon": "^7.5.0", "stylelint": "^17.13.0", "stylelint-config-standard-scss": "^17.0.0", "ts-node": "^10.9.2", "ts-proto": "^2.6.3", "type-coverage": "^2.29.7", "typescript-coverage-report": "^1.1.1" } }
Repository README
Describes google/skia-buildbot as a whole, which may contain artifacts other than this one. Where this artifact had no useful description of its own, its summary was taken from here.
Skia-Buildbot Repository
This repo contains infrastructure code for Skia.
Supported Infrastucture Platforms
The infrastructure code is generally built to run on x86 linux. Running on other platforms may be possible but is not officially supported and success will vary depending on the command.
Getting the Source Code
The main source code repository is a Git repository hosted at
https://skia.googlesource.com/buildbot.git.
It is possible to check out this repository directly with git clone or via
go get.
Using git clone allows you to work in whatever directory you want. You will
still need to set GOPATH in order to build some apps (recommended to put this in
a cache dir). E.g.:
$ cd ${WORKDIR}
$ git clone https://skia.googlesource.com/buildbot.git
$ export GOPATH=${HOME}/.cache/gopath/$(basename ${WORKDIR})
$ mkdir $GOPATH
$ cd buildbot
Install dependencies
Almost all applications are built with Bazel, and bazelisk is the recommended tool to ensure you have the right version of bazel installed:
go install github.com/bazelbuild/bazelisk@latest
go install github.com/bazelbuild/buildtools/buildifier@latest
go install github.com/kisielk/errcheck@latest
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/mikefarah/yq/v4@latest
go install go.chromium.org/luci/client/cmd/...@latest
Add bazelisk to path
export PATH=$PATH:$(go env GOPATH)/bin
Install Node.js and npm
You will need Node.js and npm installed to run web infrastructure tests and linters. We recommend using nvm to manage Node versions.
After installing Node.js, run the following command to install repository dependencies (including linter tools):
npm install
Install other dependencies:
sudo apt-get install jq
Build ~everything
bazelisk build --config=mayberemote //...
Test everything
Set up environ variables
This step might be an optional step, but some test requires these enviornment variables.
Runs
./scripts/run_emulators/run_emulators start
The following are example of environment variables.
Emulators started. Set environment variables as follows:
export DATASTORE_EMULATOR_HOST=localhost:8891
export BIGTABLE_EMULATOR_HOST=localhost:8892
export PUBSUB_EMULATOR_HOST=localhost:8893
export FIRESTORE_EMULATOR_HOST=localhost:8894
export COCKROACHDB_EMULATOR_HOST=localhost:8895
And stores these environment variables to ~/.bashrc file.
Execute tests
bazelisk test --config=mayberemote //...
Generated Code
To update generated code run the following in any directory:
go generate ./...
Running unit tests
Install Cloud SDK.
Use this command to run the presubmit tests:
./run_unittests --small
AI Code Review
Getting AI code review for a local commit:
bazelisk run //cmd/autoreview
Read more at cmd/autoreview/README.md
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- warnType matchbest-effort: server code not analyzed
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-57e222cdff512026-08-06