tree_status

command
v0.0.0-...-ff9afc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

README

LUCI Tree Status Service

This service maintains a open/closed status for each "tree" (e.g. chromium). Trees are defined arbitrarily and do not have to correspond 1:1 with a git repo or any other concept.

Each status update optionally includes a text description of why the tree was open/closed.

The tree status is generally used to temporarily stop new CLs from being merged while gardeners fix a broken tree.

Prerequisites

Commands below assume you are running in the infra environment. To enter the infra env (via the infra.git checkout), run:

eval infra/go/env.py

Running tests locally

INTEGRATION_TESTS=1 go test ./...

Running locally

go run main.go \
  -cloud-project luci-tree-status-dev \
  -auth-service-host chrome-infra-auth-dev.appspot.com \
  -spanner-database projects/luci-tree-status-dev/instances/dev/databases/luci-tree-status-dev \
  -frontend-client-id 713057630411-eqah8ap1ptgnf4nnepk10sutqg0msiv1.apps.googleusercontent.com

You can test the RPCs using the rpcexplorer.

Deploy demo instance with local changes to AppEngine

gae.py upload --target-version ${USER} -A luci-tree-status-dev

Deploy to staging

Tree status is automatically deployed to staging by LUCI CD every time a CL is submitted.

Deploy to prod

  1. Make sure that you have an infra_internal checkout.
  2. Navigate to data/gae directory under your base checkout directory.
  3. Pull the latest with git rebase-update or git checkout main && git pull.
  4. Create a new branch git new-branch <NAME> or git -b <NAME>.
  5. run ./scripts/promote.py luci-tree-status --canary --stable --commit.
  6. Upload the CL git cl upload.
  7. Request approval from space: LUCI Test War Room.

Add a new tree

To add a new tree, you need to add an entry into LUCI Tree Status config.

Example CL: https://chrome-internal-review.googlesource.com/c/infradata/config/+/7631947

If you set use_default_acls: true, the tree will use the default ACL policy:

  • Googlers have full read access to the tree, including the PII (emails of the creators of the statuses).

  • Googlers have write access to the tree. This means they can create a new status.

  • Other authenticated users, but not Googlers, have read access to the tree, but they don't see PII.

There is a work-in-progress to allow setting up customized ACL policy for your tree. This section will be updated with detailed instructions after the work is completed.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package bqutil provides utility functions to interact with BigQuery.
Package bqutil provides utility functions to interact with BigQuery.
internal
bqexporter
Package bqexporter exports status data to BigQuery.
Package bqexporter exports status data to BigQuery.
config
Package config implements service-level config for LUCI Tree Status.
Package config implements service-level config for LUCI Tree Status.
perms
Package perms defines permissions used to control access to Tree Status resources, and related methods.
Package perms defines permissions used to control access to Tree Status resources, and related methods.
span
Package span contains utility functions to interact with the underlying Spanner storage.
Package span contains utility functions to interact with the underlying Spanner storage.
status
Package status manages status values.
Package status manages status values.
testutil
Package testutil holds helper functions for testing.
Package testutil holds helper functions for testing.
views
Package views ensures BigQuery views are properly created and maintained.
Package views ensures BigQuery views are properly created and maintained.
Package pbutil contains methods for manipulating protobufs.
Package pbutil contains methods for manipulating protobufs.
proto
bq
config
Package configpb contains protos for service-wide configuration data for LUCI Bisection
Package configpb contains protos for service-wide configuration data for LUCI Bisection
v1
Package v1 contains the proto definitions for the tree status PRPC API.
Package v1 contains the proto definitions for the tree status PRPC API.
rpc
Package rpc contains the RPC handlers for the tree status service.
Package rpc contains the RPC handlers for the tree status service.
paginator
Package paginator contains helpers to convert between AIP-158 page_size/page_token/next_page_token fields and simple offset/limit values.
Package paginator contains helpers to convert between AIP-158 page_size/page_token/next_page_token fields and simple offset/limit values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL