mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 16:51:55 +00:00
This change introduces an `mi2`-like experience for interacting with MSP databases. By default we use the new readonly-SA introduced in https://github.com/sourcegraph/sourcegraph/pull/59105, otherwise with the `--write-access` flag you can connect as the same user as the Cloud Run workload, which gives a lot more permissions. An alias, `sg msp pg connect`, is available for those less inclined to type out the entire `postgresql` subcommand name. Closes https://github.com/sourcegraph/managed-services/issues/207 ## Test plan Applied to `msp-testbed`, which has a PG instance and provisioned tables. Try both service accounts: ``` sg msp pg connect --write-access msp-testbed test sg msp pg connect msp-testbed test ```  With both of the above: ``` primary=> select * from users; id | created_at | updated_at | deleted_at | external_id | name | avatar_url ----+------------+------------+------------+-------------+------+------------ (0 rows) ``` |
||
|---|---|---|
| .. | ||
| binary.go | ||
| BUILD.bazel | ||
| cloudsqlproxy.go | ||