[mcp] Fix arg parsing for Skia instance

Bug: b/491418947
Change-Id: Ifde7505db6d134561f538976174ea879dc5e1c29
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/1233037
Auto-Submit: Eric Boren <borenet@google.com>
Commit-Queue: Kaylee Lubick <kjlubick@google.com>
Reviewed-by: Kaylee Lubick <kjlubick@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2 files changed
tree: 510bf635c2267b8c4a41d98e4dd69e268705f0c9
  1. am/
  2. android_ingest/
  3. android_stats/
  4. api/
  5. attest/
  6. autogardener/
  7. autoroll/
  8. bash/
  9. bazel/
  10. blamer/
  11. bugs-central/
  12. cabe/
  13. cbb/
  14. cd/
  15. cdn/
  16. cherrypick-watcher/
  17. cmd/
  18. codesize/
  19. comment_rag/
  20. comments/
  21. cq_watcher/
  22. ct/
  23. datahopper/
  24. debugger-app/
  25. demos/
  26. docker/
  27. docs/
  28. docsyserver/
  29. ds/
  30. elements-sk/
  31. external/
  32. fiddlek/
  33. firestore/
  34. get_service_account/
  35. gitsync/
  36. go/
  37. gold-client/
  38. golden/
  39. helloworld/
  40. infra/
  41. infra-sk/
  42. jsdoc/
  43. jsfiddle/
  44. k8s-checker/
  45. k8s-deployer/
  46. kube/
  47. leasing/
  48. licenses/
  49. machine/
  50. make/
  51. mcp/
  52. modules/
  53. named-fiddles/
  54. new_element/
  55. npm-audit-mirror/
  56. perdiff/
  57. perf/
  58. periodic-trigger/
  59. pinpoint/
  60. proberk/
  61. promk/
  62. puppeteer-tests/
  63. rag/
  64. sa-keys-checker/
  65. scrap/
  66. scripts/
  67. shaders/
  68. sk/
  69. skbug/
  70. skcq/
  71. skfe/
  72. skolo/
  73. skottie/
  74. static_server/
  75. status/
  76. task_driver/
  77. task_scheduler/
  78. temporal/
  79. test-service/
  80. tool/
  81. tools/
  82. tree_status/
  83. trybot_updater/
  84. .bazelignore
  85. .bazelrc
  86. .bazelversion
  87. .eslintrc.js
  88. .gitattributes
  89. .gitignore
  90. .golangci.yml
  91. .mockery.yaml
  92. .npmrc
  93. .prettierignore
  94. .prettierrc.json
  95. .puppeteerrc.js
  96. .pylintrc
  97. .vpython
  98. BAZEL_CHEATSHEET.md
  99. BUILD.bazel
  100. build_infra_prod.sh
  101. CDB.md
  102. codereview.settings
  103. DATASTORE.md
  104. demopage.sh
  105. DEPS
  106. elements.d.ts
  107. go.mod
  108. go.sum
  109. karmatest.sh
  110. launch.md
  111. LICENSE
  112. LINT.md
  113. Makefile
  114. MODULE.bazel
  115. MODULE.bazel.lock
  116. OWNERS
  117. package-lock.json
  118. package.json
  119. pnpm-lock.yaml
  120. PRESUBMIT.py
  121. PRIVACY_POLICY.md
  122. puppeteerrc.bzl
  123. puppeteerrc.js.tpl
  124. README.md
  125. requirements.txt
  126. run_lint.sh
  127. STYLEGUIDE.md
  128. tools.go
  129. tsconfig.json
  130. whitespace.txt
  131. workflowcheck.yaml
README.md

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