sourcegraph/deps.bzl

9141 lines
356 KiB
Python
Raw Permalink Normal View History

"Bazel go dependencies"
load("@bazel_gazelle//:deps.bzl", "go_repository")
def go_dependencies():
"""The go dependencies in this macro are auto-updated by gazelle
To update run,
bazel run //:gazelle-update-repos
"""
go_repository(
name = "build_buf_gen_go_bufbuild_protovalidate_protocolbuffers_go",
build_file_proto_mode = "disable_global",
importpath = "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go",
sum = "h1:tdpHgTbmbvEIARu+bixzmleMi14+3imnpoFXz+Qzjp4=",
version = "v1.31.0-20230802163732-1c33ebd9ecfa.1",
)
go_repository(
name = "cat_dario_mergo",
build_file_proto_mode = "disable_global",
importpath = "dario.cat/mergo",
sum = "h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=",
version = "v1.0.0",
)
go_repository(
name = "cc_mvdan_gofumpt",
build_file_proto_mode = "disable_global",
importpath = "mvdan.cc/gofumpt",
sum = "h1:0EQ+Z56k8tXjj/6TQD25BFNKQXpCvT0rnansIc7Ug5E=",
version = "v0.5.0",
)
go_repository(
name = "co_honnef_go_tools",
build_file_proto_mode = "disable_global",
importpath = "honnef.co/go/tools",
sum = "h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o=",
version = "v0.1.3",
)
go_repository(
name = "com_connectrpc_connect",
build_file_proto_mode = "disable_global",
importpath = "connectrpc.com/connect",
sum = "h1:ybd6y+ls7GOlb7Bh5C8+ghA6SvCBajHwxssO2CGFjqE=",
version = "v1.16.2",
)
feat/enterprise-portal: ConnectRPC layer for {Get/List}CodyGatewayAccess (#62771) This PR exposes the data layer implemented in https://github.com/sourcegraph/sourcegraph/pull/62706 via the Enterprise Portal API. We register the services proposed in #62263 and also set up tooling like gRPC UI locally for DX. Auth is via SAMS M2M; https://github.com/sourcegraph/sourcegraph-accounts-sdk-go/pull/28 and https://github.com/sourcegraph/sourcegraph-accounts/pull/227 rolls out the new scopes, and https://github.com/sourcegraph/managed-services/pull/1474 adds credentials for the enterprise-portal-dev deployment. Closes CORE-112 ## Test plan https://github.com/sourcegraph/sourcegraph/pull/62706 has extensive testing of the data layer, and this PR expands on it a little bit. I tested the RPC layer by hand: Create SAMS client for Enterprise Portal Dev in **accounts.sgdev.org**: ```sh curl -s -X POST \ -H "Authorization: Bearer $MANAGEMENT_SECRET" \ https://accounts.sgdev.org/api/management/v1/identity-provider/clients \ --data '{"name": "enterprise-portal-dev", "scopes": [], "redirect_uris": ["https://enterprise-portal.sgdev.org"]}' | jq ``` Configure `sg.config.overwrite.yaml` ```yaml enterprise-portal: env: SRC_LOG_LEVEL: debug # sams-dev SAMS_URL: https://accounts.sgdev.org ENTERPRISE_PORTAL_SAMS_CLIENT_ID: "sams_cid_..." ENTERPRISE_PORTAL_SAMS_CLIENT_SECRET: "sams_cs_..." ``` Create a test client (later, we will do the same thing for Cody Gateway), also in **accounts.sgdev.org**: ```sh curl -s -X POST \ -H "Authorization: Bearer $MANAGEMENT_SECRET" \ https://accounts.sgdev.org/api/management/v1/identity-provider/clients \ --data '{"name": "enterprise-portal-dev-reader", "scopes": ["enterprise_portal::codyaccess::read", "enterprise_portal::subscription::read"], "redirect_uris": ["https://enterprise-portal.sgdev.org"]}' | jq ``` Then: ``` sg run enterprise-portal ``` Navigate to the locally-enabled gRPC debug UI at http://localhost:6081/debug/grcpui, using https://github.com/sourcegraph/sourcegraph/pull/62883 to get an access token from our test client to add in the request metadata: ```sh sg sams create-client-token -s 'enterprise_portal::codyaccess::read' ``` I'm using some local subscriptions I've made previously in `sg start dotcom`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/a55c6f0d-b0ae-4e68-8e4c-ccb6e2cc442d) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/19d18104-1051-4a82-abe0-58010dd13a27) Without a valid authorization header: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/c9cf4c89-9902-48f8-ac41-daf9a63ca789) Verified a lookup using the returned access tokens also works --------- Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2024-05-27 20:39:57 +00:00
go_repository(
name = "com_connectrpc_grpcreflect",
build_file_proto_mode = "disable_global",
importpath = "connectrpc.com/grpcreflect",
sum = "h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U=",
version = "v1.2.0",
)
go_repository(
name = "com_connectrpc_otelconnect",
build_file_proto_mode = "disable_global",
importpath = "connectrpc.com/otelconnect",
sum = "h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY=",
version = "v0.7.0",
)
go_repository(
name = "com_github_99designs_gqlgen",
build_file_proto_mode = "disable_global",
importpath = "github.com/99designs/gqlgen",
sum = "h1:yczvlwMsfcVu/JtejqfrLwXuSP0yZFhmcss3caEvHw8=",
version = "v0.17.2",
)
go_repository(
name = "com_github_adalogics_go_fuzz_headers",
build_file_proto_mode = "disable_global",
importpath = "github.com/AdaLogics/go-fuzz-headers",
sum = "h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU=",
version = "v0.0.0-20230811130428-ced1acdcaa24",
)
go_repository(
name = "com_github_adamkorcz_go_118_fuzz_build",
build_file_proto_mode = "disable_global",
importpath = "github.com/AdamKorcz/go-118-fuzz-build",
sum = "h1:+vTEFqeoeur6XSq06bs+roX3YiT49gUniJK7Zky7Xjg=",
version = "v0.0.0-20221215162035-5330a85ea652",
)
go_repository(
name = "com_github_agext_levenshtein",
build_file_proto_mode = "disable_global",
importpath = "github.com/agext/levenshtein",
sum = "h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo=",
version = "v1.2.3",
)
go_repository(
name = "com_github_agnivade_levenshtein",
build_file_proto_mode = "disable_global",
importpath = "github.com/agnivade/levenshtein",
sum = "h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=",
version = "v1.1.1",
)
go_repository(
name = "com_github_ajg_form",
build_file_proto_mode = "disable_global",
importpath = "github.com/ajg/form",
sum = "h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=",
version = "v1.5.1",
)
go_repository(
name = "com_github_ajstarks_deck",
build_file_proto_mode = "disable_global",
importpath = "github.com/ajstarks/deck",
sum = "h1:7kQgkwGRoLzC9K0oyXdJo7nve/bynv/KwUsxbiTlzAM=",
version = "v0.0.0-20200831202436-30c9fc6549a9",
)
go_repository(
name = "com_github_ajstarks_deck_generate",
build_file_proto_mode = "disable_global",
importpath = "github.com/ajstarks/deck/generate",
sum = "h1:iXUgAaqDcIUGbRoy2TdeofRG/j1zpGRSEmNK05T+bi8=",
version = "v0.0.0-20210309230005-c3f852c02e19",
)
go_repository(
name = "com_github_ajstarks_svgo",
build_file_proto_mode = "disable_global",
importpath = "github.com/ajstarks/svgo",
sum = "h1:slYM766cy2nI3BwyRiyQj/Ud48djTMtMebDqepE95rw=",
version = "v0.0.0-20211024235047-1546f124cd8b",
)
2023-01-27 14:30:35 +00:00
go_repository(
name = "com_github_alecthomas_assert_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/alecthomas/assert/v2",
2024-05-01 12:57:34 +00:00
sum = "h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2K2ink=",
version = "v2.2.1",
2023-01-27 14:30:35 +00:00
)
go_repository(
name = "com_github_alecthomas_chroma",
build_file_proto_mode = "disable_global",
importpath = "github.com/alecthomas/chroma",
sum = "h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek=",
version = "v0.10.0",
)
go_repository(
name = "com_github_alecthomas_chroma_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/alecthomas/chroma/v2",
sum = "h1:Wh8qLEgMMsN7mgyG8/qIpegky2Hvzr4By6gEF7cmWgw=",
version = "v2.12.0",
)
go_repository(
name = "com_github_alecthomas_kingpin",
build_file_proto_mode = "disable_global",
importpath = "github.com/alecthomas/kingpin",
sum = "h1:5svnBTFgJjZvGKyYBtMB0+m5wvrbUHiqye8wRJMlnYI=",
version = "v2.2.6+incompatible",
)
go_repository(
name = "com_github_alecthomas_kingpin_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/alecthomas/kingpin/v2",
sum = "h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY=",
version = "v2.4.0",
)
go_repository(
name = "com_github_alecthomas_participle_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/alecthomas/participle/v2",
sum = "h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4=",
version = "v2.1.0",
)
2023-01-27 14:30:35 +00:00
go_repository(
name = "com_github_alecthomas_repr",
build_file_proto_mode = "disable_global",
importpath = "github.com/alecthomas/repr",
2024-05-01 12:57:34 +00:00
sum = "h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=",
version = "v0.2.0",
2023-01-27 14:30:35 +00:00
)
go_repository(
name = "com_github_alecthomas_template",
build_file_proto_mode = "disable_global",
importpath = "github.com/alecthomas/template",
sum = "h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=",
version = "v0.0.0-20190718012654-fb15b899a751",
)
go_repository(
name = "com_github_alecthomas_units",
build_file_proto_mode = "disable_global",
importpath = "github.com/alecthomas/units",
sum = "h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc=",
version = "v0.0.0-20211218093645-b94a6e3cc137",
)
go_repository(
name = "com_github_alexflint_go_arg",
build_file_proto_mode = "disable_global",
importpath = "github.com/alexflint/go-arg",
sum = "h1:lDWZAXxpAnZUq4qwb86p/3rIJJ2Li81EoMbTMujhVa0=",
version = "v1.4.2",
)
go_repository(
name = "com_github_alexflint_go_scalar",
build_file_proto_mode = "disable_global",
importpath = "github.com/alexflint/go-scalar",
sum = "h1:NGupf1XV/Xb04wXskDFzS0KWOLH632W/EO4fAFi+A70=",
version = "v1.0.0",
)
go_repository(
name = "com_github_amit7itz_goset",
build_file_proto_mode = "disable_global",
importpath = "github.com/amit7itz/goset",
sum = "h1:LTn5swPM1a0vFr3yluIQHjvNTfbp7z87baV9x2ugS+4=",
version = "v1.0.1",
)
go_repository(
name = "com_github_anchore_go_struct_converter",
build_file_proto_mode = "disable_global",
importpath = "github.com/anchore/go-struct-converter",
sum = "h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc=",
version = "v0.0.0-20221118182256-c68fdcfa2092",
)
go_repository(
name = "com_github_andres_erbsen_clock",
build_file_proto_mode = "disable_global",
importpath = "github.com/andres-erbsen/clock",
sum = "h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI=",
version = "v0.0.0-20160526145045-9e14626cd129",
)
go_repository(
name = "com_github_andreyvit_diff",
build_file_proto_mode = "disable_global",
importpath = "github.com/andreyvit/diff",
sum = "h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=",
version = "v0.0.0-20170406064948-c7f18ee00883",
)
go_repository(
name = "com_github_andybalholm_brotli",
build_file_proto_mode = "disable_global",
importpath = "github.com/andybalholm/brotli",
sum = "h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=",
version = "v1.1.0",
)
go_repository(
name = "com_github_andybalholm_cascadia",
build_file_proto_mode = "disable_global",
importpath = "github.com/andybalholm/cascadia",
sum = "h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=",
version = "v1.3.2",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "com_github_andybalholm_stroke",
build_file_proto_mode = "disable_global",
importpath = "github.com/andybalholm/stroke",
sum = "h1:uF5Q/hWnDU1XZeT6CsrRSxHLroUSEYYO3kgES+yd+So=",
version = "v0.0.0-20221221101821-bd29b49d73f0",
)
go_repository(
name = "com_github_andygrunwald_go_gerrit",
build_file_proto_mode = "disable_global",
importpath = "github.com/andygrunwald/go-gerrit",
sum = "h1:q9HI3vudtbNNvaZl+l0oM7cQ07OES2x7ysiVwZpk89E=",
version = "v0.0.0-20230628115649-c44fe2fbf2ca",
)
go_repository(
name = "com_github_anmitsu_go_shlex",
build_file_proto_mode = "disable_global",
importpath = "github.com/anmitsu/go-shlex",
sum = "h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=",
version = "v0.0.0-20200514113438-38f4b401e2be",
)
go_repository(
name = "com_github_antihax_optional",
build_file_proto_mode = "disable_global",
importpath = "github.com/antihax/optional",
sum = "h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg=",
version = "v1.0.0",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_antlr4_go_antlr_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/antlr4-go/antlr/v4",
sum = "h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=",
version = "v4.13.0",
)
go_repository(
name = "com_github_antlr_antlr4_runtime_go_antlr_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/antlr/antlr4/runtime/Go/antlr/v4",
sum = "h1:goHVqTbFX3AIo0tzGr14pgfAW2ZfPChKO21Z9MGf/gk=",
version = "v4.0.0-20230512164433-5d1fd1a340c9",
)
go_repository(
name = "com_github_antonmedv_expr",
build_file_proto_mode = "disable_global",
importpath = "github.com/antonmedv/expr",
sum = "h1:uzMxTbpHpOqV20RrNvBKHGojNwdRpcrgoFtgF4J8xtg=",
version = "v1.10.5",
)
go_repository(
name = "com_github_aokoli_goutils",
build_file_proto_mode = "disable_global",
importpath = "github.com/aokoli/goutils",
sum = "h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg=",
version = "v1.0.1",
)
go_repository(
name = "com_github_apache_arrow_go_v10",
build_file_proto_mode = "disable_global",
importpath = "github.com/apache/arrow/go/v10",
sum = "h1:n9dERvixoC/1JjDmBcs9FPaEryoANa2sCgVFo6ez9cI=",
version = "v10.0.1",
)
go_repository(
name = "com_github_apache_arrow_go_v11",
build_file_proto_mode = "disable_global",
importpath = "github.com/apache/arrow/go/v11",
sum = "h1:hqauxvFQxww+0mEU/2XHG6LT7eZternCZq+A5Yly2uM=",
version = "v11.0.0",
)
go_repository(
name = "com_github_apache_arrow_go_v14",
build_file_proto_mode = "disable_global",
importpath = "github.com/apache/arrow/go/v14",
sum = "h1:N8OkaJEOfI3mEZt07BIkvo4sC6XDbL+48MBPWO5IONw=",
version = "v14.0.2",
)
go_repository(
name = "com_github_apache_thrift",
build_file_proto_mode = "disable_global",
importpath = "github.com/apache/thrift",
sum = "h1:cMd2aj52n+8VoAtvSvLn4kDC3aZ6IAkBuqWQ2IDu7wo=",
version = "v0.17.0",
)
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
go_repository(
name = "com_github_apparentlymart_go_versions",
build_file_proto_mode = "disable_global",
importpath = "github.com/apparentlymart/go-versions",
sum = "h1:ECIpSn0adcYNsBfSRwdDdz9fWlL+S/6EUd9+irwkBgU=",
version = "v1.0.1",
)
go_repository(
name = "com_github_arbovm_levenshtein",
build_file_proto_mode = "disable_global",
importpath = "github.com/arbovm/levenshtein",
sum = "h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=",
version = "v0.0.0-20160628152529-48b4e1c0c4d0",
)
go_repository(
name = "com_github_armon_circbuf",
build_file_proto_mode = "disable_global",
importpath = "github.com/armon/circbuf",
sum = "h1:7Ip0wMmLHLRJdrloDxZfhMm0xrLXZS8+COSu2bXmEQs=",
version = "v0.0.0-20190214190532-5111143e8da2",
)
go_repository(
name = "com_github_armon_consul_api",
build_file_proto_mode = "disable_global",
importpath = "github.com/armon/consul-api",
sum = "h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA=",
version = "v0.0.0-20180202201655-eb2c6b5be1b6",
)
go_repository(
name = "com_github_armon_go_metrics",
build_file_proto_mode = "disable_global",
importpath = "github.com/armon/go-metrics",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA=",
version = "v0.4.1",
)
go_repository(
name = "com_github_armon_go_radix",
build_file_proto_mode = "disable_global",
importpath = "github.com/armon/go-radix",
sum = "h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=",
version = "v1.0.0",
)
go_repository(
name = "com_github_armon_go_socks5",
build_file_proto_mode = "disable_global",
importpath = "github.com/armon/go-socks5",
sum = "h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=",
version = "v0.0.0-20160902184237-e75332964ef5",
)
go_repository(
name = "com_github_asaskevich_govalidator",
build_file_proto_mode = "disable_global",
importpath = "github.com/asaskevich/govalidator",
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
sum = "h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=",
version = "v0.0.0-20230301143203-a9d515a09cc2",
)
go_repository(
name = "com_github_atotto_clipboard",
build_file_proto_mode = "disable_global",
importpath = "github.com/atotto/clipboard",
sum = "h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=",
version = "v0.1.4",
)
go_repository(
name = "com_github_aws_aws_sdk_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go",
sum = "h1:gY0WoOW+/Wz6XmYSgDH9ge3wnAevYDSQWPxxJvqAkP4=",
version = "v1.50.8",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2",
sum = "h1:Y773UK7OBqhzi5VDXMi1zVGsoj+CVHs2eaC2bDsLwi0=",
version = "v1.17.6",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_aws_protocol_eventstream",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream",
sum = "h1:dK82zF6kkPeCo8J1e+tGx4JdvDIQzj7ygIoLg8WMuGs=",
version = "v1.4.10",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_config",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/config",
sum = "h1:4r7gsCu8Ekwl5iJGE/GmspA2UifqySCCkyyyPFeWs3w=",
version = "v1.18.16",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_credentials",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/credentials",
sum = "h1:GgToSxaENX/1zXIGNFfiVk4hxryYJ5Vt4Mh8XLAL7Lc=",
version = "v1.13.16",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_feature_ec2_imds",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/feature/ec2/imds",
sum = "h1:5qyqXASrX2zy5cTnoHHa4N2c3Lc94GH7gjnBP3GwKdU=",
version = "v1.12.24",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_feature_s3_manager",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/feature/s3/manager",
sum = "h1:kFDCPqqVvb9vYcW82L7xYfrBGpuxXQ/8A/zYVayRQK4=",
version = "v1.11.56",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_internal_configsources",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/internal/configsources",
sum = "h1:y+8n9AGDjikyXoMBTRaHHHSaFEB8267ykmvyPodJfys=",
version = "v1.1.30",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_internal_endpoints_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2",
sum = "h1:r+Kv+SEJquhAZXaJ7G4u44cIwXV3f8K+N482NNAzJZA=",
version = "v2.4.24",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_internal_ini",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/internal/ini",
sum = "h1:hf+Vhp5WtTdcSdE+yEcUz8L73sAzN0R+0jQv+Z51/mI=",
version = "v1.3.31",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_internal_v4a",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/internal/v4a",
sum = "h1:lTqBRUuy8oLhBsnnVZf14uRbIHPHCrGqg4Plc8gU/1U=",
version = "v1.0.22",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_appconfig",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/appconfig",
sum = "h1:5fez51yE//mtmaEkh9JTAcLl4xg60Ha86pE+FIqinGc=",
version = "v1.4.2",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_cloudwatch",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/cloudwatch",
sum = "h1:5WstmcviZ9X/h5nORkGT4akyLmWjrLxE9s8oKkFhkD4=",
version = "v1.15.0",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_codecommit",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/codecommit",
sum = "h1:iEqboXubLCABYFoClUyX/Bv8DfhmV39hPKdRbs21/kI=",
version = "v1.11.0",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_internal_accept_encoding",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding",
sum = "h1:y2+VQzC6Zh2ojtV2LoC0MNwHWc6qXv/j2vrQtlftkdA=",
version = "v1.9.11",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_internal_checksum",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/internal/checksum",
sum = "h1:B/hO3jfWRm7hP00UeieNlI5O2xP5WJ27tyJG5lzc7AM=",
version = "v1.1.25",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_internal_presigned_url",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url",
sum = "h1:c5qGfdbCHav6viBwiyDns3OXqhqAbGjfIB4uVu2ayhk=",
version = "v1.9.24",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_internal_s3shared",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/internal/s3shared",
sum = "h1:i4RH8DLv/BHY0fCrXYQDr+DGnWzaxB3Ee/esxUaSavk=",
version = "v1.13.24",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_kms",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/kms",
sum = "h1:A8FMqkP+OlnSiVY+2QakwqW0fAGnE18TqPig/T7aJU0=",
version = "v1.14.0",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_s3",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/s3",
sum = "h1:zzTm99krKsFcF4N7pu2z17yCcAZpQYZ7jnJZPIgEMXE=",
version = "v1.30.6",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_sso",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/sso",
sum = "h1:bdKIX6SVF3nc3xJFw6Nf0igzS6Ff/louGq8Z6VP/3Hs=",
version = "v1.12.5",
)
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_sts",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/sts",
sum = "h1:rIFn5J3yDoeuKCE9sESXqM5POTAhOP1du3bv/qTL+tE=",
version = "v1.18.6",
)
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
go_repository(
name = "com_github_aws_constructs_go_constructs_v10",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/constructs-go/constructs/v10",
sum = "h1:LsjBIMiaDX/vqrXWhzTquBJ9pPdi02/H+z1DCwg0PEM=",
version = "v10.3.0",
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
)
go_repository(
name = "com_github_aws_jsii_runtime_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/jsii-runtime-go",
sum = "h1:ulW8WgW9xchCkGc8SBKSQwpm+4/MwoFkYuCsOD8NnMU=",
version = "v1.98.0",
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
)
go_repository(
name = "com_github_aws_smithy_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/smithy-go",
sum = "h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8=",
version = "v1.13.5",
)
go_repository(
name = "com_github_aybabtme_iocontrol",
build_file_proto_mode = "disable_global",
importpath = "github.com/aybabtme/iocontrol",
sum = "h1:0NmehRCgyk5rljDQLKUO+cRJCnduDyn11+zGZIc9Z48=",
version = "v0.0.0-20150809002002-ad15bcfc95a0",
)
go_repository(
name = "com_github_aymanbagabas_go_osc52_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/aymanbagabas/go-osc52/v2",
sum = "h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=",
version = "v2.0.1",
)
go_repository(
name = "com_github_aymanbagabas_go_udiff",
build_file_proto_mode = "disable_global",
importpath = "github.com/aymanbagabas/go-udiff",
sum = "h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8=",
version = "v0.2.0",
)
go_repository(
name = "com_github_aymerick_douceur",
build_file_proto_mode = "disable_global",
importpath = "github.com/aymerick/douceur",
sum = "h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=",
version = "v0.2.0",
)
go_repository(
name = "com_github_azure_azure_sdk_for_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/azure-sdk-for-go",
sum = "h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw=",
version = "v65.0.0+incompatible",
)
go_repository(
name = "com_github_azure_azure_sdk_for_go_sdk_ai_azopenai",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai",
sum = "h1:jQ5K0LChwOu8Kx2pkBeUCskXT/UCL7dKNMIm0QUHI+0=",
version = "v0.5.0",
)
go_repository(
name = "com_github_azure_azure_sdk_for_go_sdk_azcore",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/azure-sdk-for-go/sdk/azcore",
sum = "h1:c4k2FIYIh4xtwqrQwV0Ct1v5+ehlNXj5NI/MWVsiTkQ=",
version = "v1.9.2",
)
go_repository(
name = "com_github_azure_azure_sdk_for_go_sdk_azidentity",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/azure-sdk-for-go/sdk/azidentity",
sum = "h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI=",
version = "v1.4.0",
)
go_repository(
name = "com_github_azure_azure_sdk_for_go_sdk_internal",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/azure-sdk-for-go/sdk/internal",
sum = "h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ=",
version = "v1.5.2",
)
go_repository(
name = "com_github_azure_azure_sdk_for_go_sdk_storage_azblob",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob",
sum = "h1:QSdcrd/UFJv6Bp/CfoVf2SrENpFn9P6Yh8yb+xNhYMM=",
version = "v0.4.1",
)
go_repository(
name = "com_github_azure_go_ansiterm",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/go-ansiterm",
sum = "h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=",
version = "v0.0.0-20230124172434-306776ec8161",
)
go_repository(
name = "com_github_azure_go_autorest",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/go-autorest",
sum = "h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=",
version = "v14.2.0+incompatible",
)
go_repository(
name = "com_github_azure_go_autorest_autorest",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/go-autorest/autorest",
sum = "h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM=",
version = "v0.11.28",
)
go_repository(
name = "com_github_azure_go_autorest_autorest_adal",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/go-autorest/autorest/adal",
sum = "h1:jjQnVFXPfekaqb8vIsv2G1lxshoW+oGv4MDlhRtnYZk=",
version = "v0.9.21",
)
go_repository(
name = "com_github_azure_go_autorest_autorest_date",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/go-autorest/autorest/date",
sum = "h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw=",
version = "v0.3.0",
)
go_repository(
name = "com_github_azure_go_autorest_autorest_mocks",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/go-autorest/autorest/mocks",
sum = "h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk=",
version = "v0.4.1",
)
go_repository(
name = "com_github_azure_go_autorest_autorest_to",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/go-autorest/autorest/to",
sum = "h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk=",
version = "v0.4.0",
)
go_repository(
name = "com_github_azure_go_autorest_autorest_validation",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/go-autorest/autorest/validation",
sum = "h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac=",
version = "v0.3.1",
)
go_repository(
name = "com_github_azure_go_autorest_logger",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/go-autorest/logger",
sum = "h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg=",
version = "v0.2.1",
)
go_repository(
name = "com_github_azure_go_autorest_tracing",
build_file_proto_mode = "disable_global",
importpath = "github.com/Azure/go-autorest/tracing",
sum = "h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo=",
version = "v0.6.0",
)
go_repository(
name = "com_github_azuread_microsoft_authentication_library_for_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/AzureAD/microsoft-authentication-library-for-go",
sum = "h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk=",
version = "v1.1.1",
)
2023-01-31 18:02:34 +00:00
go_repository(
name = "com_github_bahlo_generic_list_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/bahlo/generic-list-go",
sum = "h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=",
version = "v0.2.0",
)
go_repository(
name = "com_github_bazelbuild_bazel_gazelle",
build_file_proto_mode = "disable_global",
importpath = "github.com/bazelbuild/bazel-gazelle",
sum = "h1:Bvg+zEHWYwWrhJT4WxyvcU3y1DEJpT/XlPYEfIn9lUI=",
version = "v0.35.0",
)
go_repository(
name = "com_github_bazelbuild_buildtools",
build_file_proto_mode = "disable_global",
importpath = "github.com/bazelbuild/buildtools",
sum = "h1:2Gc2Q6hVR1SJ8bBI9Ybzoggp8u/ED2WkM4MfvEIn9+c=",
version = "v0.0.0-20231115204819-d4c9dccdfbb1",
)
go_repository(
name = "com_github_bazelbuild_rules_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/bazelbuild/rules_go",
sum = "h1:TTl2buKt0lqJe5s6up5FtaB1F95Wg997Lv15MWetU88=",
version = "v0.47.0",
)
go_repository(
name = "com_github_becheran_wildmatch_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/becheran/wildmatch-go",
sum = "h1:mE3dGGkTmpKtT4Z+88t8RStG40yN9T+kFEGj2PZFSzA=",
version = "v1.0.0",
)
go_repository(
name = "com_github_beevik_etree",
build_file_proto_mode = "disable_global",
importpath = "github.com/beevik/etree",
sum = "h1:hQTc+pylzIKDb23yYprodCWWTt+ojFfUZyzU09a/hmU=",
version = "v1.3.0",
)
go_repository(
name = "com_github_benbjohnson_clock",
build_file_proto_mode = "disable_global",
importpath = "github.com/benbjohnson/clock",
sum = "h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o=",
version = "v1.3.5",
)
go_repository(
name = "com_github_beorn7_perks",
build_file_proto_mode = "disable_global",
importpath = "github.com/beorn7/perks",
sum = "h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=",
version = "v1.0.1",
)
go_repository(
name = "com_github_bevzzz_nb",
build_file_proto_mode = "disable_global",
importpath = "github.com/bevzzz/nb",
sum = "h1:Pg2p4TXttIRquLZjz5cfffPfWeUCHVBPUhdcDhwbccI=",
version = "v0.3.0",
)
go_repository(
name = "com_github_bevzzz_nb_extension_extra_goldmark_jupyter",
build_file_proto_mode = "disable_global",
importpath = "github.com/bevzzz/nb/extension/extra/goldmark-jupyter",
sum = "h1:F/vUmFPZ6+URUo2WXyraB0JUkcpcHBFws9QYcv673l0=",
version = "v0.0.0-20240131001330-e69229bd9da4",
)
go_repository(
name = "com_github_bevzzz_nb_synth",
build_file_proto_mode = "disable_global",
importpath = "github.com/bevzzz/nb-synth",
sum = "h1:CH1+0p2ywCtqQbDL2KpwRn+XL71Peyhlshusdbn13kk=",
version = "v0.0.0-20240128164931-35fdda0583a0",
)
go_repository(
name = "com_github_bgentry_speakeasy",
build_file_proto_mode = "disable_global",
importpath = "github.com/bgentry/speakeasy",
sum = "h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=",
version = "v0.1.0",
)
go_repository(
name = "com_github_bitly_go_simplejson",
build_file_proto_mode = "disable_global",
importpath = "github.com/bitly/go-simplejson",
sum = "h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y=",
version = "v0.5.0",
)
go_repository(
name = "com_github_bits_and_blooms_bitset",
build_file_proto_mode = "disable_global",
importpath = "github.com/bits-and-blooms/bitset",
sum = "h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE=",
version = "v1.13.0",
)
go_repository(
name = "com_github_bketelsen_crypt",
build_file_proto_mode = "disable_global",
importpath = "github.com/bketelsen/crypt",
sum = "h1:w/jqZtC9YD4DS/Vp9GhWfWcCpuAL58oTnLoI8vE9YHU=",
version = "v0.0.4",
)
go_repository(
name = "com_github_blang_semver_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/blang/semver/v4",
sum = "h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=",
version = "v4.0.0",
)
go_repository(
name = "com_github_bmatcuk_doublestar",
build_file_proto_mode = "disable_global",
importpath = "github.com/bmatcuk/doublestar",
sum = "h1:gPypJ5xD31uhX6Tf54sDPUOBXTqKH4c9aPY66CyQrS0=",
version = "v1.3.4",
)
go_repository(
name = "com_github_bmatcuk_doublestar_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/bmatcuk/doublestar/v4",
sum = "h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I=",
version = "v4.6.1",
)
go_repository(
name = "com_github_boj_redistore",
build_file_proto_mode = "disable_global",
importpath = "github.com/boj/redistore",
sum = "h1:RmdPFa+slIr4SCBg4st/l/vZWVe9QJKMXGO60Bxbe04=",
version = "v0.0.0-20180917114910-cd5dcc76aeff",
)
go_repository(
name = "com_github_boombuler_barcode",
build_file_proto_mode = "disable_global",
importpath = "github.com/boombuler/barcode",
sum = "h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs=",
version = "v1.0.1",
)
go_repository(
name = "com_github_bradfitz_gomemcache",
build_file_proto_mode = "disable_global",
importpath = "github.com/bradfitz/gomemcache",
sum = "h1:7IjN4QP3c38xhg6wz8R3YjoU+6S9e7xBc0DAVLLIpHE=",
version = "v0.0.0-20170208213004-1952afaa557d",
)
go_repository(
name = "com_github_bradleyjkemp_cupaloy_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/bradleyjkemp/cupaloy/v2",
sum = "h1:knToPYa2xtfg42U3I6punFEjaGFKWQRXJwj0JTv4mTs=",
version = "v2.6.0",
)
go_repository(
name = "com_github_bshuster_repo_logrus_logstash_hook",
build_file_proto_mode = "disable_global",
importpath = "github.com/bshuster-repo/logrus-logstash-hook",
sum = "h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70=",
version = "v1.0.0",
)
go_repository(
name = "com_github_bsm_ginkgo_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/bsm/ginkgo/v2",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=",
version = "v2.12.0",
)
go_repository(
name = "com_github_bsm_gomega",
build_file_proto_mode = "disable_global",
importpath = "github.com/bsm/gomega",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=",
version = "v1.27.10",
)
go_repository(
name = "com_github_bufbuild_buf",
build_file_proto_mode = "disable_global",
importpath = "github.com/bufbuild/buf",
sum = "h1:HFxKrR8wFcZwrBInN50K/oJX/WOtPVq24rHb/ArjfBA=",
version = "v1.25.0",
)
go_repository(
name = "com_github_bufbuild_connect_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/bufbuild/connect-go",
sum = "h1:JIgAeNuFpo+SUPfU19Yt5TcWlznsN5Bv10/gI/6Pjoc=",
version = "v1.9.0",
)
go_repository(
name = "com_github_bufbuild_connect_opentelemetry_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/bufbuild/connect-opentelemetry-go",
sum = "h1:6JAn10SNqlQ/URhvRNGrIlczKw1wEXknBUUtmWqOiak=",
version = "v0.4.0",
)
go_repository(
name = "com_github_bufbuild_protocompile",
build_file_proto_mode = "disable_global",
importpath = "github.com/bufbuild/protocompile",
sum = "h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg=",
version = "v0.5.1",
)
go_repository(
name = "com_github_bufbuild_protovalidate_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/bufbuild/protovalidate-go",
sum = "h1:pJr07sYhliyfj/STAM7hU4J3FKpVeLVKvOBmOTN8j+s=",
version = "v0.2.1",
)
go_repository(
name = "com_github_buger_jsonparser",
build_file_proto_mode = "disable_global",
importpath = "github.com/buger/jsonparser",
2023-01-31 18:02:34 +00:00
sum = "h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=",
version = "v1.1.1",
)
go_repository(
name = "com_github_bugsnag_bugsnag_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/bugsnag/bugsnag-go",
sum = "h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng=",
version = "v0.0.0-20141110184014-b1d153021fcd",
)
go_repository(
name = "com_github_bugsnag_osext",
build_file_proto_mode = "disable_global",
importpath = "github.com/bugsnag/osext",
sum = "h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ=",
version = "v0.0.0-20130617224835-0dd3f918b21b",
)
go_repository(
name = "com_github_bugsnag_panicwrap",
build_file_proto_mode = "disable_global",
importpath = "github.com/bugsnag/panicwrap",
sum = "h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o=",
version = "v0.0.0-20151223152923-e2c28503fcd0",
)
go_repository(
name = "com_github_buildkite_go_buildkite_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/buildkite/go-buildkite/v3",
fix(build-tracker): Failed back-compat doesn't count towards branch-locking quota (#63911) Closes [DINF-51](https://linear.app/sourcegraph/issue/DINF-51/failed-back-compat-doesnt-count-towards-branch-locking-quota) ## Context If a back-compat step on main fails, the build is marked as having failed. However, we don't treat that as a failure in build-tracker, resulting in no #buildkite-main post and not counting towards failed build quota for locking main. The reason why this was happening is that the Backcompat build wasn't linked to the main Sourcegraph build in anyway. However, when a backcompat fails the main build reflects the status of this failure, but we do not use this field when determining the status of a build, so it doesn't work for our use case. ![CleanShot 2024-07-18 at 15 04 15@2x](https://github.com/user-attachments/assets/9553330a-ad98-45cc-b4ce-03a22ca1b99d) We [instead do a walkthrough of all the jobs associated with a build to figure out](https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/dev/build-tracker/main.go?L349-372) if the build has failed, fixed or is passing. With this logic, it means we have to link the steps from child builds that a particular build triggers to it's parent. ## Test plan * Create a build that'll have backcompat failing * The build tracker event associated with the main build will be reported with a state of failed to buildkite. ![CleanShot 2024-07-18 at 15 10 45@2x](https://github.com/user-attachments/assets/1bf503ab-0020-47bf-9512-b3a9ee5d4e36) ## Changelog <!-- OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c -->
2024-07-25 11:45:09 +00:00
sum = "h1:A43KDOuNczqrY8wqlsHNtPoYbgWXYC/slkB/2JYXr5E=",
version = "v3.11.0",
)
go_repository(
name = "com_github_burntsushi_toml",
build_file_proto_mode = "disable_global",
importpath = "github.com/BurntSushi/toml",
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
sum = "h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=",
version = "v1.3.2",
)
go_repository(
name = "com_github_burntsushi_xgb",
build_file_proto_mode = "disable_global",
importpath = "github.com/BurntSushi/xgb",
sum = "h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=",
version = "v0.0.0-20160522181843-27f122750802",
)
go_repository(
name = "com_github_bwesterb_go_ristretto",
build_file_proto_mode = "disable_global",
importpath = "github.com/bwesterb/go-ristretto",
sum = "h1:1w53tCkGhCQ5djbat3+MH0BAQ5Kfgbt56UZQ/JMzngw=",
version = "v1.2.3",
)
go_repository(
name = "com_github_c2h5oh_datasize",
build_file_proto_mode = "disable_global",
importpath = "github.com/c2h5oh/datasize",
sum = "h1:6+ZFm0flnudZzdSE0JxlhR2hKnGPcNB35BjQf4RYQDY=",
version = "v0.0.0-20220606134207-859f65c6625b",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "com_github_campoy_embedmd",
build_file_proto_mode = "disable_global",
importpath = "github.com/campoy/embedmd",
sum = "h1:V4kI2qTJJLf4J29RzI/MAt2c3Bl4dQSYPuflzwFH2hY=",
version = "v1.0.0",
)
go_repository(
name = "com_github_cenkalti_backoff",
build_file_proto_mode = "disable_global",
importpath = "github.com/cenkalti/backoff",
sum = "h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=",
version = "v2.2.1+incompatible",
)
go_repository(
name = "com_github_cenkalti_backoff_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/cenkalti/backoff/v4",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=",
version = "v4.3.0",
)
go_repository(
name = "com_github_census_instrumentation_opencensus_proto",
build_file_proto_mode = "disable_global",
importpath = "github.com/census-instrumentation/opencensus-proto",
sum = "h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g=",
version = "v0.4.1",
)
go_repository(
name = "com_github_cespare_xxhash",
build_file_proto_mode = "disable_global",
importpath = "github.com/cespare/xxhash",
sum = "h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=",
version = "v1.1.0",
)
go_repository(
name = "com_github_cespare_xxhash_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/cespare/xxhash/v2",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=",
version = "v2.3.0",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "com_github_chainguard_dev_clog",
build_file_proto_mode = "disable_global",
importpath = "github.com/chainguard-dev/clog",
sum = "h1:E2y3L/nM7vRzwyROQgmuB+Egm/d1rHOyip0Bq4AyVow=",
version = "v1.2.3-0.20240116182827-04bee692f7a8",
)
go_repository(
name = "com_github_chainguard_dev_go_apk",
build_file_proto_mode = "disable_global",
importpath = "github.com/chainguard-dev/go-apk",
patch_args = ["-p1"],
patches = [
"//third_party/com_github_chainguard_dev_go_apk:newest-file-selection-fix.patch",
],
sum = "h1:riuOFg3Ay1Js10GQtCAsCL2Hp2DJweUlYjKaxXteYV8=",
version = "v0.0.0-20240130195846-91a06ffe6715",
)
go_repository(
name = "com_github_charmbracelet_bubbles",
build_file_proto_mode = "disable_global",
importpath = "github.com/charmbracelet/bubbles",
sum = "h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0=",
version = "v0.18.0",
)
go_repository(
name = "com_github_charmbracelet_bubbletea",
build_file_proto_mode = "disable_global",
importpath = "github.com/charmbracelet/bubbletea",
sum = "h1:zTCWSuST+3yZYZnVSvbXwKOPRSNZceVeqpzOLN2zq1s=",
version = "v0.26.6",
)
go_repository(
name = "com_github_charmbracelet_glamour",
build_file_proto_mode = "disable_global",
importpath = "github.com/charmbracelet/glamour",
sum = "h1:2BtKGZ4iVJCDfMF229EzbeR1QRKLWztO9dMtjmqZSng=",
version = "v0.7.0",
)
go_repository(
name = "com_github_charmbracelet_harmonica",
build_file_proto_mode = "disable_global",
importpath = "github.com/charmbracelet/harmonica",
sum = "h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG4pgaUBiQ=",
version = "v0.2.0",
)
go_repository(
name = "com_github_charmbracelet_lipgloss",
build_file_proto_mode = "disable_global",
importpath = "github.com/charmbracelet/lipgloss",
sum = "h1:/gmzszl+pedQpjCOH+wFkZr/N90Snz40J/NR7A0zQcs=",
version = "v0.12.1",
)
go_repository(
name = "com_github_charmbracelet_x_ansi",
build_file_proto_mode = "disable_global",
importpath = "github.com/charmbracelet/x/ansi",
sum = "h1:IEU3D6+dWwPSgZ6HBH+v6oUuZ/nVawMiWj5831KfiLM=",
version = "v0.1.4",
)
go_repository(
name = "com_github_charmbracelet_x_input",
build_file_proto_mode = "disable_global",
importpath = "github.com/charmbracelet/x/input",
sum = "h1:TEsGSfZYQyOtp+STIjyBq6tpRaorH0qpwZUj8DavAhQ=",
version = "v0.1.0",
)
go_repository(
name = "com_github_charmbracelet_x_term",
build_file_proto_mode = "disable_global",
importpath = "github.com/charmbracelet/x/term",
sum = "h1:3cosVAiPOig+EV4X9U+3LDgtwwAoEzJjNdwbXDjF6yI=",
version = "v0.1.1",
)
go_repository(
name = "com_github_charmbracelet_x_windows",
build_file_proto_mode = "disable_global",
importpath = "github.com/charmbracelet/x/windows",
sum = "h1:gTaxdvzDM5oMa/I2ZNF7wN78X/atWemG9Wph7Ika2k4=",
version = "v0.1.0",
)
go_repository(
name = "com_github_chromedp_cdproto",
build_file_proto_mode = "disable_global",
importpath = "github.com/chromedp/cdproto",
2024-05-01 12:57:34 +00:00
sum = "h1:aPflPkRFkVwbW6dmcVqfgwp1i+UWGFH6VgR1Jim5Ygc=",
version = "v0.0.0-20230802225258-3cf4e6d46a89",
)
go_repository(
name = "com_github_chromedp_chromedp",
build_file_proto_mode = "disable_global",
importpath = "github.com/chromedp/chromedp",
2024-05-01 12:57:34 +00:00
sum = "h1:dKtNz4kApb06KuSXoTQIyUC2TrA0fhGDwNZf3bcgfKw=",
version = "v0.9.2",
)
go_repository(
name = "com_github_chromedp_sysutil",
build_file_proto_mode = "disable_global",
importpath = "github.com/chromedp/sysutil",
sum = "h1:+ZxhTpfpZlmchB58ih/LBHX52ky7w2VhQVKQMucy3Ic=",
version = "v1.0.0",
)
go_repository(
name = "com_github_chzyer_logex",
build_file_proto_mode = "disable_global",
importpath = "github.com/chzyer/logex",
2024-05-01 12:57:34 +00:00
sum = "h1:+eqR0HfOetur4tgnC8ftU5imRnhi4te+BadWS95c5AM=",
version = "v1.2.0",
)
go_repository(
name = "com_github_chzyer_readline",
build_file_proto_mode = "disable_global",
importpath = "github.com/chzyer/readline",
sum = "h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI=",
version = "v1.5.1",
)
go_repository(
name = "com_github_chzyer_test",
build_file_proto_mode = "disable_global",
importpath = "github.com/chzyer/test",
2024-05-01 12:57:34 +00:00
sum = "h1:dZ0/VyGgQdVGAss6Ju0dt5P0QltE0SFY5Woh6hbIfiQ=",
version = "v0.0.0-20210722231415-061457976a23",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_clickhouse_ch_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/ClickHouse/ch-go",
sum = "h1:jSm2szHbT9MCAB1rJ3WuCJqmGLi5UTjlNu+f530UTS0=",
version = "v0.58.2",
)
go_repository(
name = "com_github_clickhouse_clickhouse_go_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/ClickHouse/clickhouse-go/v2",
sum = "h1:ZCmAYWpu75IyEi7+Yrs/uaAjiCGY5wfW5kXo64exkX4=",
version = "v2.17.1",
)
go_repository(
name = "com_github_client9_misspell",
build_file_proto_mode = "disable_global",
importpath = "github.com/client9/misspell",
sum = "h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=",
version = "v0.3.4",
)
go_repository(
name = "com_github_cloudflare_circl",
build_file_proto_mode = "disable_global",
importpath = "github.com/cloudflare/circl",
2023-01-31 18:02:34 +00:00
patches = [
"//third_party/com_github_cloudflare_circl:math_fp25519_BUILD_bazel.patch", # keep
"//third_party/com_github_cloudflare_circl:math_fp448_BUILD_bazel.patch", # keep
"//third_party/com_github_cloudflare_circl:dh_x25519_BUILD_bazel.patch", # keep
"//third_party/com_github_cloudflare_circl:dh_x448_BUILD_bazel.patch", # keep
],
sum = "h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=",
version = "v1.3.7",
)
go_repository(
name = "com_github_cloudykit_fastprinter",
build_file_proto_mode = "disable_global",
importpath = "github.com/CloudyKit/fastprinter",
sum = "h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c=",
version = "v0.0.0-20200109182630-33d98a066a53",
)
go_repository(
name = "com_github_cloudykit_jet_v6",
build_file_proto_mode = "disable_global",
importpath = "github.com/CloudyKit/jet/v6",
sum = "h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME=",
version = "v6.2.0",
)
go_repository(
name = "com_github_cncf_udpa_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/cncf/udpa/go",
sum = "h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk=",
version = "v0.0.0-20220112060539-c52dc94e7fbe",
)
go_repository(
name = "com_github_cncf_xds_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/cncf/xds/go",
sum = "h1:ga8SEFjZ60pxLcmhnThWgvH2wg8376yUJmPhEH4H3kw=",
version = "v0.0.0-20240423153145-555b57ec207b",
)
go_repository(
name = "com_github_cockroachdb_apd",
build_file_proto_mode = "disable_global",
importpath = "github.com/cockroachdb/apd",
sum = "h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=",
version = "v1.1.0",
)
go_repository(
name = "com_github_cockroachdb_apd_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/cockroachdb/apd/v2",
sum = "h1:y1Rh3tEU89D+7Tgbw+lp52T6p/GJLpDmNvr10UWqLTE=",
version = "v2.0.1",
)
go_repository(
name = "com_github_cockroachdb_datadriven",
build_file_proto_mode = "disable_global",
importpath = "github.com/cockroachdb/datadriven",
sum = "h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA=",
version = "v1.0.2",
)
go_repository(
name = "com_github_cockroachdb_errors",
build_file_proto_mode = "disable_global",
importpath = "github.com/cockroachdb/errors",
sum = "h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I=",
version = "v1.11.3",
)
go_repository(
name = "com_github_cockroachdb_logtags",
build_file_proto_mode = "disable_global",
importpath = "github.com/cockroachdb/logtags",
sum = "h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE=",
version = "v0.0.0-20230118201751-21c54148d20b",
)
go_repository(
name = "com_github_cockroachdb_redact",
build_file_proto_mode = "disable_global",
importpath = "github.com/cockroachdb/redact",
sum = "h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30=",
version = "v1.1.5",
)
go_repository(
name = "com_github_codegangsta_inject",
build_file_proto_mode = "disable_global",
importpath = "github.com/codegangsta/inject",
sum = "h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=",
version = "v0.0.0-20150114235600-33e0aa1cb7c0",
)
go_repository(
name = "com_github_cohere_ai_cohere_go_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/cohere-ai/cohere-go/v2",
sum = "h1:NtxtcqkJ3ZBj8DFgk/4hpOrGK7CGnllGNpQn1bkaqQs=",
version = "v2.8.2",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "com_github_common_nighthawk_go_figure",
build_file_proto_mode = "disable_global",
importpath = "github.com/common-nighthawk/go-figure",
sum = "h1:J5BL2kskAlV9ckgEsNQXscjIaLiOYiZ75d4e94E6dcQ=",
version = "v0.0.0-20210622060536-734e95fb86be",
)
go_repository(
name = "com_github_containerd_cgroups",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/cgroups",
sum = "h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=",
version = "v1.1.0",
)
go_repository(
name = "com_github_containerd_console",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/console",
sum = "h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY=",
version = "v1.0.4-0.20230313162750-1ae8d489ac81",
)
go_repository(
name = "com_github_containerd_containerd",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/containerd",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0=",
version = "v1.7.12",
)
go_repository(
name = "com_github_containerd_continuity",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/continuity",
sum = "h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU=",
version = "v0.4.1",
)
go_repository(
name = "com_github_containerd_fifo",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/fifo",
sum = "h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY=",
version = "v1.1.0",
)
go_repository(
name = "com_github_containerd_fuse_overlayfs_snapshotter",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/fuse-overlayfs-snapshotter",
sum = "h1:Xy9Tkx0tk/SsMfLDFc69wzqSrxQHYEFELHBO/Z8XO3M=",
version = "v1.0.2",
)
go_repository(
name = "com_github_containerd_go_cni",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/go-cni",
sum = "h1:ORi7P1dYzCwVM6XPN4n3CbkuOx/NZ2DOqy+SHRdo9rU=",
version = "v1.1.9",
)
go_repository(
name = "com_github_containerd_go_runc",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/go-runc",
sum = "h1:OX4f+/i2y5sUT7LhmcJH7GYrjjhHa1QI4e8yO0gGleA=",
version = "v1.1.0",
)
go_repository(
name = "com_github_containerd_log",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/log",
sum = "h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=",
version = "v0.1.0",
)
go_repository(
name = "com_github_containerd_nydus_snapshotter",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/nydus-snapshotter",
sum = "h1:7SOrMU2YmLzfbsr5J7liMZJlNi5WT6vtIOxLGv+iz7E=",
version = "v0.8.2",
)
go_repository(
name = "com_github_containerd_stargz_snapshotter",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/stargz-snapshotter",
sum = "h1:OTUVZoPSPs8mGgmQUE1dqw3WX/3nrsmsurW7UPLWl1U=",
version = "v0.14.3",
)
go_repository(
name = "com_github_containerd_stargz_snapshotter_estargz",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/stargz-snapshotter/estargz",
sum = "h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k=",
version = "v0.14.3",
)
go_repository(
name = "com_github_containerd_ttrpc",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/ttrpc",
sum = "h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs=",
version = "v1.2.2",
)
go_repository(
name = "com_github_containerd_typeurl_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/containerd/typeurl/v2",
sum = "h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4=",
version = "v2.1.1",
)
go_repository(
name = "com_github_containernetworking_cni",
build_file_proto_mode = "disable_global",
importpath = "github.com/containernetworking/cni",
sum = "h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ=",
version = "v1.1.2",
)
go_repository(
name = "com_github_coreos_bbolt",
build_file_proto_mode = "disable_global",
importpath = "github.com/coreos/bbolt",
sum = "h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s=",
version = "v1.3.2",
)
go_repository(
name = "com_github_coreos_etcd",
build_file_proto_mode = "disable_global",
importpath = "github.com/coreos/etcd",
sum = "h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04=",
version = "v3.3.10+incompatible",
)
go_repository(
name = "com_github_coreos_go_iptables",
# We need to explictly turn this on, because the repository
# has a script named "build" at the root which makes tricks
# gazelle into thinking it already has a Buildfile
build_file_generation = "on",
build_file_proto_mode = "disable_global",
importpath = "github.com/coreos/go-iptables",
sum = "h1:is9qnZMPYjLd8LYqmm/qlE+wwEgJIkTYdhV3rfZo4jk=",
version = "v0.6.0",
)
go_repository(
name = "com_github_coreos_go_oidc",
build_file_proto_mode = "disable_global",
importpath = "github.com/coreos/go-oidc",
sum = "h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk=",
version = "v2.2.1+incompatible",
)
go_repository(
name = "com_github_coreos_go_semver",
build_file_proto_mode = "disable_global",
importpath = "github.com/coreos/go-semver",
sum = "h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=",
version = "v0.3.1",
)
go_repository(
name = "com_github_coreos_go_systemd",
build_file_proto_mode = "disable_global",
importpath = "github.com/coreos/go-systemd",
sum = "h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c=",
version = "v0.0.0-20190719114852-fd7a80b32e1f",
)
go_repository(
name = "com_github_coreos_go_systemd_v22",
build_file_proto_mode = "disable_global",
importpath = "github.com/coreos/go-systemd/v22",
sum = "h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=",
version = "v22.5.0",
)
go_repository(
name = "com_github_coreos_pkg",
build_file_proto_mode = "disable_global",
importpath = "github.com/coreos/pkg",
sum = "h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=",
version = "v0.0.0-20180928190104-399ea9e2e55f",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_cpuguy83_dockercfg",
build_file_proto_mode = "disable_global",
importpath = "github.com/cpuguy83/dockercfg",
sum = "h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E=",
version = "v0.3.1",
)
go_repository(
name = "com_github_cpuguy83_go_md2man_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/cpuguy83/go-md2man/v2",
sum = "h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=",
version = "v2.0.3",
)
go_repository(
name = "com_github_creack_pty",
build_file_proto_mode = "disable_global",
importpath = "github.com/creack/pty",
sum = "h1:1/QdRyBaHHJP61QkWMXlOIBfsgdDeeKfK8SYVUWJKf0=",
version = "v1.1.21",
)
go_repository(
name = "com_github_crewjam_httperr",
build_file_proto_mode = "disable_global",
importpath = "github.com/crewjam/httperr",
sum = "h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo=",
version = "v0.2.0",
)
go_repository(
name = "com_github_crewjam_saml",
build_file_proto_mode = "disable_global",
importpath = "github.com/crewjam/saml",
sum = "h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c=",
version = "v0.4.14",
)
go_repository(
# This is no longer used but we keep it for backwards compatability
# tests while on 5.0.x.
name = "com_github_crewjam_saml_samlidp",
build_file_proto_mode = "disable_global",
importpath = "github.com/crewjam/saml/samlidp",
sum = "h1:13Ix7LoUJ0Yu5F+s6Aw8Afc8x+n98RSJNGHpxEbcYus=",
version = "v0.0.0-20221211125903-d951aa2d145a",
) # keep
go_repository(
name = "com_github_cyphar_filepath_securejoin",
build_file_proto_mode = "disable_global",
importpath = "github.com/cyphar/filepath-securejoin",
sum = "h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=",
version = "v0.2.4",
)
go_repository(
name = "com_github_danieljoos_wincred",
build_file_proto_mode = "disable_global",
importpath = "github.com/danieljoos/wincred",
sum = "h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs=",
version = "v1.2.1",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "com_github_danwakefield_fnmatch",
build_file_proto_mode = "disable_global",
importpath = "github.com/danwakefield/fnmatch",
sum = "h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ=",
version = "v0.0.0-20160403171240-cbb64ac3d964",
)
go_repository(
name = "com_github_datadog_zstd",
build_file_proto_mode = "disable_global",
importpath = "github.com/DataDog/zstd",
sum = "h1:+K/VEwIAaPcHiMtQvpLD4lqW7f0Gk3xdYZmI1hD+CXo=",
version = "v1.5.0",
)
go_repository(
name = "com_github_dave_jennifer",
build_file_proto_mode = "disable_global",
importpath = "github.com/dave/jennifer",
Batch Changes support for Perforce (#52127) # Add Batch Changes support for Perforce # Test plan ## Local dev setup Launch SG with Batch Changes enabled by running `sg start batches` ## Site Configuration <img width="845" alt="enable Batch Changes and disable sub-repo permissions" src="https://github.com/sourcegraph/sourcegraph/assets/129280/533e8299-dbc2-4d6d-9ae1-f186ca4625e7"> In Site Configuration, add `"batchChanges.enablePerforce": true` to `experimentalFeatures` and disable `subRepoPermissions`. Currently, Batch Changes does not work on Perforce when `subRepoPermissions` is enabled. ## Add Perforce code host(s) If you already have some, no need to add more, but you'll need at least one Perforce code host for this exercise! ## Add Batch Changes credentials for the code host <img width="864" alt="add Batch Changes credentials for the code host" src="https://github.com/sourcegraph/sourcegraph/assets/129280/78c5fb5b-b3a0-4869-a73f-b67196ba1ba9"> In Batch Changes --> Settings, click the green Add Credentials button, enter a username and ticket for a Perforce user who is allowed to shelve changelists on the code host ## Create a new batch change <img width="627" alt="create batch change" src="https://github.com/sourcegraph/sourcegraph/assets/129280/43587040-4cd0-44ea-acac-4a4c79b00cfd"> Click the Batch Changes tab at the top of the window, then the big blue `Create batch change` button. Give it a fancy name <img width="1247" alt="batch change spec" src="https://github.com/sourcegraph/sourcegraph/assets/129280/947be557-f903-4537-8830-7bee27fb43e7"> Complete the batch spec, making sure to specify your repo and file(s) found in there. Click the big green `Preview workspaces` button and make sure it's finding what you expect. <img width="1073" alt="batch change preview" src="https://github.com/sourcegraph/sourcegraph/assets/129280/7b74b48f-45c8-4a38-852d-d1a57777f1e1"> In the preview page, click the green `Preview` button to proceed. <img width="1071" alt="batch change apply page" src="https://github.com/sourcegraph/sourcegraph/assets/129280/c6d93cdb-527c-432f-84f3-80460448ba88"> Choose `Publish on apply` for the `Select action on apply`, then click `Apply` and `OK` on the confirmation dialog, then after a bit, you'll see the batch change status page, showing the changelist id of the shelved changelist. <img width="832" alt="batch change status" src="https://github.com/sourcegraph/sourcegraph/assets/129280/02d4cbf2-592d-4b99-9e1f-c260d907b145"> --------- Co-authored-by: Idan Varsano <varsanojidan@gmail.com>
2023-06-20 23:12:58 +00:00
sum = "h1:T4T/67t6RAA5AIV6+NP8Uk/BIsXgDoqEowgycdQQLuk=",
version = "v1.6.1",
)
go_repository(
name = "com_github_davecgh_go_spew",
build_file_proto_mode = "disable_global",
importpath = "github.com/davecgh/go-spew",
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
sum = "h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=",
version = "v1.1.2-0.20180830191138-d8f796af33cc",
)
go_repository(
name = "com_github_daviddengcn_go_colortext",
build_file_proto_mode = "disable_global",
importpath = "github.com/daviddengcn/go-colortext",
sum = "h1:ANqDyC0ys6qCSvuEK7l3g5RaehL/Xck9EX8ATG8oKsE=",
version = "v1.0.0",
)
go_repository(
name = "com_github_dchest_uniuri",
build_file_proto_mode = "disable_global",
importpath = "github.com/dchest/uniuri",
sum = "h1:koIcOUdrTIivZgSLhHQvKgqdWZq5d7KdMEWF1Ud6+5g=",
version = "v1.2.0",
)
go_repository(
name = "com_github_decred_dcrd_dcrec_secp256k1_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/decred/dcrd/dcrec/secp256k1/v4",
sum = "h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs=",
version = "v4.2.0",
)
go_repository(
name = "com_github_dennwc_varint",
build_file_proto_mode = "disable_global",
importpath = "github.com/dennwc/varint",
sum = "h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE=",
version = "v1.0.0",
)
go_repository(
name = "com_github_denverdino_aliyungo",
build_file_proto_mode = "disable_global",
importpath = "github.com/denverdino/aliyungo",
sum = "h1:p6poVbjHDkKa+wtC8frBMwQtT3BmqGYBjzMwJ63tuR4=",
version = "v0.0.0-20190125010748-a747050bb1ba",
)
go_repository(
name = "com_github_derision_test_glock",
build_file_proto_mode = "disable_global",
importpath = "github.com/derision-test/glock",
sum = "h1:b6sViZG+Cm6QtdpqbfWEjaBVbzNPntIS4GzsxpS+CmM=",
version = "v1.0.0",
)
go_repository(
name = "com_github_derision_test_go_mockgen_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/derision-test/go-mockgen/v2",
replace = "github.com/strum355/go-mockgen/v2",
sum = "h1:HT7S36ajdunj9LQLfLKfXNvjpWtvohn3xKzOwuo5OUc=",
version = "v2.0.0-20240306201845-b2e8d553a343",
)
go_repository(
name = "com_github_dghubble_go_twitter",
build_file_proto_mode = "disable_global",
importpath = "github.com/dghubble/go-twitter",
sum = "h1:XQu6o3AwJx/jsg9LZ41uIeUdXK5be099XFfFn6H9ikk=",
version = "v0.0.0-20221104224141-912508c3888b",
)
go_repository(
name = "com_github_dghubble_gologin_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/dghubble/gologin/v2",
sum = "h1:Ga0dxZ2C/8MrMtC0qFLIg1K7cVjZQWSbTj/MIgFqMAg=",
version = "v2.4.0",
)
go_repository(
name = "com_github_dghubble_oauth1",
build_file_proto_mode = "disable_global",
importpath = "github.com/dghubble/oauth1",
sum = "h1:pwcinOZy8z6XkNxvPmUDY52M7RDPxt0Xw1zgZ6Cl5JA=",
version = "v0.7.2",
)
go_repository(
name = "com_github_dghubble_sling",
build_file_proto_mode = "disable_global",
importpath = "github.com/dghubble/sling",
sum = "h1:AxjTubpVyozMvbBCtXcsWEyGGgUZutC5YGrfxPNVOcQ=",
version = "v1.4.1",
)
go_repository(
name = "com_github_dgrijalva_jwt_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/dgrijalva/jwt-go",
sum = "h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=",
version = "v3.2.0+incompatible",
)
go_repository(
name = "com_github_dgryski_go_rendezvous",
build_file_proto_mode = "disable_global",
importpath = "github.com/dgryski/go-rendezvous",
sum = "h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=",
version = "v0.0.0-20200823014737-9f7001d12a5f",
)
go_repository(
name = "com_github_dgryski_go_sip13",
build_file_proto_mode = "disable_global",
importpath = "github.com/dgryski/go-sip13",
sum = "h1:9cOfvEwjQxdwKuNDTQSaMKNRvwKwgZG+U4HrjeRKHso=",
version = "v0.0.0-20200911182023-62edffca9245",
)
go_repository(
name = "com_github_dgryski_trifles",
build_file_proto_mode = "disable_global",
importpath = "github.com/dgryski/trifles",
sum = "h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g=",
version = "v0.0.0-20200323201526-dd97f9abfb48",
)
2023-01-31 18:02:34 +00:00
go_repository(
name = "com_github_di_wu_parser",
build_file_proto_mode = "disable_global",
importpath = "github.com/di-wu/parser",
sum = "h1:I9oHJ8spBXOeL7Wps0ffkFFFiXJf/pk7NX9lcAMqRMU=",
version = "v0.2.2",
)
go_repository(
name = "com_github_di_wu_xsd_datetime",
build_file_proto_mode = "disable_global",
importpath = "github.com/di-wu/xsd-datetime",
sum = "h1:vZoGNkbzpBNoc+JyfVLEbutNDNydYV8XwHeV7eUJoxI=",
version = "v1.0.0",
)
go_repository(
name = "com_github_digitalocean_godo",
build_file_proto_mode = "disable_global",
importpath = "github.com/digitalocean/godo",
sum = "h1:SAEdw63xOMmzlwCeCWjLH1GcyDPUjbSAR1Bh7VELxzc=",
version = "v1.88.0",
)
go_repository(
name = "com_github_dimchansky_utfbom",
build_file_proto_mode = "disable_global",
importpath = "github.com/dimchansky/utfbom",
sum = "h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U=",
version = "v1.1.1",
)
go_repository(
name = "com_github_distribution_distribution_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/distribution/distribution/v3",
sum = "h1:ou+y/Ko923eBli6zJ/TeB2iH38PmytV2UkHJnVdaPtU=",
version = "v3.0.0-20220128175647-b60926597a1b",
)
go_repository(
name = "com_github_distribution_reference",
build_file_proto_mode = "disable_global",
importpath = "github.com/distribution/reference",
sum = "h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=",
version = "v0.5.0",
)
go_repository(
name = "com_github_djherbis_buffer",
build_file_proto_mode = "disable_global",
importpath = "github.com/djherbis/buffer",
sum = "h1:PH5Dd2ss0C7CRRhQCZ2u7MssF+No9ide8Ye71nPHcrQ=",
version = "v1.2.0",
)
go_repository(
name = "com_github_djherbis_nio_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/djherbis/nio/v3",
sum = "h1:6wxhnuppteMa6RHA4L81Dq7ThkZH8SwnDzXDYy95vB4=",
version = "v3.0.1",
)
go_repository(
name = "com_github_dlclark_regexp2",
build_file_proto_mode = "disable_global",
importpath = "github.com/dlclark/regexp2",
sum = "h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0=",
version = "v1.10.0",
)
go_repository(
name = "com_github_dnaeon_go_vcr",
build_file_proto_mode = "disable_global",
importpath = "github.com/dnaeon/go-vcr",
sum = "h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI=",
version = "v1.2.0",
)
go_repository(
name = "com_github_docker_cli",
build_file_proto_mode = "disable_global",
importpath = "github.com/docker/cli",
sum = "h1:6GEdvxwEA451/+Y3GtqIGn/MNjujQazUlxC6uGu8Tog=",
version = "v25.0.2+incompatible",
)
go_repository(
name = "com_github_docker_distribution",
build_file_proto_mode = "disable_global",
importpath = "github.com/docker/distribution",
sum = "h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=",
version = "v2.8.3+incompatible",
)
go_repository(
name = "com_github_docker_docker",
build_file_proto_mode = "disable_global",
importpath = "github.com/docker/docker",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:yGVmKUFGgcxA6PXWAokO0sQL22BrQ67cgVjko8tGdXE=",
version = "v26.0.2+incompatible",
)
go_repository(
name = "com_github_docker_docker_credential_helpers",
build_file_proto_mode = "disable_global",
importpath = "github.com/docker/docker-credential-helpers",
sum = "h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo=",
version = "v0.8.1",
)
go_repository(
name = "com_github_docker_go_connections",
build_file_proto_mode = "disable_global",
importpath = "github.com/docker/go-connections",
sum = "h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=",
version = "v0.5.0",
)
go_repository(
name = "com_github_docker_go_events",
build_file_proto_mode = "disable_global",
importpath = "github.com/docker/go-events",
sum = "h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8=",
version = "v0.0.0-20190806004212-e31b211e4f1c",
)
go_repository(
name = "com_github_docker_go_metrics",
build_file_proto_mode = "disable_global",
importpath = "github.com/docker/go-metrics",
sum = "h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8=",
version = "v0.0.1",
)
go_repository(
name = "com_github_docker_go_units",
build_file_proto_mode = "disable_global",
importpath = "github.com/docker/go-units",
sum = "h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=",
version = "v0.5.0",
)
go_repository(
name = "com_github_docker_libtrust",
build_file_proto_mode = "disable_global",
importpath = "github.com/docker/libtrust",
sum = "h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4=",
version = "v0.0.0-20150114040149-fa567046d9b1",
)
go_repository(
name = "com_github_docopt_docopt_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/docopt/docopt-go",
sum = "h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ=",
version = "v0.0.0-20180111231733-ee0de3bc6815",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "com_github_dominodatalab_os_release",
build_file_proto_mode = "disable_global",
importpath = "github.com/dominodatalab/os-release",
sum = "h1:oEt43goQgsL1DzoOyQ/UZHQw7t9TqwyJec9W0vh0wfE=",
version = "v0.0.0-20190522011736-bcdb4a3e3c2f",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "com_github_dop251_goja",
build_file_proto_mode = "disable_global",
importpath = "github.com/dop251/goja",
sum = "h1:wi6jN5LVt/ljaBG4ue79Ekzb12QfJ52L9Q98tl8SWhw=",
version = "v0.0.0-20231027120936-b396bb4c349d",
)
go_repository(
name = "com_github_dop251_goja_nodejs",
build_file_proto_mode = "disable_global",
importpath = "github.com/dop251/goja_nodejs",
sum = "h1:W1n4DvpzZGOISgp7wWNtraLcHtnmnTwBlJidqtMIuwQ=",
version = "v0.0.0-20211022123610-8dd9abb0616d",
)
go_repository(
name = "com_github_dsoprea_go_exif_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/dsoprea/go-exif/v3",
sum = "h1:/IE4iW7gvY7BablV1XY0unqhMv26EYpOquVMwoBo/wc=",
version = "v3.0.1",
)
go_repository(
name = "com_github_dsoprea_go_logging",
build_file_proto_mode = "disable_global",
importpath = "github.com/dsoprea/go-logging",
sum = "h1:l+vLbuxptsC6VQyQsfD7NnEC8BZuFpz45PgY+pH8YTg=",
version = "v0.0.0-20200710184922-b02d349568dd",
)
go_repository(
name = "com_github_dsoprea_go_png_image_structure_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/dsoprea/go-png-image-structure/v2",
sum = "h1:2zNIgrJTspLxUKoJGl0Ln24+hufPKSjP3cu4++5MeSE=",
version = "v2.0.0-20210512210324-29b889a6093d",
)
go_repository(
name = "com_github_dsoprea_go_utility_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/dsoprea/go-utility/v2",
sum = "h1:DilThiXje0z+3UQ5YjYiSRRzVdtamFpvBQXKwMglWqw=",
version = "v2.0.0-20221003172846-a3e1774ef349",
)
go_repository(
name = "com_github_dustin_go_humanize",
build_file_proto_mode = "disable_global",
importpath = "github.com/dustin/go-humanize",
Batch Changes support for Perforce (#52127) # Add Batch Changes support for Perforce # Test plan ## Local dev setup Launch SG with Batch Changes enabled by running `sg start batches` ## Site Configuration <img width="845" alt="enable Batch Changes and disable sub-repo permissions" src="https://github.com/sourcegraph/sourcegraph/assets/129280/533e8299-dbc2-4d6d-9ae1-f186ca4625e7"> In Site Configuration, add `"batchChanges.enablePerforce": true` to `experimentalFeatures` and disable `subRepoPermissions`. Currently, Batch Changes does not work on Perforce when `subRepoPermissions` is enabled. ## Add Perforce code host(s) If you already have some, no need to add more, but you'll need at least one Perforce code host for this exercise! ## Add Batch Changes credentials for the code host <img width="864" alt="add Batch Changes credentials for the code host" src="https://github.com/sourcegraph/sourcegraph/assets/129280/78c5fb5b-b3a0-4869-a73f-b67196ba1ba9"> In Batch Changes --> Settings, click the green Add Credentials button, enter a username and ticket for a Perforce user who is allowed to shelve changelists on the code host ## Create a new batch change <img width="627" alt="create batch change" src="https://github.com/sourcegraph/sourcegraph/assets/129280/43587040-4cd0-44ea-acac-4a4c79b00cfd"> Click the Batch Changes tab at the top of the window, then the big blue `Create batch change` button. Give it a fancy name <img width="1247" alt="batch change spec" src="https://github.com/sourcegraph/sourcegraph/assets/129280/947be557-f903-4537-8830-7bee27fb43e7"> Complete the batch spec, making sure to specify your repo and file(s) found in there. Click the big green `Preview workspaces` button and make sure it's finding what you expect. <img width="1073" alt="batch change preview" src="https://github.com/sourcegraph/sourcegraph/assets/129280/7b74b48f-45c8-4a38-852d-d1a57777f1e1"> In the preview page, click the green `Preview` button to proceed. <img width="1071" alt="batch change apply page" src="https://github.com/sourcegraph/sourcegraph/assets/129280/c6d93cdb-527c-432f-84f3-80460448ba88"> Choose `Publish on apply` for the `Select action on apply`, then click `Apply` and `OK` on the confirmation dialog, then after a bit, you'll see the batch change status page, showing the changelist id of the shelved changelist. <img width="832" alt="batch change status" src="https://github.com/sourcegraph/sourcegraph/assets/129280/02d4cbf2-592d-4b99-9e1f-c260d907b145"> --------- Co-authored-by: Idan Varsano <varsanojidan@gmail.com>
2023-06-20 23:12:58 +00:00
sum = "h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=",
version = "v1.0.1",
)
go_repository(
name = "com_github_edsrzf_mmap_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/edsrzf/mmap-go",
sum = "h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ=",
version = "v1.1.0",
)
go_repository(
name = "com_github_eknkc_amber",
build_file_proto_mode = "disable_global",
importpath = "github.com/eknkc/amber",
sum = "h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o=",
version = "v0.0.0-20171010120322-cdade1c07385",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_elastic_go_sysinfo",
build_file_proto_mode = "disable_global",
importpath = "github.com/elastic/go-sysinfo",
sum = "h1:mcm4OSYVMyws6+n2HIVMGkln5HOpo5Ie1ZmbbNn0jg4=",
version = "v1.11.2",
)
go_repository(
name = "com_github_elastic_go_windows",
build_file_proto_mode = "disable_global",
importpath = "github.com/elastic/go-windows",
sum = "h1:AlYZOldA+UJ0/2nBuqWdo90GFCgG9xuyw9SYzGUtJm0=",
version = "v1.0.1",
)
go_repository(
name = "com_github_elazarl_goproxy",
build_file_proto_mode = "disable_global",
importpath = "github.com/elazarl/goproxy",
sum = "h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU=",
version = "v0.0.0-20230808193330-2592e75ae04a",
)
2023-01-31 18:02:34 +00:00
go_repository(
name = "com_github_elimity_com_scim",
build_file_proto_mode = "disable_global",
importpath = "github.com/elimity-com/scim",
sum = "h1:6fUaAaX4Xe07LhVrHNmpfnlU41Nsto4skz4vhVqGwYk=",
version = "v0.0.0-20220121082953-15165b1a61c8",
)
go_repository(
name = "com_github_emicklei_go_restful",
build_file_proto_mode = "disable_global",
importpath = "github.com/emicklei/go-restful",
sum = "h1:H2pdYOb3KQ1/YsqVWoWNLQO+fusocsw354rqGTZtAgw=",
version = "v0.0.0-20170410110728-ff4f55a20633",
)
go_repository(
name = "com_github_emicklei_go_restful_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/emicklei/go-restful/v3",
sum = "h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=",
version = "v3.11.0",
)
go_repository(
name = "com_github_emicklei_proto",
build_file_proto_mode = "disable_global",
importpath = "github.com/emicklei/proto",
sum = "h1:XbpwxmuOPrdES97FrSfpyy67SSCV/wBIKXqgJzh6hNw=",
version = "v1.6.15",
)
go_repository(
name = "com_github_emirpasic_gods",
build_file_proto_mode = "disable_global",
importpath = "github.com/emirpasic/gods",
sum = "h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=",
version = "v1.18.1",
)
go_repository(
name = "com_github_envoyproxy_go_control_plane",
build_file_proto_mode = "disable_global",
importpath = "github.com/envoyproxy/go-control-plane",
sum = "h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI=",
version = "v0.12.0",
)
go_repository(
name = "com_github_envoyproxy_protoc_gen_validate",
build_file_proto_mode = "disable_global",
importpath = "github.com/envoyproxy/protoc-gen-validate",
sum = "h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A=",
version = "v1.0.4",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "com_github_ericpauley_go_quantize",
build_file_proto_mode = "disable_global",
importpath = "github.com/ericpauley/go-quantize",
sum = "h1:BBade+JlV/f7JstZ4pitd4tHhpN+w+6I+LyOS7B4fyU=",
version = "v0.0.0-20200331213906-ae555eb2afa4",
)
go_repository(
name = "com_github_erikgeiser_coninput",
build_file_proto_mode = "disable_global",
importpath = "github.com/erikgeiser/coninput",
sum = "h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4=",
version = "v0.0.0-20211004153227-1c3628e74d0f",
)
go_repository(
name = "com_github_evanphx_json_patch",
build_file_proto_mode = "disable_global",
importpath = "github.com/evanphx/json-patch",
sum = "h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U=",
version = "v5.6.0+incompatible",
)
go_repository(
name = "com_github_evanphx_json_patch_v5",
build_file_proto_mode = "disable_global",
importpath = "github.com/evanphx/json-patch/v5",
sum = "h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro=",
version = "v5.8.0",
)
go_repository(
name = "com_github_facebookgo_clock",
build_file_proto_mode = "disable_global",
importpath = "github.com/facebookgo/clock",
sum = "h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw=",
version = "v0.0.0-20150410010913-600d898af40a",
)
go_repository(
name = "com_github_facebookgo_ensure",
build_file_proto_mode = "disable_global",
importpath = "github.com/facebookgo/ensure",
sum = "h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0=",
version = "v0.0.0-20200202191622-63f1cf65ac4c",
)
go_repository(
name = "com_github_facebookgo_limitgroup",
build_file_proto_mode = "disable_global",
importpath = "github.com/facebookgo/limitgroup",
sum = "h1:IeaD1VDVBPlx3viJT9Md8if8IxxJnO+x0JCGb054heg=",
version = "v0.0.0-20150612190941-6abd8d71ec01",
)
go_repository(
name = "com_github_facebookgo_muster",
build_file_proto_mode = "disable_global",
importpath = "github.com/facebookgo/muster",
sum = "h1:a4DFiKFJiDRGFD1qIcqGLX/WlUMD9dyLSLDt+9QZgt8=",
version = "v0.0.0-20150708232844-fd3d7953fd52",
)
go_repository(
name = "com_github_facebookgo_stack",
build_file_proto_mode = "disable_global",
importpath = "github.com/facebookgo/stack",
sum = "h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A=",
version = "v0.0.0-20160209184415-751773369052",
)
go_repository(
name = "com_github_facebookgo_subset",
build_file_proto_mode = "disable_global",
importpath = "github.com/facebookgo/subset",
sum = "h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk=",
version = "v0.0.0-20200203212716-c811ad88dec4",
)
go_repository(
name = "com_github_fatih_color",
build_file_proto_mode = "disable_global",
importpath = "github.com/fatih/color",
sum = "h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=",
version = "v1.17.0",
)
go_repository(
name = "com_github_fatih_structs",
build_file_proto_mode = "disable_global",
importpath = "github.com/fatih/structs",
sum = "h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=",
version = "v1.1.0",
)
go_repository(
name = "com_github_felixge_fgprof",
build_file_proto_mode = "disable_global",
importpath = "github.com/felixge/fgprof",
sum = "h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g=",
version = "v0.9.3",
)
go_repository(
name = "com_github_felixge_httpsnoop",
build_file_proto_mode = "disable_global",
importpath = "github.com/felixge/httpsnoop",
sum = "h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=",
version = "v1.0.4",
)
go_repository(
name = "com_github_flosch_pongo2_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/flosch/pongo2/v4",
sum = "h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw=",
version = "v4.0.2",
)
go_repository(
name = "com_github_fogleman_gg",
build_file_proto_mode = "disable_global",
importpath = "github.com/fogleman/gg",
sum = "h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8=",
version = "v1.3.0",
)
go_repository(
name = "com_github_form3tech_oss_jwt_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/form3tech-oss/jwt-go",
sum = "h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk=",
version = "v3.2.2+incompatible",
)
go_repository(
name = "com_github_frankban_quicktest",
build_file_proto_mode = "disable_global",
importpath = "github.com/frankban/quicktest",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=",
version = "v1.14.6",
)
go_repository(
name = "com_github_fsnotify_fsnotify",
build_file_proto_mode = "disable_global",
importpath = "github.com/fsnotify/fsnotify",
2024-05-01 12:57:34 +00:00
sum = "h1:5ZeiG5gIjLqPKLl+f5zv++9ZO2oxA6hmZ3e7G0mMW1M=",
version = "v1.7.1-0.20240403050945-7086bea086b7",
)
go_repository(
name = "com_github_fullstorydev_grpcui",
build_file_proto_mode = "disable_global",
importpath = "github.com/fullstorydev/grpcui",
sum = "h1:lVXozTNkJJouBL+wpmvxMnltiwYp8mgyd0TRs93i6Rw=",
version = "v1.3.1",
)
go_repository(
name = "com_github_fullstorydev_grpcurl",
build_file_proto_mode = "disable_global",
importpath = "github.com/fullstorydev/grpcurl",
sum = "h1:xJWosq3BQovQ4QrdPO72OrPiWuGgEsxY8ldYsJbPrqI=",
version = "v1.8.7",
)
go_repository(
name = "com_github_garyburd_redigo",
build_file_proto_mode = "disable_global",
importpath = "github.com/garyburd/redigo",
sum = "h1:Sk0u0gIncQaQD23zAoAZs2DNi2u2l5UTLi4CmCBL5v8=",
version = "v1.1.1-0.20170914051019-70e1b1943d4f",
)
go_repository(
name = "com_github_gen2brain_beeep",
build_file_proto_mode = "disable_global",
importpath = "github.com/gen2brain/beeep",
sum = "h1:Xh9mvwEmhbdXlRSsgn+N0zj/NqnKvpeqL08oKDHln2s=",
version = "v0.0.0-20210529141713-5586760f0cc1",
)
go_repository(
name = "com_github_getsentry_sentry_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/getsentry/sentry-go",
sum = "h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k=",
version = "v0.28.1",
)
go_repository(
name = "com_github_gfleury_go_bitbucket_v1",
build_file_proto_mode = "disable_global",
importpath = "github.com/gfleury/go-bitbucket-v1",
sum = "h1:Ea58sAu8LX/NS7z3aeL+YX/7+FSd9jsxq6Ecpz7QEDM=",
version = "v0.0.0-20230626192437-8d7be5866751",
)
go_repository(
name = "com_github_ghodss_yaml",
build_file_proto_mode = "disable_global",
importpath = "github.com/ghodss/yaml",
replace = "github.com/sourcegraph/yaml",
sum = "h1:z/MpntplPaW6QW95pzcAR/72Z5TWDyDnSo0EOcyij9o=",
version = "v1.0.1-0.20200714132230-56936252f152",
)
go_repository(
name = "com_github_gin_contrib_sse",
build_file_proto_mode = "disable_global",
importpath = "github.com/gin-contrib/sse",
sum = "h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=",
version = "v0.1.0",
)
go_repository(
name = "com_github_gin_gonic_gin",
build_file_proto_mode = "disable_global",
importpath = "github.com/gin-gonic/gin",
sum = "h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8=",
version = "v1.8.1",
)
go_repository(
name = "com_github_gitchander_permutation",
build_file_proto_mode = "disable_global",
importpath = "github.com/gitchander/permutation",
sum = "h1:FUKJibWQu771xr/AwLn2/PbVp9AsgqfkObByTf8kJnI=",
version = "v0.0.0-20210517125447-a5d73722e1b1",
)
go_repository(
name = "com_github_gliderlabs_ssh",
build_file_proto_mode = "disable_global",
importpath = "github.com/gliderlabs/ssh",
sum = "h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=",
version = "v0.3.5",
)
go_repository(
name = "com_github_go_chi_chi_v5",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-chi/chi/v5",
sum = "h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk=",
version = "v5.0.10",
)
go_repository(
name = "com_github_go_enry_go_enry_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-enry/go-enry/v2",
sum = "h1:EhfxWpw4DQ3WEFB1Y77X8vKqZL0D0EDUUWYDUAIv9/4=",
version = "v2.8.8",
)
go_repository(
name = "com_github_go_enry_go_oniguruma",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-enry/go-oniguruma",
sum = "h1:k8aAMuJfMrqm/56SG2lV9Cfti6tC4x8673aHCcBk+eo=",
version = "v1.2.1",
)
go_repository(
name = "com_github_go_errors_errors",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-errors/errors",
2024-05-01 12:57:34 +00:00
sum = "h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk=",
version = "v1.5.1",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_go_faster_city",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-faster/city",
sum = "h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw=",
version = "v1.0.1",
)
go_repository(
name = "com_github_go_faster_errors",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-faster/errors",
sum = "h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI=",
version = "v0.6.1",
)
go_repository(
name = "com_github_go_fonts_dejavu",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-fonts/dejavu",
sum = "h1:JSajPXURYqpr+Cu8U9bt8K+XcACIHWqWrvWCKyeFmVQ=",
version = "v0.1.0",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "com_github_go_fonts_latin_modern",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-fonts/latin-modern",
sum = "h1:/cT8A7uavYKvglYXvrdDw4oS5ZLkcOU22fa2HJ1/JVM=",
version = "v0.3.1",
)
go_repository(
name = "com_github_go_fonts_liberation",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-fonts/liberation",
sum = "h1:XuwG0vGHFBPRRI8Qwbi5tIvR3cku9LUfZGq/Ar16wlQ=",
version = "v0.3.2",
)
go_repository(
name = "com_github_go_fonts_stix",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-fonts/stix",
sum = "h1:UlZlgrvvmT/58o573ot7NFw0vZasZ5I6bcIft/oMdgg=",
version = "v0.1.0",
)
go_repository(
name = "com_github_go_git_gcfg",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-git/gcfg",
sum = "h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=",
version = "v1.5.1-0.20230307220236-3a3c6141e376",
)
go_repository(
name = "com_github_go_git_go_billy_v5",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-git/go-billy/v5",
sum = "h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU=",
version = "v5.5.0",
)
go_repository(
name = "com_github_go_git_go_git_fixtures_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-git/go-git-fixtures/v4",
sum = "h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=",
version = "v4.3.2-0.20231010084843-55a94097c399",
)
go_repository(
name = "com_github_go_git_go_git_v5",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-git/go-git/v5",
sum = "h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4=",
version = "v5.11.0",
)
go_repository(
name = "com_github_go_gl_glfw",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-gl/glfw",
sum = "h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0=",
version = "v0.0.0-20190409004039-e6da0acd62b1",
)
go_repository(
name = "com_github_go_gl_glfw_v3_3_glfw",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-gl/glfw/v3.3/glfw",
sum = "h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I=",
version = "v0.0.0-20200222043503-6f7a984d4dc4",
)
go_repository(
name = "com_github_go_json_experiment_json",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-json-experiment/json",
sum = "h1:ymLjT4f35nQbASLnvxEde4XOBL+Sn7rFuV+FOJqkljg=",
version = "v0.0.0-20231102232822-2e55bd4e08b0",
)
go_repository(
name = "com_github_go_kit_kit",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-kit/kit",
sum = "h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo=",
version = "v0.10.0",
)
go_repository(
name = "com_github_go_kit_log",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-kit/log",
sum = "h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU=",
version = "v0.2.1",
)
go_repository(
name = "com_github_go_latex_latex",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-latex/latex",
sum = "h1:DfZQkvEbdmOe+JK2TMtBM+0I9GSdzE2y/L1/AmD8xKc=",
version = "v0.0.0-20231108140139-5c1ce85aa4ea",
)
go_repository(
name = "com_github_go_ldap_ldap",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-ldap/ldap",
sum = "h1:kD5HQcAzlQ7yrhfn+h+MSABeAy/jAJhvIJ/QDllP44g=",
version = "v3.0.2+incompatible",
)
go_repository(
name = "com_github_go_logfmt_logfmt",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-logfmt/logfmt",
sum = "h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA=",
version = "v0.5.1",
)
go_repository(
name = "com_github_go_logr_logr",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-logr/logr",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=",
version = "v1.4.2",
)
go_repository(
name = "com_github_go_logr_stdr",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-logr/stdr",
sum = "h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=",
version = "v1.2.2",
)
go_repository(
name = "com_github_go_logr_zapr",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-logr/zapr",
sum = "h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ=",
version = "v1.3.0",
)
go_repository(
name = "com_github_go_martini_martini",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-martini/martini",
sum = "h1:xveKWz2iaueeTaUgdetzel+U7exyigDYBryyVfV/rZk=",
version = "v0.0.0-20170121215854-22fa46961aab",
)
go_repository(
name = "com_github_go_ole_go_ole",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-ole/go-ole",
sum = "h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=",
version = "v1.2.6",
)
go_repository(
name = "com_github_go_openapi_analysis",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-openapi/analysis",
sum = "h1:ZBmNoP2h5omLKr/srIC9bfqrUGzT6g6gNv03HE9Vpj0=",
version = "v0.22.2",
)
go_repository(
name = "com_github_go_openapi_errors",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-openapi/errors",
sum = "h1:FhChC/duCnfoLj1gZ0BgaBmzhJC2SL/sJr8a2vAobSY=",
version = "v0.21.0",
)
go_repository(
name = "com_github_go_openapi_jsonpointer",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-openapi/jsonpointer",
sum = "h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q=",
version = "v0.20.2",
)
go_repository(
name = "com_github_go_openapi_jsonreference",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-openapi/jsonreference",
sum = "h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU=",
version = "v0.20.4",
)
go_repository(
name = "com_github_go_openapi_loads",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-openapi/loads",
sum = "h1:jDzF4dSoHw6ZFADCGltDb2lE4F6De7aWSpe+IcsRzT0=",
version = "v0.21.5",
)
go_repository(
name = "com_github_go_openapi_runtime",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-openapi/runtime",
sum = "h1:ae53yaOoh+fx/X5Eaq8cRmavHgDma65XPZuvBqvJYto=",
version = "v0.27.1",
)
go_repository(
name = "com_github_go_openapi_spec",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-openapi/spec",
sum = "h1:7CBlRnw+mtjFGlPDRZmAMnq35cRzI91xj03HVyUi/Do=",
version = "v0.20.14",
)
go_repository(
name = "com_github_go_openapi_strfmt",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-openapi/strfmt",
sum = "h1:Ew9PnEYc246TwrEspvBdDHS4BVKXy/AOVsfqGDgAcaI=",
version = "v0.22.0",
)
go_repository(
name = "com_github_go_openapi_swag",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-openapi/swag",
sum = "h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE=",
version = "v0.22.9",
)
go_repository(
name = "com_github_go_openapi_validate",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-openapi/validate",
sum = "h1:2l7PJLzCis4YUGEoW6eoQw3WhyM65WSIcjX6SQnlfDw=",
version = "v0.23.0",
)
go_repository(
name = "com_github_go_pdf_fpdf",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-pdf/fpdf",
sum = "h1:PPvSaUuo1iMi9KkaAn90NuKi+P4gwMedWPHhj8YlJQw=",
version = "v0.9.0",
)
go_repository(
name = "com_github_go_playground_locales",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-playground/locales",
sum = "h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU=",
version = "v0.14.0",
)
go_repository(
name = "com_github_go_playground_universal_translator",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-playground/universal-translator",
sum = "h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho=",
version = "v0.18.0",
)
go_repository(
name = "com_github_go_playground_validator_v10",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-playground/validator/v10",
sum = "h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ=",
version = "v10.11.1",
)
go_repository(
name = "com_github_go_redis_redis",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-redis/redis",
sum = "h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=",
version = "v6.15.9+incompatible",
)
go_repository(
name = "com_github_go_redis_redis_v7",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-redis/redis/v7",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:PASvf36gyUpr2zdOUS/9Zqc80GbM+9BDyiJSJDDOrTI=",
version = "v7.4.1",
)
go_repository(
name = "com_github_go_redis_redis_v8",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-redis/redis/v8",
sum = "h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=",
version = "v8.11.5",
)
go_repository(
name = "com_github_go_redsync_redsync_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-redsync/redsync/v4",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:49X6GJfnbLGaIpBBREM/zA4uIMDXKAh1NDkvQ1EkZKA=",
version = "v4.13.0",
)
go_repository(
name = "com_github_go_resty_resty_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-resty/resty/v2",
sum = "h1:JVrqSeQfdhYRFk24TvhTZWU0q8lfCojxZQFi3Ou7+uY=",
version = "v2.1.1-0.20191201195748-d7b97669fe48",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "com_github_go_sourcemap_sourcemap",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-sourcemap/sourcemap",
sum = "h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU=",
version = "v2.1.3+incompatible",
)
go_repository(
name = "com_github_go_sql_driver_mysql",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-sql-driver/mysql",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=",
version = "v1.8.1",
)
go_repository(
name = "com_github_go_stack_stack",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-stack/stack",
sum = "h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=",
version = "v1.8.1",
)
go_repository(
name = "com_github_go_task_slim_sprig",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-task/slim-sprig",
Batch Changes support for Perforce (#52127) # Add Batch Changes support for Perforce # Test plan ## Local dev setup Launch SG with Batch Changes enabled by running `sg start batches` ## Site Configuration <img width="845" alt="enable Batch Changes and disable sub-repo permissions" src="https://github.com/sourcegraph/sourcegraph/assets/129280/533e8299-dbc2-4d6d-9ae1-f186ca4625e7"> In Site Configuration, add `"batchChanges.enablePerforce": true` to `experimentalFeatures` and disable `subRepoPermissions`. Currently, Batch Changes does not work on Perforce when `subRepoPermissions` is enabled. ## Add Perforce code host(s) If you already have some, no need to add more, but you'll need at least one Perforce code host for this exercise! ## Add Batch Changes credentials for the code host <img width="864" alt="add Batch Changes credentials for the code host" src="https://github.com/sourcegraph/sourcegraph/assets/129280/78c5fb5b-b3a0-4869-a73f-b67196ba1ba9"> In Batch Changes --> Settings, click the green Add Credentials button, enter a username and ticket for a Perforce user who is allowed to shelve changelists on the code host ## Create a new batch change <img width="627" alt="create batch change" src="https://github.com/sourcegraph/sourcegraph/assets/129280/43587040-4cd0-44ea-acac-4a4c79b00cfd"> Click the Batch Changes tab at the top of the window, then the big blue `Create batch change` button. Give it a fancy name <img width="1247" alt="batch change spec" src="https://github.com/sourcegraph/sourcegraph/assets/129280/947be557-f903-4537-8830-7bee27fb43e7"> Complete the batch spec, making sure to specify your repo and file(s) found in there. Click the big green `Preview workspaces` button and make sure it's finding what you expect. <img width="1073" alt="batch change preview" src="https://github.com/sourcegraph/sourcegraph/assets/129280/7b74b48f-45c8-4a38-852d-d1a57777f1e1"> In the preview page, click the green `Preview` button to proceed. <img width="1071" alt="batch change apply page" src="https://github.com/sourcegraph/sourcegraph/assets/129280/c6d93cdb-527c-432f-84f3-80460448ba88"> Choose `Publish on apply` for the `Select action on apply`, then click `Apply` and `OK` on the confirmation dialog, then after a bit, you'll see the batch change status page, showing the changelist id of the shelved changelist. <img width="832" alt="batch change status" src="https://github.com/sourcegraph/sourcegraph/assets/129280/02d4cbf2-592d-4b99-9e1f-c260d907b145"> --------- Co-authored-by: Idan Varsano <varsanojidan@gmail.com>
2023-06-20 23:12:58 +00:00
sum = "h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=",
version = "v0.0.0-20230315185526-52ccab3ef572",
)
go_repository(
name = "com_github_go_test_deep",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-test/deep",
sum = "h1:u2CU3YKy9I2pmu9pX0eq50wCgjfGIt539SqR7FbHiho=",
version = "v1.0.4",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "com_github_go_text_typesetting",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-text/typesetting",
sum = "h1:FQivqchis6bE2/9uF70M2gmmLpe82esEm2QadL0TEJo=",
version = "v0.0.0-20230803102845-24e03d8b5372",
)
go_repository(
name = "com_github_go_toast_toast",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-toast/toast",
sum = "h1:qZNfIGkIANxGv/OqtnntR4DfOY2+BgwR60cAcu/i3SE=",
version = "v0.0.0-20190211030409-01e6764cf0a4",
)
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
go_repository(
name = "com_github_go_viper_mapstructure_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-viper/mapstructure/v2",
sum = "h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc=",
version = "v2.0.0",
)
go_repository(
name = "com_github_go_zookeeper_zk",
build_file_proto_mode = "disable_global",
importpath = "github.com/go-zookeeper/zk",
sum = "h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg=",
version = "v1.0.3",
)
go_repository(
name = "com_github_gobwas_glob",
build_file_proto_mode = "disable_global",
importpath = "github.com/gobwas/glob",
sum = "h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=",
version = "v0.2.3",
)
go_repository(
name = "com_github_gobwas_httphead",
build_file_proto_mode = "disable_global",
importpath = "github.com/gobwas/httphead",
sum = "h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=",
version = "v0.1.0",
)
go_repository(
name = "com_github_gobwas_pool",
build_file_proto_mode = "disable_global",
importpath = "github.com/gobwas/pool",
sum = "h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=",
version = "v0.2.1",
)
go_repository(
name = "com_github_gobwas_ws",
build_file_proto_mode = "disable_global",
importpath = "github.com/gobwas/ws",
2024-05-01 12:57:34 +00:00
sum = "h1:F2aeBZrm2NDsc7vbovKrWSogd4wvfAxg0FQ89/iqOTk=",
version = "v1.2.1",
)
go_repository(
name = "com_github_goccmack_gocc",
build_file_proto_mode = "disable_global",
importpath = "github.com/goccmack/gocc",
sum = "h1:FSii2UQeSLngl3jFoR4tUKZLprO7qUlh/TKKticc0BM=",
version = "v0.0.0-20230228185258-2292f9e40198",
)
go_repository(
name = "com_github_goccy_go_json",
build_file_proto_mode = "disable_global",
importpath = "github.com/goccy/go-json",
requestclient: add country-level geolocation data (#58386) This change adds country-level geolocation data to `requestclient` as discussed [here](https://sourcegraph.slack.com/archives/C01PQEVJ5A9/p1700078374822459?thread_ts=1694717740.084639&cid=C01PQEVJ5A9), provided as a 2- or 3-character ISO 3166-1 country code that seems pretty widely used. The inference strategy goes: 1. If we are behind Cloudflare, we trust [Cloudflare's originating country data](https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#cf-ipcountry) and use it as-is 2. If a `Forwarded-For` exists, we look up the first `(*requestclient.Client).Forwarded-For` address in the embedded IP geolocation database 3. Otherwise, we look up `(*requestclient.Client).IP` in the embedded IP geolocation database WE use [DB-IP.com](https://db-ip.com/)'s ["IP to Country Lite" database](https://db-ip.com/db/download/ip-to-country-lite) which includes only country-level data, is free, and allows redistribution with attribution (see docs included in PR). It clocks in at ~8MB, which seems manageable for embedding. Lookup performance looks okay with a trivial benchmark, and we cache the inferred country code in `*requestclient.Client` so that it only gets evaluated once: ``` goos: darwin goarch: arm64 pkg: github.com/sourcegraph/sourcegraph/internal/requestclient/geolocation BenchmarkInferCountryCode-10 2359490 906.9 ns/op 34 B/op 3 allocs/op ``` This change also adds this new data to request client `LogFields`. https://github.com/sourcegraph/sourcegraph/pull/58388 adds this to telemetry events as well. ## Test plan Unit tests
2023-11-22 22:51:48 +00:00
sum = "h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=",
version = "v0.10.2",
)
go_repository(
name = "com_github_goccy_go_yaml",
build_file_proto_mode = "disable_global",
importpath = "github.com/goccy/go-yaml",
sum = "h1:n7Z+zx8S9f9KgzG6KtQKf+kwqXZlLNR2F6018Dgau54=",
version = "v1.11.0",
)
go_repository(
name = "com_github_godbus_dbus_v5",
build_file_proto_mode = "disable_global",
importpath = "github.com/godbus/dbus/v5",
sum = "h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=",
version = "v5.1.0",
)
go_repository(
name = "com_github_gofiber_fiber_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/gofiber/fiber/v2",
sum = "h1:b0rYH6b06Df+4NyrbdptQL8ifuxw/Tf2DgfkZkDaxEo=",
version = "v2.52.2",
)
go_repository(
name = "com_github_gofrs_flock",
build_file_proto_mode = "disable_global",
importpath = "github.com/gofrs/flock",
sum = "h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=",
version = "v0.8.1",
)
go_repository(
name = "com_github_gofrs_uuid",
build_file_proto_mode = "disable_global",
importpath = "github.com/gofrs/uuid",
sum = "h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA=",
version = "v4.4.0+incompatible",
)
go_repository(
name = "com_github_gofrs_uuid_v5",
build_file_proto_mode = "disable_global",
importpath = "github.com/gofrs/uuid/v5",
sum = "h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M=",
version = "v5.0.0",
)
go_repository(
name = "com_github_gogo_googleapis",
build_file_proto_mode = "disable_global",
importpath = "github.com/gogo/googleapis",
sum = "h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0=",
version = "v1.4.1",
)
go_repository(
name = "com_github_gogo_protobuf",
build_file_proto_mode = "disable_global",
importpath = "github.com/gogo/protobuf",
sum = "h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=",
version = "v1.3.2",
)
go_repository(
name = "com_github_gogo_status",
build_file_proto_mode = "disable_global",
importpath = "github.com/gogo/status",
sum = "h1:+eIkrewn5q6b30y+g/BJINVVdi2xH7je5MPJ3ZPK3JA=",
version = "v1.1.0",
)
go_repository(
name = "com_github_golang_freetype",
build_file_proto_mode = "disable_global",
importpath = "github.com/golang/freetype",
sum = "h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=",
version = "v0.0.0-20170609003504-e2365dfdc4a0",
)
go_repository(
name = "com_github_golang_gddo",
build_file_proto_mode = "disable_global",
importpath = "github.com/golang/gddo",
sum = "h1:16RtHeWGkJMc80Etb8RPCcKevXGldr57+LOyZt8zOlg=",
version = "v0.0.0-20210115222349-20d68f94ee1f",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "com_github_golang_geo",
build_file_proto_mode = "disable_global",
importpath = "github.com/golang/geo",
sum = "h1:HKlyj6in2JV6wVkmQ4XmG/EIm+SCYlPZ+V4GWit7Z+I=",
version = "v0.0.0-20230421003525-6adc56603217",
)
go_repository(
name = "com_github_golang_glog",
build_file_proto_mode = "disable_global",
importpath = "github.com/golang/glog",
sum = "h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4=",
version = "v1.2.1",
)
go_repository(
name = "com_github_golang_groupcache",
build_file_proto_mode = "disable_global",
importpath = "github.com/golang/groupcache",
sum = "h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=",
version = "v0.0.0-20210331224755-41bb18bfe9da",
)
go_repository(
name = "com_github_golang_jwt_jwt_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/golang-jwt/jwt/v4",
sum = "h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=",
version = "v4.5.0",
)
go_repository(
name = "com_github_golang_jwt_jwt_v5",
build_file_proto_mode = "disable_global",
importpath = "github.com/golang-jwt/jwt/v5",
sum = "h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=",
version = "v5.2.1",
)
go_repository(
name = "com_github_golang_lint",
build_file_proto_mode = "disable_global",
importpath = "github.com/golang/lint",
replace = "golang.org/x/lint",
sum = "h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE=",
version = "v0.0.0-20191125180803-fdd1cda4f05f",
)
go_repository(
name = "com_github_golang_mock",
build_file_proto_mode = "disable_global",
importpath = "github.com/golang/mock",
sum = "h1:YojYx61/OLFsiv6Rw1Z96LpldJIy31o+UHmwAUMJ6/U=",
version = "v1.7.0-rc.1",
)
go_repository(
name = "com_github_golang_protobuf",
build_file_proto_mode = "disable_global",
importpath = "github.com/golang/protobuf",
sum = "h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=",
version = "v1.5.4",
)
go_repository(
name = "com_github_golang_snappy",
build_file_proto_mode = "disable_global",
importpath = "github.com/golang/snappy",
sum = "h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=",
version = "v0.0.4",
)
go_repository(
name = "com_github_golang_sql_civil",
build_file_proto_mode = "disable_global",
importpath = "github.com/golang-sql/civil",
sum = "h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA=",
version = "v0.0.0-20220223132316-b832511892a9",
)
go_repository(
name = "com_github_golang_sql_sqlexp",
build_file_proto_mode = "disable_global",
importpath = "github.com/golang-sql/sqlexp",
sum = "h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=",
version = "v0.1.0",
)
go_repository(
name = "com_github_golangplus_bytes",
build_file_proto_mode = "disable_global",
importpath = "github.com/golangplus/bytes",
sum = "h1:YQKBijBVMsBxIiXT4IEhlKR2zHohjEqPole4umyDX+c=",
version = "v1.0.0",
)
go_repository(
name = "com_github_golangplus_fmt",
build_file_proto_mode = "disable_global",
importpath = "github.com/golangplus/fmt",
sum = "h1:FnUKtw86lXIPfBMc3FimNF3+ABcV+aH5F17OOitTN+E=",
version = "v1.0.0",
)
go_repository(
name = "com_github_golangplus_testing",
build_file_proto_mode = "disable_global",
importpath = "github.com/golangplus/testing",
sum = "h1:+ZeeiKZENNOMkTTELoSySazi+XaEhVO0mb+eanrSEUQ=",
version = "v1.0.0",
)
go_repository(
name = "com_github_gomodule_oauth1",
build_file_proto_mode = "disable_global",
importpath = "github.com/gomodule/oauth1",
sum = "h1:/nNHAD99yipOEspQFbAnNmwGTZ1UNXiD/+JLxwx79fo=",
version = "v0.2.0",
)
go_repository(
name = "com_github_gomodule_redigo",
build_file_proto_mode = "disable_global",
importpath = "github.com/gomodule/redigo",
replace = "github.com/gomodule/redigo",
sum = "h1:Sl3u+2BI/kk+VEatbj0scLdrFhjPmbxOc1myhDP41ws=",
version = "v1.8.9",
)
go_repository(
name = "com_github_google_btree",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/btree",
sum = "h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4=",
version = "v1.0.1",
)
go_repository(
name = "com_github_google_cel_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/cel-go",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
patch_args = ["-p1"],
patches = [
# We need to add aliases to the BUILD files for this repo to support
# generated build files that depend on this repo. Our convention
# uses package name as the target, but this repo uses 'go_default_library'
# for everything instead.
"//third_party/com_github_google_cel_go:names.patch",
],
sum = "h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84=",
version = "v0.20.1",
)
go_repository(
name = "com_github_google_flatbuffers",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/flatbuffers",
sum = "h1:M9dgRyhJemaM4Sw8+66GHBu8ioaQmyPLg1b8VwK5WJg=",
version = "v23.5.26+incompatible",
)
go_repository(
name = "com_github_google_gnostic",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/gnostic",
sum = "h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54=",
version = "v0.5.7-v3refs",
)
go_repository(
name = "com_github_google_gnostic_models",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/gnostic-models",
sum = "h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=",
version = "v0.6.8",
)
go_repository(
name = "com_github_google_go_cmp",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/go-cmp",
sum = "h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=",
version = "v0.6.0",
)
go_repository(
name = "com_github_google_go_containerregistry",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/go-containerregistry",
sum = "h1:rUEt426sR6nyrL3gt+18ibRcvYpKYdpsa5ZW7MA08dQ=",
version = "v0.16.1",
)
go_repository(
name = "com_github_google_go_github_v27",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/go-github/v27",
sum = "h1:oiOZuBmGHvrGM1X9uNUAUlLgp5r1UUO/M/KnbHnLRlQ=",
version = "v27.0.6",
)
go_repository(
name = "com_github_google_go_github_v48",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/go-github/v48",
sum = "h1:68puzySE6WqUY9KWmpOsDEQfDZsso98rT6pZcz9HqcE=",
version = "v48.2.0",
)
go_repository(
name = "com_github_google_go_github_v55",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/go-github/v55",
sum = "h1:4pp/1tNMB9X/LuAhs5i0KQAE40NmiR/y6prLNb9x9cg=",
version = "v55.0.0",
)
go_repository(
name = "com_github_google_go_pkcs11",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/go-pkcs11",
dev/msp: add CloudSQL integration (#58420) This PR has 3 major changes: 1. Provisioning a Cloud SQL PostgreSQL instance: `resource.postgreSQL` 2. Updates to the MSP runtime for connecting to the database 3. Publishable `msp-example` for the `msp-testbed` deployment, for testing integrations and other MSP features, and adds an example Gorm setup Closes https://github.com/sourcegraph/sourcegraph/issues/56848. For more context, see go/msp ### `resource.postgreSQL` This change adds `resource.postgreSQL` to the spec for provisioning a Cloud SQL database. Example: ```yaml resources: postgreSQL: databases: ["primary"] cpu: 1 memoryGB: 4 ``` When configured, a Cloud SQL instance is provisioned, and the Cloud Run workload SA is granted access to it. The specified `databases` are also created. `cpu` and `memoryGB` are used to generate the custom VM to provision the instance with. A lot of the base configuration for the database instance are taken directly from what we use in Cloud: https://github.com/sourcegraph/controller/blob/9cac1b1aa0dde038280d424f4d4b6c34ffb22e36/internal/resource/sql/sql.go#L116, and is similar to the Redis setup, in that we need the private peering VPC and install additional certs on the Cloud Run instance. ### MSP runtime `service.Contract` now has a helper, `GetPostgreSQLDB(database)`, for generating the appropriate configuration for creating a connection to a given database and returning a `sql.DB`, which most libraries have adapters for. The helper sets up `pgx.ConnConfig` that uses workload identity to connect directly to Cloud SQL, following the guide here: https://github.com/GoogleCloudPlatform/cloud-sql-go-connector?tab=readme-ov-file#automatic-iam-database-authentication In local dev, `PGDSN` can be used to hardcode an appropriate value. ### `msp-example` I've moved the MSP example from #56846 to the top-level `cmd/msp-example,` and set up some guidance for publishing it. This service now also includes a simple database connection and setup using Gorm, used by https://github.com/sourcegraph/accounts.sourcegraph.com, and can be used for testing, e.g. https://github.com/sourcegraph/managed-services/pull/87 ## Test plan - [x] Deploy https://github.com/sourcegraph/managed-services/pull/87, which will connect to the database and set up some tables - [x] Review diff: https://github.com/sourcegraph/managed-services/actions/runs/6951246277 - [x] Tear down database in https://github.com/sourcegraph/managed-services/pull/87, with caveat: requires state surgery. Should be rare enough (we might prefer to tear down environments entirely) - see docstrings in package `postgresqlroles` --------- Co-authored-by: Michael Lin <mlzc@hey.com> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-11-22 23:32:53 +00:00
sum = "h1:OF1IPgv+F4NmqmJ98KTjdN97Vs1JxDPB3vbmYzV2dpk=",
version = "v0.2.1-0.20230907215043-c6f79328ddf9",
)
go_repository(
name = "com_github_google_go_querystring",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/go-querystring",
sum = "h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=",
version = "v1.1.0",
)
go_repository(
name = "com_github_google_gofuzz",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/gofuzz",
sum = "h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=",
version = "v1.2.0",
)
go_repository(
name = "com_github_google_martian",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/martian",
sum = "h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=",
version = "v2.1.0+incompatible",
)
go_repository(
name = "com_github_google_martian_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/martian/v3",
sum = "h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc=",
version = "v3.3.3",
)
go_repository(
name = "com_github_google_pprof",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/pprof",
sum = "h1:gbpYu9NMq8jhDVbvlGkMFWCjLFlqqEZjEmObmhUy6Vo=",
version = "v0.0.0-20240409012703-83162a5b38cd",
)
go_repository(
name = "com_github_google_renameio",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/renameio",
sum = "h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA=",
version = "v0.1.0",
)
go_repository(
name = "com_github_google_s2a_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/s2a-go",
dev/msp: add CloudSQL integration (#58420) This PR has 3 major changes: 1. Provisioning a Cloud SQL PostgreSQL instance: `resource.postgreSQL` 2. Updates to the MSP runtime for connecting to the database 3. Publishable `msp-example` for the `msp-testbed` deployment, for testing integrations and other MSP features, and adds an example Gorm setup Closes https://github.com/sourcegraph/sourcegraph/issues/56848. For more context, see go/msp ### `resource.postgreSQL` This change adds `resource.postgreSQL` to the spec for provisioning a Cloud SQL database. Example: ```yaml resources: postgreSQL: databases: ["primary"] cpu: 1 memoryGB: 4 ``` When configured, a Cloud SQL instance is provisioned, and the Cloud Run workload SA is granted access to it. The specified `databases` are also created. `cpu` and `memoryGB` are used to generate the custom VM to provision the instance with. A lot of the base configuration for the database instance are taken directly from what we use in Cloud: https://github.com/sourcegraph/controller/blob/9cac1b1aa0dde038280d424f4d4b6c34ffb22e36/internal/resource/sql/sql.go#L116, and is similar to the Redis setup, in that we need the private peering VPC and install additional certs on the Cloud Run instance. ### MSP runtime `service.Contract` now has a helper, `GetPostgreSQLDB(database)`, for generating the appropriate configuration for creating a connection to a given database and returning a `sql.DB`, which most libraries have adapters for. The helper sets up `pgx.ConnConfig` that uses workload identity to connect directly to Cloud SQL, following the guide here: https://github.com/GoogleCloudPlatform/cloud-sql-go-connector?tab=readme-ov-file#automatic-iam-database-authentication In local dev, `PGDSN` can be used to hardcode an appropriate value. ### `msp-example` I've moved the MSP example from #56846 to the top-level `cmd/msp-example,` and set up some guidance for publishing it. This service now also includes a simple database connection and setup using Gorm, used by https://github.com/sourcegraph/accounts.sourcegraph.com, and can be used for testing, e.g. https://github.com/sourcegraph/managed-services/pull/87 ## Test plan - [x] Deploy https://github.com/sourcegraph/managed-services/pull/87, which will connect to the database and set up some tables - [x] Review diff: https://github.com/sourcegraph/managed-services/actions/runs/6951246277 - [x] Tear down database in https://github.com/sourcegraph/managed-services/pull/87, with caveat: requires state surgery. Should be rare enough (we might prefer to tear down environments entirely) - see docstrings in package `postgresqlroles` --------- Co-authored-by: Michael Lin <mlzc@hey.com> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-11-22 23:32:53 +00:00
sum = "h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o=",
version = "v0.1.7",
)
go_repository(
name = "com_github_google_shlex",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/shlex",
sum = "h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=",
version = "v0.0.0-20191202100458-e7afc7fbc510",
)
go_repository(
name = "com_github_google_slothfs",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/slothfs",
sum = "h1:iuModVoTuW2lBUobX9QBgqD+ipHbWKug6n8qkJfDtUE=",
version = "v0.0.0-20190717100203-59c1163fd173",
)
go_repository(
name = "com_github_google_uuid",
build_file_proto_mode = "disable_global",
importpath = "github.com/google/uuid",
sum = "h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=",
version = "v1.6.0",
)
go_repository(
name = "com_github_googleapis_enterprise_certificate_proxy",
build_file_proto_mode = "disable_global",
importpath = "github.com/googleapis/enterprise-certificate-proxy",
dev/msp: add CloudSQL integration (#58420) This PR has 3 major changes: 1. Provisioning a Cloud SQL PostgreSQL instance: `resource.postgreSQL` 2. Updates to the MSP runtime for connecting to the database 3. Publishable `msp-example` for the `msp-testbed` deployment, for testing integrations and other MSP features, and adds an example Gorm setup Closes https://github.com/sourcegraph/sourcegraph/issues/56848. For more context, see go/msp ### `resource.postgreSQL` This change adds `resource.postgreSQL` to the spec for provisioning a Cloud SQL database. Example: ```yaml resources: postgreSQL: databases: ["primary"] cpu: 1 memoryGB: 4 ``` When configured, a Cloud SQL instance is provisioned, and the Cloud Run workload SA is granted access to it. The specified `databases` are also created. `cpu` and `memoryGB` are used to generate the custom VM to provision the instance with. A lot of the base configuration for the database instance are taken directly from what we use in Cloud: https://github.com/sourcegraph/controller/blob/9cac1b1aa0dde038280d424f4d4b6c34ffb22e36/internal/resource/sql/sql.go#L116, and is similar to the Redis setup, in that we need the private peering VPC and install additional certs on the Cloud Run instance. ### MSP runtime `service.Contract` now has a helper, `GetPostgreSQLDB(database)`, for generating the appropriate configuration for creating a connection to a given database and returning a `sql.DB`, which most libraries have adapters for. The helper sets up `pgx.ConnConfig` that uses workload identity to connect directly to Cloud SQL, following the guide here: https://github.com/GoogleCloudPlatform/cloud-sql-go-connector?tab=readme-ov-file#automatic-iam-database-authentication In local dev, `PGDSN` can be used to hardcode an appropriate value. ### `msp-example` I've moved the MSP example from #56846 to the top-level `cmd/msp-example,` and set up some guidance for publishing it. This service now also includes a simple database connection and setup using Gorm, used by https://github.com/sourcegraph/accounts.sourcegraph.com, and can be used for testing, e.g. https://github.com/sourcegraph/managed-services/pull/87 ## Test plan - [x] Deploy https://github.com/sourcegraph/managed-services/pull/87, which will connect to the database and set up some tables - [x] Review diff: https://github.com/sourcegraph/managed-services/actions/runs/6951246277 - [x] Tear down database in https://github.com/sourcegraph/managed-services/pull/87, with caveat: requires state surgery. Should be rare enough (we might prefer to tear down environments entirely) - see docstrings in package `postgresqlroles` --------- Co-authored-by: Michael Lin <mlzc@hey.com> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-11-22 23:32:53 +00:00
sum = "h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs=",
version = "v0.3.2",
)
go_repository(
name = "com_github_googleapis_gax_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/googleapis/gax-go",
sum = "h1:j0GKcs05QVmm7yesiZq2+9cxHkNK9YM6zKx4D2qucQU=",
version = "v2.0.0+incompatible",
)
go_repository(
name = "com_github_googleapis_gax_go_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/googleapis/gax-go/v2",
sum = "h1:9gWcmF85Wvq4ryPFvGFaOgPIs1AQX0d0bcbGw4Z96qg=",
version = "v2.12.4",
)
go_repository(
name = "com_github_googleapis_gnostic",
build_file_proto_mode = "disable_global",
importpath = "github.com/googleapis/gnostic",
replace = "github.com/googleapis/gnostic",
sum = "h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw=",
version = "v0.5.5",
)
go_repository(
name = "com_github_googleapis_go_type_adapters",
build_file_proto_mode = "disable_global",
importpath = "github.com/googleapis/go-type-adapters",
sum = "h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA=",
version = "v1.0.0",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_googleapis_google_cloud_go_testing",
build_file_proto_mode = "disable_global",
importpath = "github.com/googleapis/google-cloud-go-testing",
sum = "h1:zC34cGQu69FG7qzJ3WiKW244WfhDC3xxYMeNOX2gtUQ=",
version = "v0.0.0-20210719221736-1c9a4c676720",
)
go_repository(
name = "com_github_googlecloudplatform_opentelemetry_operations_go_detectors_gcp",
build_file_proto_mode = "disable_global",
importpath = "github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:yRhWveg9NbJcJYoJL4FoSauT2dxnt4N9MIAJ7tvU/mQ=",
version = "v1.23.0",
)
2023-07-20 20:35:16 +00:00
go_repository(
name = "com_github_googlecloudplatform_opentelemetry_operations_go_exporter_metric",
build_file_proto_mode = "disable_global",
importpath = "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:3NFk9VndrMV+XxMOxv9UersPP9FIDxsV6ggF6C1dQqU=",
version = "v0.48.0",
2023-07-20 20:35:16 +00:00
)
go_repository(
name = "com_github_googlecloudplatform_opentelemetry_operations_go_exporter_trace",
build_file_proto_mode = "disable_global",
importpath = "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:TBo1ql03qmVkZzEndpfkS4i9dOgCVvO0rQP7HEth110=",
version = "v1.24.0",
)
go_repository(
name = "com_github_googlecloudplatform_opentelemetry_operations_go_internal_cloudmock",
build_file_proto_mode = "disable_global",
importpath = "github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:3vze4eFE3z2tDy2iSeI7yCQ17L8iLxN4OkXgvTr979s=",
version = "v0.48.0",
)
go_repository(
name = "com_github_googlecloudplatform_opentelemetry_operations_go_internal_resourcemapping",
build_file_proto_mode = "disable_global",
importpath = "github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:ng6QH9Z4bAXCf0Z1cjR5hKESyc1BUiOrfIOhN+nHfRU=",
version = "v0.48.0",
)
go_repository(
name = "com_github_gophercloud_gophercloud",
build_file_proto_mode = "disable_global",
importpath = "github.com/gophercloud/gophercloud",
sum = "h1:9nTGx0jizmHxDobe4mck89FyQHVyA3CaXLIUSGJjP9k=",
version = "v1.0.0",
)
go_repository(
name = "com_github_gopherjs_gopherjs",
build_file_proto_mode = "disable_global",
importpath = "github.com/gopherjs/gopherjs",
2023-01-27 14:30:35 +00:00
sum = "h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g=",
version = "v1.17.2",
)
go_repository(
name = "com_github_gopherjs_gopherwasm",
build_file_proto_mode = "disable_global",
importpath = "github.com/gopherjs/gopherwasm",
sum = "h1:fA2uLoctU5+T3OhOn2vYP0DVT6pxc7xhTlBB1paATqQ=",
version = "v1.1.0",
)
go_repository(
name = "com_github_gordonklaus_ineffassign",
build_file_proto_mode = "disable_global",
importpath = "github.com/gordonklaus/ineffassign",
sum = "h1:vc7Dmrk4JwS0ZPS6WZvWlwDflgDTA26jItmbSj83nug=",
version = "v0.0.0-20200309095847-7953dde2c7bf",
)
go_repository(
name = "com_github_gorilla_context",
build_file_proto_mode = "disable_global",
importpath = "github.com/gorilla/context",
sum = "h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=",
version = "v1.1.1",
)
go_repository(
name = "com_github_gorilla_css",
build_file_proto_mode = "disable_global",
importpath = "github.com/gorilla/css",
sum = "h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=",
version = "v1.0.0",
)
go_repository(
name = "com_github_gorilla_handlers",
build_file_proto_mode = "disable_global",
importpath = "github.com/gorilla/handlers",
sum = "h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=",
version = "v1.5.1",
)
go_repository(
name = "com_github_gorilla_mux",
build_file_proto_mode = "disable_global",
importpath = "github.com/gorilla/mux",
sum = "h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=",
version = "v1.8.0",
)
go_repository(
name = "com_github_gorilla_securecookie",
build_file_proto_mode = "disable_global",
importpath = "github.com/gorilla/securecookie",
sum = "h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=",
version = "v1.1.1",
)
go_repository(
name = "com_github_gorilla_sessions",
build_file_proto_mode = "disable_global",
importpath = "github.com/gorilla/sessions",
sum = "h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI=",
version = "v1.2.1",
)
go_repository(
name = "com_github_gorilla_websocket",
build_file_proto_mode = "disable_global",
importpath = "github.com/gorilla/websocket",
sum = "h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=",
version = "v1.5.0",
)
go_repository(
name = "com_github_gosimple_slug",
build_file_proto_mode = "disable_global",
importpath = "github.com/gosimple/slug",
sum = "h1:xzuhj7G7cGtd34NXnW/yF0l+AGNfWqwgh/IXgFy7dnc=",
version = "v1.12.0",
)
go_repository(
name = "com_github_gosimple_unidecode",
build_file_proto_mode = "disable_global",
importpath = "github.com/gosimple/unidecode",
sum = "h1:hZzFTMMqSswvf0LBJZCZgThIZrpDHFXux9KeGmn6T/o=",
version = "v1.0.1",
)
go_repository(
name = "com_github_goware_urlx",
build_file_proto_mode = "disable_global",
importpath = "github.com/goware/urlx",
sum = "h1:BbvKl8oiXtJAzOzMqAQ0GfIhf96fKeNEZfm9ocNSUBI=",
version = "v0.3.1",
)
go_repository(
name = "com_github_grafana_regexp",
build_file_proto_mode = "disable_global",
importpath = "github.com/grafana/regexp",
sum = "h1:BML5sNe+bw2uO8t8cQSwe5QhvoP04eHPF7bnaQma0Kw=",
version = "v0.0.0-20240607082908-2cb410fa05da",
)
go_repository(
name = "com_github_grafana_tools_sdk",
build_file_proto_mode = "disable_global",
importpath = "github.com/grafana-tools/sdk",
sum = "h1:PXZQA2WCxe85Tnn+WEvr8fDpfwibmEPgfgFEaC87G24=",
version = "v0.0.0-20220919052116-6562121319fc",
)
go_repository(
name = "com_github_graph_gophers_graphql_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/graph-gophers/graphql-go",
sum = "h1:fDqblo50TEpD0LY7RXk/LFVYEVqo3+tXMNMPSVXA1yc=",
version = "v1.5.0",
)
go_repository(
name = "com_github_graphql_go_graphql",
build_file_proto_mode = "disable_global",
importpath = "github.com/graphql-go/graphql",
sum = "h1:p7/Ou/WpmulocJeEx7wjQy611rtXGQaAcXGqanuMMgc=",
version = "v0.8.1",
)
go_repository(
name = "com_github_gregjones_httpcache",
build_file_proto_mode = "disable_global",
importpath = "github.com/gregjones/httpcache",
sum = "h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA=",
version = "v0.0.0-20190611155906-901d90724c79",
)
go_repository(
name = "com_github_grpc_ecosystem_go_grpc_middleware",
build_file_proto_mode = "disable_global",
importpath = "github.com/grpc-ecosystem/go-grpc-middleware",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=",
version = "v1.4.0",
)
go_repository(
name = "com_github_grpc_ecosystem_go_grpc_middleware_providers_prometheus",
build_file_proto_mode = "disable_global",
importpath = "github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus",
sum = "h1:mdLirNAJBxnGgyB6pjZLcs6ue/6eZGBui6gXspfq4ks=",
version = "v1.0.0-rc.0",
)
go_repository(
name = "com_github_grpc_ecosystem_go_grpc_middleware_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/grpc-ecosystem/go-grpc-middleware/v2",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:pRhl55Yx1eC7BZ1N+BBWwnKaMyD8uC+34TLdndZMAKk=",
version = "v2.1.0",
)
go_repository(
name = "com_github_grpc_ecosystem_go_grpc_prometheus",
build_file_proto_mode = "disable_global",
importpath = "github.com/grpc-ecosystem/go-grpc-prometheus",
sum = "h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=",
version = "v1.2.0",
)
go_repository(
name = "com_github_grpc_ecosystem_grpc_gateway",
build_file_proto_mode = "disable_global",
importpath = "github.com/grpc-ecosystem/grpc-gateway",
sum = "h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=",
version = "v1.16.0",
)
go_repository(
name = "com_github_grpc_ecosystem_grpc_gateway_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0=",
version = "v2.20.0",
)
go_repository(
name = "com_github_hanwen_go_fuse_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/hanwen/go-fuse/v2",
sum = "h1:jo5QZYmBLNcl9ovypWaQ5yXMSSV+Ch68xoC3rtZvvBM=",
version = "v2.2.0",
)
go_repository(
name = "com_github_hashicorp_consul_api",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/consul/api",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE=",
version = "v1.25.1",
)
go_repository(
name = "com_github_hashicorp_consul_sdk",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/consul/sdk",
sum = "h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU=",
version = "v0.8.0",
)
go_repository(
name = "com_github_hashicorp_cronexpr",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/cronexpr",
sum = "h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c=",
version = "v1.1.1",
)
go_repository(
name = "com_github_hashicorp_errwrap",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/errwrap",
sum = "h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=",
version = "v1.1.0",
)
go_repository(
name = "com_github_hashicorp_go_cleanhttp",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-cleanhttp",
sum = "h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=",
version = "v0.5.2",
)
go_repository(
name = "com_github_hashicorp_go_hclog",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-hclog",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c=",
version = "v1.5.0",
)
go_repository(
name = "com_github_hashicorp_go_immutable_radix",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-immutable-radix",
sum = "h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc=",
version = "v1.3.1",
)
go_repository(
name = "com_github_hashicorp_go_msgpack",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-msgpack",
sum = "h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4=",
version = "v0.5.3",
)
go_repository(
name = "com_github_hashicorp_go_multierror",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-multierror",
sum = "h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=",
version = "v1.1.1",
)
go_repository(
name = "com_github_hashicorp_go_net",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go.net",
sum = "h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw=",
version = "v0.0.1",
)
go_repository(
name = "com_github_hashicorp_go_plugin",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-plugin",
sum = "h1:4OtAfUGbnKC6yS48p0CtMX2oFYtzFZVv6rok3cRWgnE=",
version = "v1.0.1",
)
go_repository(
name = "com_github_hashicorp_go_retryablehttp",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-retryablehttp",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M=",
version = "v0.7.5",
)
go_repository(
name = "com_github_hashicorp_go_rootcerts",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-rootcerts",
sum = "h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc=",
version = "v1.0.2",
)
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
go_repository(
name = "com_github_hashicorp_go_slug",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-slug",
sum = "h1:lYhmKXXonP4KGSz3JBmks6YpDRjP1cMA/yvcoPxoNw8=",
version = "v0.12.1",
)
go_repository(
name = "com_github_hashicorp_go_sockaddr",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-sockaddr",
chore/deps: upgrade alertmanager package dependency, improve logs and tests (#63329) Upgrades to our forked update v0.27.0, which matches the Alertmanager version we deploy: https://github.com/sourcegraph/alertmanager/commit/3695ef8bcc9a5bf22945c43067b092e79644f1f3. Upon closer inspection I also realized I upgraded `prometheus/common` too far in https://github.com/sourcegraph/sourcegraph/pull/63328 - I've downgraded it to match the revision of Alertmanager we are using, while _also_ fulfilling the OpenFGA dependency https://github.com/sourcegraph/sourcegraph/pull/63329#discussion_r1646630946 for https://github.com/sourcegraph/sourcegraph/pull/63173 💀 The latest version of `prometheus/common` marshals configuration values that are unknown to our version of Alertmanager (v0.27.0) which rejects the generated configuration from `prom-wrapper`. I've also made a few updates to improve the testing and improve the prometheus and alertmanager output by forwarding them to differently-scoped loggers and crude conversion of the log levels: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/d6e36a72-ad4f-4524-9061-89504776edfb) Related: https://github.com/sourcegraph/sourcegraph/pull/63171 Closes CORE-186 ## Test plan `sg start` and `sg run prometheus`, update some alerting configs in http://localhost:9090/alertmanager/#/status: <img src="https://github.com/sourcegraph/sourcegraph/assets/23356519/56cef853-ac39-4035-b584-57aec83e8301" width="30%"> In personal settings: ```json { "alerts.hideObservabilitySiteAlerts": false } ``` No banners show up indicating Prometheus is unhealthy.
2024-06-19 20:46:30 +00:00
sum = "h1:RSG8rKU28VTUTvEKghe5gIhIQpv8evvNpnDEyqO4u9I=",
version = "v1.0.6",
)
go_repository(
name = "com_github_hashicorp_go_syslog",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-syslog",
sum = "h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE=",
version = "v1.0.0",
)
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
go_repository(
name = "com_github_hashicorp_go_tfe",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-tfe",
sum = "h1:5G84t70g70xWK5U0WaYb8wLfbC5fR6dvawqCkmMN5X0=",
version = "v1.32.1",
)
go_repository(
name = "com_github_hashicorp_go_uuid",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-uuid",
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
sum = "h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=",
version = "v1.0.3",
)
go_repository(
name = "com_github_hashicorp_go_version",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/go-version",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=",
version = "v1.7.0",
)
go_repository(
name = "com_github_hashicorp_golang_lru",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/golang-lru",
sum = "h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=",
version = "v0.5.4",
)
go_repository(
name = "com_github_hashicorp_golang_lru_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/golang-lru/v2",
2024-05-07 07:14:05 +00:00
sum = "h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=",
version = "v2.0.7",
)
go_repository(
name = "com_github_hashicorp_hcl",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/hcl",
sum = "h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=",
version = "v1.0.0",
)
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
go_repository(
name = "com_github_hashicorp_jsonapi",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/jsonapi",
sum = "h1:9ARUJJ1VVynB176G1HCwleORqCaXm/Vx0uUi0dL26I0=",
version = "v0.0.0-20210826224640-ee7dae0fb22d",
)
go_repository(
name = "com_github_hashicorp_logutils",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/logutils",
sum = "h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=",
version = "v1.0.0",
)
go_repository(
name = "com_github_hashicorp_mdns",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/mdns",
sum = "h1:sY0CMhFmjIPDMlTB+HfymFHCaYLhgifZ0QhjaYKD/UQ=",
version = "v1.0.4",
)
go_repository(
name = "com_github_hashicorp_memberlist",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/memberlist",
chore/deps: upgrade alertmanager package dependency, improve logs and tests (#63329) Upgrades to our forked update v0.27.0, which matches the Alertmanager version we deploy: https://github.com/sourcegraph/alertmanager/commit/3695ef8bcc9a5bf22945c43067b092e79644f1f3. Upon closer inspection I also realized I upgraded `prometheus/common` too far in https://github.com/sourcegraph/sourcegraph/pull/63328 - I've downgraded it to match the revision of Alertmanager we are using, while _also_ fulfilling the OpenFGA dependency https://github.com/sourcegraph/sourcegraph/pull/63329#discussion_r1646630946 for https://github.com/sourcegraph/sourcegraph/pull/63173 💀 The latest version of `prometheus/common` marshals configuration values that are unknown to our version of Alertmanager (v0.27.0) which rejects the generated configuration from `prom-wrapper`. I've also made a few updates to improve the testing and improve the prometheus and alertmanager output by forwarding them to differently-scoped loggers and crude conversion of the log levels: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/d6e36a72-ad4f-4524-9061-89504776edfb) Related: https://github.com/sourcegraph/sourcegraph/pull/63171 Closes CORE-186 ## Test plan `sg start` and `sg run prometheus`, update some alerting configs in http://localhost:9090/alertmanager/#/status: <img src="https://github.com/sourcegraph/sourcegraph/assets/23356519/56cef853-ac39-4035-b584-57aec83e8301" width="30%"> In personal settings: ```json { "alerts.hideObservabilitySiteAlerts": false } ``` No banners show up indicating Prometheus is unhealthy.
2024-06-19 20:46:30 +00:00
sum = "h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM=",
version = "v0.5.0",
)
go_repository(
name = "com_github_hashicorp_nomad_api",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/nomad/api",
sum = "h1:jKwXhVS4F7qk0g8laz+Anz0g/6yaSJ3HqmSAuSNLUcA=",
version = "v0.0.0-20221102143410-8a95f1239005",
)
go_repository(
name = "com_github_hashicorp_serf",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/serf",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY=",
version = "v0.10.1",
)
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
go_repository(
name = "com_github_hashicorp_terraform_cdk_go_cdktf",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/terraform-cdk-go/cdktf",
sum = "h1:2qYAJMPlFg4zU8TfZWDa3nyaMIHX6GHQuZnliCosXCs=",
version = "v0.20.7",
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
)
go_repository(
name = "com_github_hashicorp_terraform_registry_address",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/terraform-registry-address",
sum = "h1:92LUg03NhfgZv44zpNTLBGIbiyTokQCDcdH5BhVHT3s=",
version = "v0.2.0",
)
go_repository(
name = "com_github_hashicorp_terraform_svchost",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/terraform-svchost",
sum = "h1:Zj6fR5wnpOHnJUmLyWozjMeDaVuE+cstMPj41/eKmSQ=",
version = "v0.0.1",
)
go_repository(
name = "com_github_hashicorp_vault_api",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/vault/api",
sum = "h1:j08Or/wryXT4AcHj1oCbMd7IijXcKzYUGw59LGu9onU=",
version = "v1.0.4",
)
go_repository(
name = "com_github_hashicorp_vault_sdk",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/vault/sdk",
sum = "h1:mOEPeOhT7jl0J4AMl1E705+BcmeRs1VmKNb9F0sMLy8=",
version = "v0.1.13",
)
go_repository(
name = "com_github_hashicorp_yamux",
build_file_proto_mode = "disable_global",
importpath = "github.com/hashicorp/yamux",
sum = "h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ=",
version = "v0.0.0-20181012175058-2f1d1f20f75d",
)
go_repository(
name = "com_github_hdrhistogram_hdrhistogram_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/HdrHistogram/hdrhistogram-go",
sum = "h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM=",
version = "v1.1.2",
)
go_repository(
name = "com_github_hetznercloud_hcloud_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/hetznercloud/hcloud-go",
sum = "h1:WCmFAhLRooih2QHAsbCbEdpIHnshQQmrPqsr3rHE1Ow=",
version = "v1.35.3",
)
go_repository(
name = "com_github_hexops_autogold",
build_file_proto_mode = "disable_global",
importpath = "github.com/hexops/autogold",
sum = "h1:YgxF9OHWbEIUjhDbpnLhgVsjUDsiHDTyDfy2lrfdlzo=",
version = "v1.3.1",
)
2023-01-27 14:30:35 +00:00
go_repository(
name = "com_github_hexops_autogold_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/hexops/autogold/v2",
sum = "h1:JPUXuZQGkcQMv7eeDXuNMovjfoRYaa0yVcm+F3voaGY=",
version = "v2.2.1",
2023-01-27 14:30:35 +00:00
)
go_repository(
name = "com_github_hexops_gotextdiff",
build_file_proto_mode = "disable_global",
importpath = "github.com/hexops/gotextdiff",
sum = "h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=",
version = "v1.0.3",
)
go_repository(
name = "com_github_hexops_valast",
build_file_proto_mode = "disable_global",
importpath = "github.com/hexops/valast",
replace = "github.com/bobheadxi/valast",
sum = "h1:cK/ixaJaSyXAKglOrY2CLE0pM9C+m2LbijsVW5k675E=",
version = "v0.0.0-20240724215614-eb5cb82e0c6f",
)
go_repository(
name = "com_github_hhatto_gocloc",
build_file_proto_mode = "disable_global",
importpath = "github.com/hhatto/gocloc",
sum = "h1:deh3Xb1uqiySNgOccMNYb3HbKsUoQDzsZRpfQmbTIhs=",
version = "v0.4.2",
)
go_repository(
name = "com_github_hjson_hjson_go_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/hjson/hjson-go/v4",
sum = "h1:wlm6IYYqHjOdXH1gHev4VoXCaW20HdQAGCxdOEEg2cs=",
version = "v4.0.0",
)
go_repository(
name = "com_github_honeycombio_libhoney_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/honeycombio/libhoney-go",
sum = "h1:TECEltZ48K6J4NG1JVYqmi0vCJNnHYooFor83fgKesA=",
version = "v1.15.8",
)
go_repository(
name = "com_github_hpcloud_tail",
build_file_proto_mode = "disable_global",
importpath = "github.com/hpcloud/tail",
sum = "h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=",
version = "v1.0.0",
)
go_repository(
name = "com_github_huandu_xstrings",
build_file_proto_mode = "disable_global",
importpath = "github.com/huandu/xstrings",
sum = "h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU=",
version = "v1.4.0",
)
go_repository(
name = "com_github_hydrogen18_memlistener",
build_file_proto_mode = "disable_global",
importpath = "github.com/hydrogen18/memlistener",
sum = "h1:JR7eDj8HD6eXrc5fWLbSUnfcQFL06PYvCc0DKQnWfaU=",
version = "v1.0.0",
)
go_repository(
name = "com_github_iancoleman_strcase",
build_file_proto_mode = "disable_global",
importpath = "github.com/iancoleman/strcase",
sum = "h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=",
version = "v0.3.0",
)
go_repository(
name = "com_github_ianlancetaylor_demangle",
build_file_proto_mode = "disable_global",
importpath = "github.com/ianlancetaylor/demangle",
sum = "h1:KwWnWVWCNtNq/ewIX7HIKnELmEx2nDP42yskD/pi7QE=",
version = "v0.0.0-20240312041847-bd984b5ce465",
)
go_repository(
name = "com_github_imdario_mergo",
build_file_proto_mode = "disable_global",
importpath = "github.com/imdario/mergo",
sum = "h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=",
version = "v0.3.16",
)
go_repository(
name = "com_github_imkira_go_interpol",
build_file_proto_mode = "disable_global",
importpath = "github.com/imkira/go-interpol",
sum = "h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk=",
version = "v1.1.0",
)
go_repository(
name = "com_github_in_toto_in_toto_golang",
build_file_proto_mode = "disable_global",
importpath = "github.com/in-toto/in-toto-golang",
sum = "h1:hb8bgwr0M2hGdDsLjkJ3ZqJ8JFLL/tgYdAxF/XEFBbY=",
version = "v0.5.0",
)
go_repository(
name = "com_github_inconshreveable_log15",
build_file_proto_mode = "disable_global",
importpath = "github.com/inconshreveable/log15",
sum = "h1:n1DqxAo4oWPMvH1+v+DLYlMCecgumhhgnxAPdqDIFHI=",
version = "v0.0.0-20201112154412-8562bdadbbac",
)
go_repository(
name = "com_github_inconshreveable_mousetrap",
build_file_proto_mode = "disable_global",
importpath = "github.com/inconshreveable/mousetrap",
sum = "h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=",
version = "v1.1.0",
)
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
go_repository(
name = "com_github_invopop_jsonschema",
build_file_proto_mode = "disable_global",
importpath = "github.com/invopop/jsonschema",
msp: generate projectID up-front and persist in spec (#59220) This is a big diff, but they all tie together, so hear me out: The only way to get the project ID right now is to query the appropriate Terraform Cloud workspace outputs. However, to do that, you need access to `sourcegraph-secrets`, to get the appropriate TFC access token. This is awkward because as an operator, you would follow the instructions to request `mspServiceEditor` on your desired project - but now, to use various MSP tooling like `sg msp pg connect`, you must _also_ request access to `sourcegraph-secrets`, so that we can get a TFC token to find the project ID and other stuff. Because we might have a large number of services it's not feasible to manually set up Entitle bundles (they cannot be programmatically created). The approach I want to take is to copy the MSP team TFC token from `sourcegraph-secrets` into each individual MSP environment project. Then, we can get the MSP team TFC token from the _environment_ project instead, access for which will be granted by the `mspServiceEditor` role. To do this however, we must know the project ID up front. So this PR makes the following changes: 1. Makes it so that the randomized project ID isn't managed by Terraform, but generated statically, and configured in `environments[].projectID`. 2. This requires changes to `sg msp init` to create a project ID the same way we create it in-Terraform today, but in addition to service initialization, we must now also have tooling to start configuration a new environment as well, so that we can generate a project ID for the operator. This is done via a new command, `sg msp init-env`, which inserts a new environment into a service spec. - MSP service specs are intended to be operator-written and hopefully include lots of docstrings on configuration, so we take special care to preserve formatting and comments by manipulating `yaml.Node` directly. 4. In order to use `yaml.Node`, however, we must switch over to `gopkg.in/yaml.v3` - previously, we used the K8S YAML library, mostly as a carry-over from what is used in Cloud. In order to use `gopkg.in/yaml.v3`, we need to: - Replace all `json` struct tags with `yaml`, as the YAML library does not support JSON tags - Upgrade `github.com/invopop/jsonschema` so that we can point the JSON schema generator to use the `yaml` tags as well 5. Now that we have `projectID` statically available, we can remove code that queries TFC workspaces for the project ID and replace them with references to the spec instead. ## Test plan 1. Unit tests on `sg msp init`'s generated output 2. Unit tests on inserting environment 3. Unit tests on project ID generator 4. https://github.com/sourcegraph/managed-services/pull/295
2023-12-23 01:25:40 +00:00
sum = "h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10CvzRI=",
version = "v0.12.0",
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
)
go_repository(
name = "com_github_ionos_cloud_sdk_go_v6",
build_file_proto_mode = "disable_global",
importpath = "github.com/ionos-cloud/sdk-go/v6",
sum = "h1:vb6yqdpiqaytvreM0bsn2pXw+1YDvEk2RKSmBAQvgDQ=",
version = "v6.1.3",
)
go_repository(
name = "com_github_iris_contrib_httpexpect_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/iris-contrib/httpexpect/v2",
sum = "h1:3cTZSyBBen/kfjCtgNFoUKi1u0FVXNaAjyRJOo6AVS4=",
version = "v2.12.1",
)
go_repository(
name = "com_github_iris_contrib_schema",
build_file_proto_mode = "disable_global",
importpath = "github.com/iris-contrib/schema",
sum = "h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw=",
version = "v0.0.6",
)
go_repository(
name = "com_github_itchyny_gojq",
build_file_proto_mode = "disable_global",
importpath = "github.com/itchyny/gojq",
sum = "h1:6k8vVtsrhQSYgSGg827AD+PVVaB1NLXEdX+dda2oZCc=",
version = "v0.12.14",
)
go_repository(
name = "com_github_itchyny_timefmt_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/itchyny/timefmt-go",
sum = "h1:G0INE2la8S6ru/ZI5JecgyzbbJNs5lG1RcBqa7Jm6GE=",
version = "v0.1.5",
)
go_repository(
name = "com_github_jackc_chunkreader",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/chunkreader",
sum = "h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0=",
version = "v1.0.0",
)
go_repository(
name = "com_github_jackc_chunkreader_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/chunkreader/v2",
sum = "h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=",
version = "v2.0.1",
)
go_repository(
name = "com_github_jackc_pgconn",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/pgconn",
sum = "h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w=",
version = "v1.14.3",
)
go_repository(
name = "com_github_jackc_pgerrcode",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/pgerrcode",
sum = "h1:s+4MhCQ6YrzisK6hFJUX53drDT4UsSW3DEhKn0ifuHw=",
version = "v0.0.0-20220416144525-469b46aa5efa",
)
go_repository(
name = "com_github_jackc_pgio",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/pgio",
sum = "h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=",
version = "v1.0.0",
)
go_repository(
name = "com_github_jackc_pgmock",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/pgmock",
sum = "h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc=",
version = "v0.0.0-20210724152146-4ad1a8207f65",
)
go_repository(
name = "com_github_jackc_pgpassfile",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/pgpassfile",
sum = "h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=",
version = "v1.0.0",
)
go_repository(
name = "com_github_jackc_pgproto3",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/pgproto3",
sum = "h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A=",
version = "v1.1.0",
)
go_repository(
name = "com_github_jackc_pgproto3_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/pgproto3/v2",
sum = "h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag=",
version = "v2.3.3",
)
go_repository(
name = "com_github_jackc_pgservicefile",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/pgservicefile",
sum = "h1:L0QtFUgDarD7Fpv9jeVMgy/+Ec0mtnmYuImjTz6dtDA=",
version = "v0.0.0-20231201235250-de7065d80cb9",
)
go_repository(
name = "com_github_jackc_pgtype",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/pgtype",
dev/msp: add CloudSQL integration (#58420) This PR has 3 major changes: 1. Provisioning a Cloud SQL PostgreSQL instance: `resource.postgreSQL` 2. Updates to the MSP runtime for connecting to the database 3. Publishable `msp-example` for the `msp-testbed` deployment, for testing integrations and other MSP features, and adds an example Gorm setup Closes https://github.com/sourcegraph/sourcegraph/issues/56848. For more context, see go/msp ### `resource.postgreSQL` This change adds `resource.postgreSQL` to the spec for provisioning a Cloud SQL database. Example: ```yaml resources: postgreSQL: databases: ["primary"] cpu: 1 memoryGB: 4 ``` When configured, a Cloud SQL instance is provisioned, and the Cloud Run workload SA is granted access to it. The specified `databases` are also created. `cpu` and `memoryGB` are used to generate the custom VM to provision the instance with. A lot of the base configuration for the database instance are taken directly from what we use in Cloud: https://github.com/sourcegraph/controller/blob/9cac1b1aa0dde038280d424f4d4b6c34ffb22e36/internal/resource/sql/sql.go#L116, and is similar to the Redis setup, in that we need the private peering VPC and install additional certs on the Cloud Run instance. ### MSP runtime `service.Contract` now has a helper, `GetPostgreSQLDB(database)`, for generating the appropriate configuration for creating a connection to a given database and returning a `sql.DB`, which most libraries have adapters for. The helper sets up `pgx.ConnConfig` that uses workload identity to connect directly to Cloud SQL, following the guide here: https://github.com/GoogleCloudPlatform/cloud-sql-go-connector?tab=readme-ov-file#automatic-iam-database-authentication In local dev, `PGDSN` can be used to hardcode an appropriate value. ### `msp-example` I've moved the MSP example from #56846 to the top-level `cmd/msp-example,` and set up some guidance for publishing it. This service now also includes a simple database connection and setup using Gorm, used by https://github.com/sourcegraph/accounts.sourcegraph.com, and can be used for testing, e.g. https://github.com/sourcegraph/managed-services/pull/87 ## Test plan - [x] Deploy https://github.com/sourcegraph/managed-services/pull/87, which will connect to the database and set up some tables - [x] Review diff: https://github.com/sourcegraph/managed-services/actions/runs/6951246277 - [x] Tear down database in https://github.com/sourcegraph/managed-services/pull/87, with caveat: requires state surgery. Should be rare enough (we might prefer to tear down environments entirely) - see docstrings in package `postgresqlroles` --------- Co-authored-by: Michael Lin <mlzc@hey.com> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-11-22 23:32:53 +00:00
sum = "h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw=",
version = "v1.14.0",
)
go_repository(
name = "com_github_jackc_pgx_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/pgx/v4",
sum = "h1:xVpYkNR5pk5bMCZGfClbO962UIqVABcAGt7ha1s/FeU=",
version = "v4.18.2",
dev/msp: add CloudSQL integration (#58420) This PR has 3 major changes: 1. Provisioning a Cloud SQL PostgreSQL instance: `resource.postgreSQL` 2. Updates to the MSP runtime for connecting to the database 3. Publishable `msp-example` for the `msp-testbed` deployment, for testing integrations and other MSP features, and adds an example Gorm setup Closes https://github.com/sourcegraph/sourcegraph/issues/56848. For more context, see go/msp ### `resource.postgreSQL` This change adds `resource.postgreSQL` to the spec for provisioning a Cloud SQL database. Example: ```yaml resources: postgreSQL: databases: ["primary"] cpu: 1 memoryGB: 4 ``` When configured, a Cloud SQL instance is provisioned, and the Cloud Run workload SA is granted access to it. The specified `databases` are also created. `cpu` and `memoryGB` are used to generate the custom VM to provision the instance with. A lot of the base configuration for the database instance are taken directly from what we use in Cloud: https://github.com/sourcegraph/controller/blob/9cac1b1aa0dde038280d424f4d4b6c34ffb22e36/internal/resource/sql/sql.go#L116, and is similar to the Redis setup, in that we need the private peering VPC and install additional certs on the Cloud Run instance. ### MSP runtime `service.Contract` now has a helper, `GetPostgreSQLDB(database)`, for generating the appropriate configuration for creating a connection to a given database and returning a `sql.DB`, which most libraries have adapters for. The helper sets up `pgx.ConnConfig` that uses workload identity to connect directly to Cloud SQL, following the guide here: https://github.com/GoogleCloudPlatform/cloud-sql-go-connector?tab=readme-ov-file#automatic-iam-database-authentication In local dev, `PGDSN` can be used to hardcode an appropriate value. ### `msp-example` I've moved the MSP example from #56846 to the top-level `cmd/msp-example,` and set up some guidance for publishing it. This service now also includes a simple database connection and setup using Gorm, used by https://github.com/sourcegraph/accounts.sourcegraph.com, and can be used for testing, e.g. https://github.com/sourcegraph/managed-services/pull/87 ## Test plan - [x] Deploy https://github.com/sourcegraph/managed-services/pull/87, which will connect to the database and set up some tables - [x] Review diff: https://github.com/sourcegraph/managed-services/actions/runs/6951246277 - [x] Tear down database in https://github.com/sourcegraph/managed-services/pull/87, with caveat: requires state surgery. Should be rare enough (we might prefer to tear down environments entirely) - see docstrings in package `postgresqlroles` --------- Co-authored-by: Michael Lin <mlzc@hey.com> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-11-22 23:32:53 +00:00
)
go_repository(
name = "com_github_jackc_pgx_v5",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/pgx/v5",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:amBjrZVmksIdNjxGW/IiIMzxMKZFelXbUoPNb+8sjQw=",
version = "v5.5.5",
)
go_repository(
name = "com_github_jackc_puddle",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/puddle",
dev/msp: add CloudSQL integration (#58420) This PR has 3 major changes: 1. Provisioning a Cloud SQL PostgreSQL instance: `resource.postgreSQL` 2. Updates to the MSP runtime for connecting to the database 3. Publishable `msp-example` for the `msp-testbed` deployment, for testing integrations and other MSP features, and adds an example Gorm setup Closes https://github.com/sourcegraph/sourcegraph/issues/56848. For more context, see go/msp ### `resource.postgreSQL` This change adds `resource.postgreSQL` to the spec for provisioning a Cloud SQL database. Example: ```yaml resources: postgreSQL: databases: ["primary"] cpu: 1 memoryGB: 4 ``` When configured, a Cloud SQL instance is provisioned, and the Cloud Run workload SA is granted access to it. The specified `databases` are also created. `cpu` and `memoryGB` are used to generate the custom VM to provision the instance with. A lot of the base configuration for the database instance are taken directly from what we use in Cloud: https://github.com/sourcegraph/controller/blob/9cac1b1aa0dde038280d424f4d4b6c34ffb22e36/internal/resource/sql/sql.go#L116, and is similar to the Redis setup, in that we need the private peering VPC and install additional certs on the Cloud Run instance. ### MSP runtime `service.Contract` now has a helper, `GetPostgreSQLDB(database)`, for generating the appropriate configuration for creating a connection to a given database and returning a `sql.DB`, which most libraries have adapters for. The helper sets up `pgx.ConnConfig` that uses workload identity to connect directly to Cloud SQL, following the guide here: https://github.com/GoogleCloudPlatform/cloud-sql-go-connector?tab=readme-ov-file#automatic-iam-database-authentication In local dev, `PGDSN` can be used to hardcode an appropriate value. ### `msp-example` I've moved the MSP example from #56846 to the top-level `cmd/msp-example,` and set up some guidance for publishing it. This service now also includes a simple database connection and setup using Gorm, used by https://github.com/sourcegraph/accounts.sourcegraph.com, and can be used for testing, e.g. https://github.com/sourcegraph/managed-services/pull/87 ## Test plan - [x] Deploy https://github.com/sourcegraph/managed-services/pull/87, which will connect to the database and set up some tables - [x] Review diff: https://github.com/sourcegraph/managed-services/actions/runs/6951246277 - [x] Tear down database in https://github.com/sourcegraph/managed-services/pull/87, with caveat: requires state surgery. Should be rare enough (we might prefer to tear down environments entirely) - see docstrings in package `postgresqlroles` --------- Co-authored-by: Michael Lin <mlzc@hey.com> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-11-22 23:32:53 +00:00
sum = "h1:eHK/5clGOatcjX3oWGBO/MpxpbHzSwud5EWTSCI+MX0=",
version = "v1.3.0",
)
go_repository(
name = "com_github_jackc_puddle_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/jackc/puddle/v2",
sum = "h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk=",
version = "v2.2.1",
)
go_repository(
name = "com_github_jbenet_go_context",
build_file_proto_mode = "disable_global",
importpath = "github.com/jbenet/go-context",
sum = "h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=",
version = "v0.0.0-20150711004518-d14ea06fba99",
)
go_repository(
name = "com_github_jdxcode_netrc",
build_file_proto_mode = "disable_global",
importpath = "github.com/jdxcode/netrc",
sum = "h1:2uT3aivO7NVpUPGcQX7RbHijHMyWix/yCnIrCWc+5co=",
version = "v0.0.0-20221124155335-4616370d1a84",
)
go_repository(
name = "com_github_jessevdk_go_flags",
build_file_proto_mode = "disable_global",
importpath = "github.com/jessevdk/go-flags",
sum = "h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc=",
version = "v1.5.0",
)
go_repository(
name = "com_github_jhump_gopoet",
build_file_proto_mode = "disable_global",
importpath = "github.com/jhump/gopoet",
sum = "h1:gYjOPnzHd2nzB37xYQZxj4EIQNpBrBskRqQQ3q4ZgSg=",
version = "v0.1.0",
)
go_repository(
name = "com_github_jhump_goprotoc",
build_file_proto_mode = "disable_global",
importpath = "github.com/jhump/goprotoc",
sum = "h1:Y1UgUX+txUznfqcGdDef8ZOVlyQvnV0pKWZH08RmZuo=",
version = "v0.5.0",
)
go_repository(
name = "com_github_jhump_protocompile",
build_file_proto_mode = "disable_global",
importpath = "github.com/jhump/protocompile",
sum = "h1:BNuUg9k2EiJmlMwjoef3e8vZLHplbVw6DrjGFjLL+Yo=",
version = "v0.0.0-20220216033700-d705409f108f",
)
go_repository(
name = "com_github_jhump_protoreflect",
build_file_proto_mode = "disable_global",
importpath = "github.com/jhump/protoreflect",
sum = "h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=",
version = "v1.15.1",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "com_github_jinzhu_copier",
build_file_proto_mode = "disable_global",
importpath = "github.com/jinzhu/copier",
sum = "h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8=",
version = "v0.4.0",
)
go_repository(
name = "com_github_jinzhu_inflection",
build_file_proto_mode = "disable_global",
importpath = "github.com/jinzhu/inflection",
sum = "h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=",
version = "v1.0.0",
)
go_repository(
name = "com_github_jinzhu_now",
build_file_proto_mode = "disable_global",
importpath = "github.com/jinzhu/now",
sum = "h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=",
version = "v1.1.5",
)
go_repository(
name = "com_github_jmespath_go_jmespath",
build_file_proto_mode = "disable_global",
importpath = "github.com/jmespath/go-jmespath",
sum = "h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=",
version = "v0.4.0",
)
go_repository(
name = "com_github_jmespath_go_jmespath_internal_testify",
build_file_proto_mode = "disable_global",
importpath = "github.com/jmespath/go-jmespath/internal/testify",
sum = "h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=",
version = "v1.5.1",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_joeshaw_multierror",
build_file_proto_mode = "disable_global",
importpath = "github.com/joeshaw/multierror",
sum = "h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4=",
version = "v0.0.0-20140124173710-69b34d4ec901",
)
go_repository(
name = "com_github_johncgriffin_overflow",
build_file_proto_mode = "disable_global",
importpath = "github.com/JohnCGriffin/overflow",
sum = "h1:RGWPOewvKIROun94nF7v2cua9qP+thov/7M50KEoeSU=",
version = "v0.0.0-20211019200055-46fa312c352c",
)
go_repository(
name = "com_github_joho_godotenv",
build_file_proto_mode = "disable_global",
importpath = "github.com/joho/godotenv",
sum = "h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=",
version = "v1.5.1",
)
go_repository(
name = "com_github_joker_jade",
build_file_proto_mode = "disable_global",
importpath = "github.com/Joker/jade",
sum = "h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk=",
version = "v1.1.3",
)
msp/operationdocs: write to Notion instead of Markdown (#62325) Closes https://github.com/sourcegraph/managed-services/issues/1076 aka closes CORE-28 - https://github.com/sourcegraph/managed-services/pull/1332 also automated the updates. Notes: 1. Notion anchors are ID-based, so we strip all anchor links because we cannot generate them in one pass. `notionreposync` may implement a mechanism for this in the future (filed https://github.com/sourcegraph/notionreposync/issues/8), but for now we don't have a great way around this, especially because of the next point 2. In-place updates are hard because of the block structure, so we destroy page contents and recreate the page every time. This causes a "flicker" as a viewer may see the page disappear slowly before their eyes (we can only delete things 1 block at a time). `notionreposync` may may implement an improved mechanism for this in the future (filed https://github.com/sourcegraph/notionreposync/issues/7) 3. There's something funky going wrong with line breaks, filed https://github.com/sourcegraph/notionreposync/issues/9 - it hurts readability but it's not unmanageable. 4. Sadly Notion does not allow API file uploads (😡 https://developers.notion.com/docs/working-with-files-and-media#uploading-files-and-media-via-the-notion-api), so we generate them into the managed-services repo (https://github.com/sourcegraph/managed-services/pull/1332) and then just link to those diagrams from the generated page. We use a Markdown file that renders the SVG because the native SVG viewer sucks. 5. Made misc changes to operationdocs output where Notion's version is noticeably worse, or difficult to support (tables, lists-in-admonitions, etc) Depends on various improvements upstream in https://github.com/sourcegraph/notionreposync: - https://github.com/sourcegraph/notionreposync/pull/4 - https://github.com/sourcegraph/notionreposync/pull/5 - https://github.com/sourcegraph/notionreposync/pull/6 Follow-up improvements: - CORE-105 - CORE-106 ## Test plan ``` sg msp ops generate-handbook-pages ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/9d314a97-5370-4123-9534-f9f897002110) https://sourcegraph.notion.site/Build-Tracker-infrastructure-operations-bd66bf25d65d41b4875874a6f4d350cc ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/69e1eb48-2fa9-421b-b2fd-969e25f37fee) https://github.com/sourcegraph/managed-services/pull/1332 --------- Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
2024-05-03 21:17:16 +00:00
go_repository(
name = "com_github_jomei_notionapi",
build_file_proto_mode = "disable_global",
importpath = "github.com/jomei/notionapi",
sum = "h1:+7c32xWtKJEghIiaKgFg9yBpqh95pxxlqX/CWjqHpkw=",
version = "v1.13.0",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_jon_whit_go_grpc_prometheus",
build_file_proto_mode = "disable_global",
importpath = "github.com/jon-whit/go-grpc-prometheus",
sum = "h1:/wmpGDJcLXuEjXryWhVYEGt9YBRhtLwFEN7T+Flr8sw=",
version = "v1.4.0",
)
go_repository(
name = "com_github_jonboulle_clockwork",
build_file_proto_mode = "disable_global",
importpath = "github.com/jonboulle/clockwork",
sum = "h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=",
version = "v0.4.0",
)
go_repository(
name = "com_github_jordan_wright_email",
build_file_proto_mode = "disable_global",
importpath = "github.com/jordan-wright/email",
sum = "h1:jdpOPRN1zP63Td1hDQbZW73xKmzDvZHzVdNYxhnTMDA=",
version = "v4.0.1-0.20210109023952-943e75fe5223+incompatible",
)
go_repository(
name = "com_github_josharian_intern",
build_file_proto_mode = "disable_global",
importpath = "github.com/josharian/intern",
sum = "h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=",
version = "v1.0.0",
)
go_repository(
name = "com_github_jpillora_backoff",
build_file_proto_mode = "disable_global",
importpath = "github.com/jpillora/backoff",
sum = "h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=",
version = "v1.0.0",
)
go_repository(
name = "com_github_json_iterator_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/json-iterator/go",
sum = "h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=",
version = "v1.1.12",
)
go_repository(
name = "com_github_jstemmer_go_junit_report",
build_file_proto_mode = "disable_global",
importpath = "github.com/jstemmer/go-junit-report",
sum = "h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o=",
version = "v0.9.1",
)
go_repository(
name = "com_github_jtolds_gls",
build_file_proto_mode = "disable_global",
importpath = "github.com/jtolds/gls",
sum = "h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=",
version = "v4.20.0+incompatible",
)
go_repository(
name = "com_github_julienschmidt_httprouter",
build_file_proto_mode = "disable_global",
importpath = "github.com/julienschmidt/httprouter",
sum = "h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=",
version = "v1.3.0",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "com_github_jung_kurt_gofpdf",
build_file_proto_mode = "disable_global",
importpath = "github.com/jung-kurt/gofpdf",
sum = "h1:jgbatWHfRlPYiK85qgevsZTHviWXKwB1TTiKdz5PtRc=",
version = "v1.16.2",
)
go_repository(
name = "com_github_k0kubun_go_ansi",
build_file_proto_mode = "disable_global",
importpath = "github.com/k0kubun/go-ansi",
sum = "h1:qGQQKEcAR99REcMpsXCp3lJ03zYT1PkRd3kQGPn9GVg=",
version = "v0.0.0-20180517002512-3bf9e2903213",
)
go_repository(
name = "com_github_k0kubun_pp_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/k0kubun/pp/v3",
sum = "h1:ifxtqJkRZhw3h554/z/8zm6AAbyO4LLKDlA5eV+9O8Q=",
version = "v3.1.0",
)
go_repository(
name = "com_github_k3a_html2text",
build_file_proto_mode = "disable_global",
importpath = "github.com/k3a/html2text",
sum = "h1:ks4hKSTdiTRsLr0DM771mI5TvsoG6zH7m1Ulv7eJRHw=",
version = "v1.1.0",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_karlseguin_ccache_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/karlseguin/ccache/v3",
sum = "h1:hFX25+fxzNjsRlREYsoGNa2LoVEw5mPF8wkWq/UnevQ=",
version = "v3.0.5",
)
go_repository(
name = "com_github_karlseguin_expect",
build_file_proto_mode = "disable_global",
importpath = "github.com/karlseguin/expect",
sum = "h1:OF4mqjblc450v8nKARBS5Q0AweBNR0A+O3VjjpxwBrg=",
version = "v1.0.7",
)
go_repository(
name = "com_github_karlseguin_typed",
build_file_proto_mode = "disable_global",
importpath = "github.com/karlseguin/typed",
sum = "h1:ND0eDpwiUFIrm/n1ehxUyh/XNGs9zkYrLxtGqENSalY=",
version = "v1.1.8",
)
go_repository(
name = "com_github_kataras_blocks",
build_file_proto_mode = "disable_global",
importpath = "github.com/kataras/blocks",
sum = "h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4=",
version = "v0.0.7",
)
go_repository(
name = "com_github_kataras_golog",
build_file_proto_mode = "disable_global",
importpath = "github.com/kataras/golog",
sum = "h1:isP8th4PJH2SrbkciKnylaND9xoTtfxv++NB+DF0l9g=",
version = "v0.1.8",
)
go_repository(
name = "com_github_kataras_iris_v12",
build_file_proto_mode = "disable_global",
importpath = "github.com/kataras/iris/v12",
sum = "h1:WzDY5nGuW/LgVaFS5BtTkW3crdSKJ/FEgWnxPnIVVLI=",
version = "v12.2.0",
)
go_repository(
name = "com_github_kataras_pio",
build_file_proto_mode = "disable_global",
importpath = "github.com/kataras/pio",
sum = "h1:kqreJ5KOEXGMwHAWHDwIl+mjfNCPhAwZPa8gK7MKlyw=",
version = "v0.0.11",
)
go_repository(
name = "com_github_kataras_sitemap",
build_file_proto_mode = "disable_global",
importpath = "github.com/kataras/sitemap",
sum = "h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY=",
version = "v0.0.6",
)
go_repository(
name = "com_github_kataras_tunnel",
build_file_proto_mode = "disable_global",
importpath = "github.com/kataras/tunnel",
sum = "h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA=",
version = "v0.0.4",
)
go_repository(
name = "com_github_kballard_go_shellquote",
build_file_proto_mode = "disable_global",
importpath = "github.com/kballard/go-shellquote",
sum = "h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=",
version = "v0.0.0-20180428030007-95032a82bc51",
)
go_repository(
name = "com_github_keegancsmith_rpc",
build_file_proto_mode = "disable_global",
importpath = "github.com/keegancsmith/rpc",
sum = "h1:wGWOpjcNrZaY8GDYZJfvyxmlLljm3YQWF+p918DXtDk=",
version = "v1.3.0",
)
go_repository(
name = "com_github_keegancsmith_sqlf",
build_file_proto_mode = "disable_global",
importpath = "github.com/keegancsmith/sqlf",
sum = "h1:b3DZm7eILJYkj4igLMjIvUM8fI4Ey4LCV5Wk8JGL+uA=",
version = "v1.1.1",
)
go_repository(
name = "com_github_keegancsmith_tmpfriend",
build_file_proto_mode = "disable_global",
importpath = "github.com/keegancsmith/tmpfriend",
sum = "h1:xa9SZfAid/jlS3kjwAvVDQFpe6t8SiS0Vl/H51BZYww=",
version = "v0.0.0-20180423180255-86e88902a513",
)
go_repository(
name = "com_github_kevinburke_ssh_config",
build_file_proto_mode = "disable_global",
importpath = "github.com/kevinburke/ssh_config",
sum = "h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=",
version = "v1.2.0",
)
go_repository(
name = "com_github_kevinmbeaulieu_eq_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/kevinmbeaulieu/eq-go",
sum = "h1:AQgYHURDOmnVJ62jnEk0W/7yFKEn+Lv8RHN6t7mB0Zo=",
version = "v1.0.0",
)
go_repository(
name = "com_github_khan_genqlient",
build_file_proto_mode = "disable_global",
importpath = "github.com/Khan/genqlient",
sum = "h1:TMZJ+tl/BpbmGyIBiXzKzUftDhw4ZWxQZ+1ydn0gyII=",
version = "v0.5.0",
)
go_repository(
name = "com_github_kisielk_errcheck",
build_file_proto_mode = "disable_global",
importpath = "github.com/kisielk/errcheck",
sum = "h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY=",
version = "v1.5.0",
)
go_repository(
name = "com_github_kisielk_gotool",
build_file_proto_mode = "disable_global",
importpath = "github.com/kisielk/gotool",
sum = "h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=",
version = "v1.0.0",
)
go_repository(
name = "com_github_klauspost_asmfmt",
build_file_proto_mode = "disable_global",
importpath = "github.com/klauspost/asmfmt",
sum = "h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4=",
version = "v1.3.2",
)
go_repository(
name = "com_github_klauspost_compress",
build_file_proto_mode = "disable_global",
importpath = "github.com/klauspost/compress",
sum = "h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=",
version = "v1.17.8",
)
go_repository(
name = "com_github_klauspost_cpuid_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/klauspost/cpuid/v2",
sum = "h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=",
version = "v2.2.7",
)
go_repository(
name = "com_github_klauspost_pgzip",
build_file_proto_mode = "disable_global",
importpath = "github.com/klauspost/pgzip",
sum = "h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=",
version = "v1.2.6",
)
go_repository(
name = "com_github_kljensen_snowball",
build_file_proto_mode = "disable_global",
importpath = "github.com/kljensen/snowball",
sum = "h1:6DZLCcZeL0cLfodx+Md4/OLC6b/bfurWUOUGs1ydfOU=",
version = "v0.6.0",
)
go_repository(
name = "com_github_knadh_koanf",
build_file_proto_mode = "disable_global",
importpath = "github.com/knadh/koanf",
sum = "h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs=",
version = "v1.5.0",
)
go_repository(
name = "com_github_knadh_koanf_maps",
build_file_proto_mode = "disable_global",
importpath = "github.com/knadh/koanf/maps",
sum = "h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs=",
version = "v0.1.1",
)
go_repository(
name = "com_github_knadh_koanf_providers_confmap",
build_file_proto_mode = "disable_global",
importpath = "github.com/knadh/koanf/providers/confmap",
sum = "h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU=",
version = "v0.1.0",
)
go_repository(
name = "com_github_knadh_koanf_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/knadh/koanf/v2",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM=",
version = "v2.1.1",
)
go_repository(
name = "com_github_kolo_xmlrpc",
build_file_proto_mode = "disable_global",
importpath = "github.com/kolo/xmlrpc",
sum = "h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00=",
version = "v0.0.0-20220921171641-a4b6fa1dd06b",
)
go_repository(
name = "com_github_konsorten_go_windows_terminal_sequences",
build_file_proto_mode = "disable_global",
importpath = "github.com/konsorten/go-windows-terminal-sequences",
sum = "h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=",
version = "v1.0.2",
)
go_repository(
name = "com_github_kr_fs",
build_file_proto_mode = "disable_global",
importpath = "github.com/kr/fs",
sum = "h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=",
version = "v0.1.0",
)
go_repository(
name = "com_github_kr_logfmt",
build_file_proto_mode = "disable_global",
importpath = "github.com/kr/logfmt",
sum = "h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=",
version = "v0.0.0-20140226030751-b84e30acd515",
)
go_repository(
name = "com_github_kr_pretty",
build_file_proto_mode = "disable_global",
importpath = "github.com/kr/pretty",
sum = "h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=",
version = "v0.3.1",
)
go_repository(
name = "com_github_kr_pty",
build_file_proto_mode = "disable_global",
importpath = "github.com/kr/pty",
sum = "h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI=",
version = "v1.1.8",
)
go_repository(
name = "com_github_kr_text",
build_file_proto_mode = "disable_global",
importpath = "github.com/kr/text",
sum = "h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=",
version = "v0.2.0",
)
go_repository(
name = "com_github_kylelemons_godebug",
build_file_proto_mode = "disable_global",
importpath = "github.com/kylelemons/godebug",
sum = "h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=",
version = "v1.1.0",
)
go_repository(
name = "com_github_labstack_echo_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/labstack/echo/v4",
sum = "h1:5CiyngihEO4HXsz3vVsJn7f8xAlWwRr3aY6Ih280ZKA=",
version = "v4.10.0",
)
go_repository(
name = "com_github_labstack_gommon",
build_file_proto_mode = "disable_global",
importpath = "github.com/labstack/gommon",
sum = "h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8=",
version = "v0.4.0",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_lann_builder",
build_file_proto_mode = "disable_global",
importpath = "github.com/lann/builder",
sum = "h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw=",
version = "v0.0.0-20180802200727-47ae307949d0",
)
go_repository(
name = "com_github_lann_ps",
build_file_proto_mode = "disable_global",
importpath = "github.com/lann/ps",
sum = "h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk=",
version = "v0.0.0-20150810152359-62de8c46ede0",
)
go_repository(
name = "com_github_leodido_go_urn",
build_file_proto_mode = "disable_global",
importpath = "github.com/leodido/go-urn",
sum = "h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=",
version = "v1.2.1",
)
go_repository(
name = "com_github_lestrrat_go_blackmagic",
build_file_proto_mode = "disable_global",
importpath = "github.com/lestrrat-go/blackmagic",
sum = "h1:Cg2gVSc9h7sz9NOByczrbUvLopQmXrfFx//N+AkAr5k=",
version = "v1.0.2",
)
go_repository(
name = "com_github_lestrrat_go_httpcc",
build_file_proto_mode = "disable_global",
importpath = "github.com/lestrrat-go/httpcc",
sum = "h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE=",
version = "v1.0.1",
)
go_repository(
name = "com_github_lestrrat_go_httprc",
build_file_proto_mode = "disable_global",
importpath = "github.com/lestrrat-go/httprc",
sum = "h1:bsTfiH8xaKOJPrg1R+E3iE/AWZr/x0Phj9PBTG/OLUk=",
version = "v1.0.5",
)
go_repository(
name = "com_github_lestrrat_go_iter",
build_file_proto_mode = "disable_global",
importpath = "github.com/lestrrat-go/iter",
sum = "h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI=",
version = "v1.0.2",
)
go_repository(
name = "com_github_lestrrat_go_jwx_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/lestrrat-go/jwx/v2",
sum = "h1:jAPKupy4uHgrHFEdjVjNkUgoBKtVDgrQPB/h55FHrR0=",
version = "v2.0.21",
)
go_repository(
name = "com_github_lestrrat_go_option",
build_file_proto_mode = "disable_global",
importpath = "github.com/lestrrat-go/option",
sum = "h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU=",
version = "v1.0.1",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "com_github_letsencrypt_boulder",
build_file_proto_mode = "disable_global",
importpath = "github.com/letsencrypt/boulder",
sum = "h1:WGrKdjHtWC67RX96eTkYD2f53NDHhrq/7robWTAfk4s=",
version = "v0.0.0-20231026200631-000cd05d5491",
)
go_repository(
name = "com_github_lib_pq",
build_file_proto_mode = "disable_global",
importpath = "github.com/lib/pq",
sum = "h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw=",
version = "v1.10.7",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_libsql_sqlite_antlr4_parser",
build_file_proto_mode = "disable_global",
importpath = "github.com/libsql/sqlite-antlr4-parser",
sum = "h1:JLvn7D+wXjH9g4Jsjo+VqmzTUpl/LX7vfr6VOfSWTdM=",
version = "v0.0.0-20240327125255-dbf53b6cbf06",
)
go_repository(
name = "com_github_life4_genesis",
build_file_proto_mode = "disable_global",
importpath = "github.com/life4/genesis",
sum = "h1:Ww36apMVRnC7gdB7RDI5B66Q1tjmO8g1QEW5nq2c/SU=",
version = "v1.10.3",
)
go_repository(
name = "com_github_linode_linodego",
build_file_proto_mode = "disable_global",
importpath = "github.com/linode/linodego",
sum = "h1:+lxNZw4avRxhCqGjwfPgQ2PvMT+vOL0OMsTdzixR7hQ=",
version = "v1.9.3",
)
go_repository(
name = "com_github_logrusorgru_aurora_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/logrusorgru/aurora/v3",
sum = "h1:R6zcoZZbvVcGMvDCKo45A9U/lzYyzl5NfYIvznmDfE4=",
version = "v3.0.0",
)
go_repository(
name = "com_github_lucasb_eyer_go_colorful",
build_file_proto_mode = "disable_global",
importpath = "github.com/lucasb-eyer/go-colorful",
sum = "h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=",
version = "v1.2.0",
)
go_repository(
name = "com_github_lufia_plan9stats",
build_file_proto_mode = "disable_global",
importpath = "github.com/lufia/plan9stats",
sum = "h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=",
version = "v0.0.0-20211012122336-39d0f177ccd0",
)
go_repository(
name = "com_github_lyft_protoc_gen_star",
build_file_proto_mode = "disable_global",
importpath = "github.com/lyft/protoc-gen-star",
sum = "h1:erE0rdztuaDq3bpGifD95wfoPrSZc95nGA6tbiNYh6M=",
version = "v0.6.1",
)
go_repository(
name = "com_github_lyft_protoc_gen_star_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/lyft/protoc-gen-star/v2",
sum = "h1:/3+/2sWyXeMLzKd1bX+ixWKgEMsULrIivpDsuaF441o=",
version = "v2.0.3",
)
go_repository(
name = "com_github_machinebox_graphql",
build_file_proto_mode = "disable_global",
importpath = "github.com/machinebox/graphql",
sum = "h1:dWKpJligYKhYKO5A2gvNhkJdQMNZeChZYyBbrZkBZfo=",
version = "v0.2.2",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "com_github_magefile_mage",
build_file_proto_mode = "disable_global",
importpath = "github.com/magefile/mage",
sum = "h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo=",
version = "v1.14.0",
)
go_repository(
name = "com_github_magiconair_properties",
build_file_proto_mode = "disable_global",
importpath = "github.com/magiconair/properties",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=",
version = "v1.8.7",
)
go_repository(
name = "com_github_mailgun_raymond_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/mailgun/raymond/v2",
sum = "h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw=",
version = "v2.0.48",
)
go_repository(
name = "com_github_mailru_easyjson",
build_file_proto_mode = "disable_global",
importpath = "github.com/mailru/easyjson",
sum = "h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=",
version = "v0.7.7",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "com_github_makenowjust_heredoc_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/MakeNowJust/heredoc/v2",
sum = "h1:rlCHh70XXXv7toz95ajQWOWQnN4WNLt0TdpZYIR/J6A=",
version = "v2.0.1",
)
go_repository(
name = "com_github_masterminds_goutils",
build_file_proto_mode = "disable_global",
importpath = "github.com/Masterminds/goutils",
sum = "h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=",
version = "v1.1.1",
)
go_repository(
name = "com_github_masterminds_semver",
build_file_proto_mode = "disable_global",
importpath = "github.com/Masterminds/semver",
sum = "h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=",
version = "v1.5.0",
)
go_repository(
name = "com_github_masterminds_semver_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/Masterminds/semver/v3",
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
sum = "h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0=",
version = "v3.2.1",
)
go_repository(
name = "com_github_masterminds_sprig",
build_file_proto_mode = "disable_global",
importpath = "github.com/Masterminds/sprig",
sum = "h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60=",
version = "v2.22.0+incompatible",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_masterminds_squirrel",
build_file_proto_mode = "disable_global",
importpath = "github.com/Masterminds/squirrel",
sum = "h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM=",
version = "v1.5.4",
)
go_repository(
name = "com_github_matryer_is",
build_file_proto_mode = "disable_global",
importpath = "github.com/matryer/is",
sum = "h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=",
version = "v1.4.0",
)
go_repository(
name = "com_github_matryer_moq",
build_file_proto_mode = "disable_global",
importpath = "github.com/matryer/moq",
sum = "h1:Q06vEqnBYjjfx5KKgHfYRKE/lvlRu+Nj+xodG4YdHnU=",
version = "v0.2.3",
)
go_repository(
name = "com_github_mattermost_xml_roundtrip_validator",
build_file_proto_mode = "disable_global",
importpath = "github.com/mattermost/xml-roundtrip-validator",
sum = "h1:RXbVD2UAl7A7nOTR4u7E3ILa4IbtvKBHw64LDsmu9hU=",
version = "v0.1.0",
)
go_repository(
name = "com_github_mattn_go_colorable",
build_file_proto_mode = "disable_global",
importpath = "github.com/mattn/go-colorable",
sum = "h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=",
version = "v0.1.13",
)
go_repository(
name = "com_github_mattn_go_isatty",
build_file_proto_mode = "disable_global",
importpath = "github.com/mattn/go-isatty",
sum = "h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=",
version = "v0.0.20",
)
go_repository(
name = "com_github_mattn_go_localereader",
build_file_proto_mode = "disable_global",
importpath = "github.com/mattn/go-localereader",
sum = "h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4=",
version = "v0.0.1",
)
go_repository(
name = "com_github_mattn_go_runewidth",
build_file_proto_mode = "disable_global",
importpath = "github.com/mattn/go-runewidth",
sum = "h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=",
version = "v0.0.15",
)
go_repository(
name = "com_github_mattn_go_sqlite3",
build_file_proto_mode = "disable_global",
importpath = "github.com/mattn/go-sqlite3",
sum = "h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=",
version = "v1.14.16",
)
go_repository(
name = "com_github_matttproud_golang_protobuf_extensions",
build_file_proto_mode = "disable_global",
importpath = "github.com/matttproud/golang_protobuf_extensions",
sum = "h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=",
version = "v1.0.4",
)
go_repository(
name = "com_github_matttproud_golang_protobuf_extensions_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/matttproud/golang_protobuf_extensions/v2",
sum = "h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=",
version = "v2.0.0",
)
2024-05-07 07:14:05 +00:00
go_repository(
name = "com_github_maxbrunsfeld_counterfeiter_v6",
build_file_proto_mode = "disable_global",
importpath = "github.com/maxbrunsfeld/counterfeiter/v6",
sum = "h1:NicmruxkeqHjDv03SfSxqmaLuisddudfP3h5wdXFbhM=",
version = "v6.8.1",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "com_github_mazznoer_csscolorparser",
build_file_proto_mode = "disable_global",
importpath = "github.com/mazznoer/csscolorparser",
sum = "h1:vug4zh6loQxAUxfU1DZEu70gTPufDPspamZlHAkKcxE=",
version = "v0.1.3",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_mfridman_interpolate",
build_file_proto_mode = "disable_global",
importpath = "github.com/mfridman/interpolate",
sum = "h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY=",
version = "v0.0.2",
)
go_repository(
name = "com_github_micahparks_keyfunc",
build_file_proto_mode = "disable_global",
importpath = "github.com/MicahParks/keyfunc",
sum = "h1:lhKd5xrFHLNOWrDc4Tyb/Q1AJ4LCzQ48GVJyVIID3+o=",
version = "v1.9.0",
)
go_repository(
name = "com_github_microcosm_cc_bluemonday",
build_file_proto_mode = "disable_global",
importpath = "github.com/microcosm-cc/bluemonday",
sum = "h1:xbqSvqzQMeEHCqMi64VAs4d8uy6Mequs3rQ0k/Khz58=",
version = "v1.0.26",
)
dev/msp: add CloudSQL integration (#58420) This PR has 3 major changes: 1. Provisioning a Cloud SQL PostgreSQL instance: `resource.postgreSQL` 2. Updates to the MSP runtime for connecting to the database 3. Publishable `msp-example` for the `msp-testbed` deployment, for testing integrations and other MSP features, and adds an example Gorm setup Closes https://github.com/sourcegraph/sourcegraph/issues/56848. For more context, see go/msp ### `resource.postgreSQL` This change adds `resource.postgreSQL` to the spec for provisioning a Cloud SQL database. Example: ```yaml resources: postgreSQL: databases: ["primary"] cpu: 1 memoryGB: 4 ``` When configured, a Cloud SQL instance is provisioned, and the Cloud Run workload SA is granted access to it. The specified `databases` are also created. `cpu` and `memoryGB` are used to generate the custom VM to provision the instance with. A lot of the base configuration for the database instance are taken directly from what we use in Cloud: https://github.com/sourcegraph/controller/blob/9cac1b1aa0dde038280d424f4d4b6c34ffb22e36/internal/resource/sql/sql.go#L116, and is similar to the Redis setup, in that we need the private peering VPC and install additional certs on the Cloud Run instance. ### MSP runtime `service.Contract` now has a helper, `GetPostgreSQLDB(database)`, for generating the appropriate configuration for creating a connection to a given database and returning a `sql.DB`, which most libraries have adapters for. The helper sets up `pgx.ConnConfig` that uses workload identity to connect directly to Cloud SQL, following the guide here: https://github.com/GoogleCloudPlatform/cloud-sql-go-connector?tab=readme-ov-file#automatic-iam-database-authentication In local dev, `PGDSN` can be used to hardcode an appropriate value. ### `msp-example` I've moved the MSP example from #56846 to the top-level `cmd/msp-example,` and set up some guidance for publishing it. This service now also includes a simple database connection and setup using Gorm, used by https://github.com/sourcegraph/accounts.sourcegraph.com, and can be used for testing, e.g. https://github.com/sourcegraph/managed-services/pull/87 ## Test plan - [x] Deploy https://github.com/sourcegraph/managed-services/pull/87, which will connect to the database and set up some tables - [x] Review diff: https://github.com/sourcegraph/managed-services/actions/runs/6951246277 - [x] Tear down database in https://github.com/sourcegraph/managed-services/pull/87, with caveat: requires state surgery. Should be rare enough (we might prefer to tear down environments entirely) - see docstrings in package `postgresqlroles` --------- Co-authored-by: Michael Lin <mlzc@hey.com> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-11-22 23:32:53 +00:00
go_repository(
name = "com_github_microsoft_go_mssqldb",
build_file_proto_mode = "disable_global",
importpath = "github.com/microsoft/go-mssqldb",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:sgMPW0HA6Ihd37Yx0MzHyKD726C2kY/8KJsQtXHNaAs=",
version = "v1.7.0",
dev/msp: add CloudSQL integration (#58420) This PR has 3 major changes: 1. Provisioning a Cloud SQL PostgreSQL instance: `resource.postgreSQL` 2. Updates to the MSP runtime for connecting to the database 3. Publishable `msp-example` for the `msp-testbed` deployment, for testing integrations and other MSP features, and adds an example Gorm setup Closes https://github.com/sourcegraph/sourcegraph/issues/56848. For more context, see go/msp ### `resource.postgreSQL` This change adds `resource.postgreSQL` to the spec for provisioning a Cloud SQL database. Example: ```yaml resources: postgreSQL: databases: ["primary"] cpu: 1 memoryGB: 4 ``` When configured, a Cloud SQL instance is provisioned, and the Cloud Run workload SA is granted access to it. The specified `databases` are also created. `cpu` and `memoryGB` are used to generate the custom VM to provision the instance with. A lot of the base configuration for the database instance are taken directly from what we use in Cloud: https://github.com/sourcegraph/controller/blob/9cac1b1aa0dde038280d424f4d4b6c34ffb22e36/internal/resource/sql/sql.go#L116, and is similar to the Redis setup, in that we need the private peering VPC and install additional certs on the Cloud Run instance. ### MSP runtime `service.Contract` now has a helper, `GetPostgreSQLDB(database)`, for generating the appropriate configuration for creating a connection to a given database and returning a `sql.DB`, which most libraries have adapters for. The helper sets up `pgx.ConnConfig` that uses workload identity to connect directly to Cloud SQL, following the guide here: https://github.com/GoogleCloudPlatform/cloud-sql-go-connector?tab=readme-ov-file#automatic-iam-database-authentication In local dev, `PGDSN` can be used to hardcode an appropriate value. ### `msp-example` I've moved the MSP example from #56846 to the top-level `cmd/msp-example,` and set up some guidance for publishing it. This service now also includes a simple database connection and setup using Gorm, used by https://github.com/sourcegraph/accounts.sourcegraph.com, and can be used for testing, e.g. https://github.com/sourcegraph/managed-services/pull/87 ## Test plan - [x] Deploy https://github.com/sourcegraph/managed-services/pull/87, which will connect to the database and set up some tables - [x] Review diff: https://github.com/sourcegraph/managed-services/actions/runs/6951246277 - [x] Tear down database in https://github.com/sourcegraph/managed-services/pull/87, with caveat: requires state surgery. Should be rare enough (we might prefer to tear down environments entirely) - see docstrings in package `postgresqlroles` --------- Co-authored-by: Michael Lin <mlzc@hey.com> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-11-22 23:32:53 +00:00
)
go_repository(
name = "com_github_microsoft_go_winio",
build_file_proto_mode = "disable_global",
importpath = "github.com/Microsoft/go-winio",
sum = "h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=",
version = "v0.6.1",
)
go_repository(
name = "com_github_microsoft_hcsshim",
build_file_proto_mode = "disable_global",
importpath = "github.com/Microsoft/hcsshim",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8=",
version = "v0.11.4",
)
go_repository(
name = "com_github_miekg_dns",
build_file_proto_mode = "disable_global",
importpath = "github.com/miekg/dns",
sum = "h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA=",
version = "v1.1.50",
)
go_repository(
name = "com_github_minio_asm2plan9s",
build_file_proto_mode = "disable_global",
importpath = "github.com/minio/asm2plan9s",
sum = "h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs=",
version = "v0.0.0-20200509001527-cdd76441f9d8",
)
go_repository(
name = "com_github_minio_c2goasm",
build_file_proto_mode = "disable_global",
importpath = "github.com/minio/c2goasm",
sum = "h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI=",
version = "v0.0.0-20190812172519-36a3d3bbc4f3",
)
go_repository(
name = "com_github_mitchellh_cli",
build_file_proto_mode = "disable_global",
importpath = "github.com/mitchellh/cli",
sum = "h1:tEElEatulEHDeedTxwckzyYMA5c86fbmNIUL1hBIiTg=",
version = "v1.1.0",
)
go_repository(
name = "com_github_mitchellh_colorstring",
build_file_proto_mode = "disable_global",
importpath = "github.com/mitchellh/colorstring",
sum = "h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ=",
version = "v0.0.0-20190213212951-d06e56a500db",
)
go_repository(
name = "com_github_mitchellh_copystructure",
build_file_proto_mode = "disable_global",
importpath = "github.com/mitchellh/copystructure",
sum = "h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=",
version = "v1.2.0",
)
go_repository(
name = "com_github_mitchellh_go_homedir",
build_file_proto_mode = "disable_global",
importpath = "github.com/mitchellh/go-homedir",
sum = "h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=",
version = "v1.1.0",
)
go_repository(
name = "com_github_mitchellh_go_testing_interface",
build_file_proto_mode = "disable_global",
importpath = "github.com/mitchellh/go-testing-interface",
sum = "h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=",
version = "v1.0.0",
)
go_repository(
name = "com_github_mitchellh_go_wordwrap",
build_file_proto_mode = "disable_global",
importpath = "github.com/mitchellh/go-wordwrap",
sum = "h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=",
version = "v1.0.1",
)
go_repository(
name = "com_github_mitchellh_gox",
build_file_proto_mode = "disable_global",
importpath = "github.com/mitchellh/gox",
sum = "h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc=",
version = "v0.4.0",
)
go_repository(
name = "com_github_mitchellh_hashstructure",
build_file_proto_mode = "disable_global",
importpath = "github.com/mitchellh/hashstructure",
sum = "h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0=",
version = "v1.1.0",
)
go_repository(
name = "com_github_mitchellh_hashstructure_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/mitchellh/hashstructure/v2",
sum = "h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=",
version = "v2.0.2",
)
go_repository(
name = "com_github_mitchellh_iochan",
build_file_proto_mode = "disable_global",
importpath = "github.com/mitchellh/iochan",
sum = "h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY=",
version = "v1.0.0",
)
go_repository(
name = "com_github_mitchellh_mapstructure",
build_file_proto_mode = "disable_global",
importpath = "github.com/mitchellh/mapstructure",
sum = "h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY=",
version = "v1.5.1-0.20220423185008-bf980b35cac4",
)
go_repository(
name = "com_github_mitchellh_osext",
build_file_proto_mode = "disable_global",
importpath = "github.com/mitchellh/osext",
sum = "h1:2+myh5ml7lgEU/51gbeLHfKGNfgEQQIWrlbdaOsidbQ=",
version = "v0.0.0-20151018003038-5e2d6d41470f",
)
go_repository(
name = "com_github_mitchellh_reflectwalk",
build_file_proto_mode = "disable_global",
importpath = "github.com/mitchellh/reflectwalk",
sum = "h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=",
version = "v1.0.2",
)
go_repository(
name = "com_github_mmcloughlin_avo",
build_file_proto_mode = "disable_global",
importpath = "github.com/mmcloughlin/avo",
sum = "h1:nAco9/aI9Lg2kiuROBY6BhCI/z0t5jEvJfjWbL8qXLU=",
version = "v0.5.0",
)
go_repository(
name = "com_github_moby_buildkit",
build_file_proto_mode = "disable_global",
importpath = "github.com/moby/buildkit",
sum = "h1:RNHH1l3HDhYyZafr5EgstEu8aGNCwyfvMtrQDtjH9T0=",
version = "v0.12.5",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_moby_docker_image_spec",
build_file_proto_mode = "disable_global",
importpath = "github.com/moby/docker-image-spec",
sum = "h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=",
version = "v1.3.1",
)
go_repository(
name = "com_github_moby_locker",
build_file_proto_mode = "disable_global",
importpath = "github.com/moby/locker",
sum = "h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg=",
version = "v1.0.1",
)
go_repository(
name = "com_github_moby_patternmatcher",
build_file_proto_mode = "disable_global",
importpath = "github.com/moby/patternmatcher",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=",
version = "v0.6.0",
)
go_repository(
name = "com_github_moby_spdystream",
build_file_proto_mode = "disable_global",
importpath = "github.com/moby/spdystream",
sum = "h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8=",
version = "v0.2.0",
)
go_repository(
name = "com_github_moby_sys_mount",
build_file_proto_mode = "disable_global",
importpath = "github.com/moby/sys/mount",
sum = "h1:fX1SVkXFJ47XWDoeFW4Sq7PdQJnV2QIDZAqjNqgEjUs=",
version = "v0.3.3",
)
go_repository(
name = "com_github_moby_sys_mountinfo",
build_file_proto_mode = "disable_global",
importpath = "github.com/moby/sys/mountinfo",
sum = "h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78=",
version = "v0.6.2",
)
go_repository(
name = "com_github_moby_sys_sequential",
build_file_proto_mode = "disable_global",
importpath = "github.com/moby/sys/sequential",
sum = "h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc=",
version = "v0.5.0",
)
go_repository(
name = "com_github_moby_sys_signal",
build_file_proto_mode = "disable_global",
importpath = "github.com/moby/sys/signal",
sum = "h1:25RW3d5TnQEoKvRbEKUGay6DCQ46IxAVTT9CUMgmsSI=",
version = "v0.7.0",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_moby_sys_user",
build_file_proto_mode = "disable_global",
importpath = "github.com/moby/sys/user",
sum = "h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg=",
version = "v0.1.0",
)
go_repository(
name = "com_github_moby_term",
build_file_proto_mode = "disable_global",
importpath = "github.com/moby/term",
sum = "h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=",
version = "v0.5.0",
)
go_repository(
name = "com_github_modern_go_concurrent",
build_file_proto_mode = "disable_global",
importpath = "github.com/modern-go/concurrent",
sum = "h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=",
version = "v0.0.0-20180306012644-bacd9c7ef1dd",
)
go_repository(
name = "com_github_modern_go_reflect2",
build_file_proto_mode = "disable_global",
importpath = "github.com/modern-go/reflect2",
sum = "h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=",
version = "v1.0.2",
)
go_repository(
name = "com_github_modocache_gover",
build_file_proto_mode = "disable_global",
importpath = "github.com/modocache/gover",
sum = "h1:8Q0qkMVC/MmWkpIdlvZgcv2o2jrlF6zqVOh7W5YHdMA=",
version = "v0.0.0-20171022184752-b58185e213c5",
)
go_repository(
name = "com_github_monochromegane_go_gitignore",
build_file_proto_mode = "disable_global",
importpath = "github.com/monochromegane/go-gitignore",
sum = "h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0=",
version = "v0.0.0-20200626010858-205db1a8cc00",
)
go_repository(
name = "com_github_montanaflynn_stats",
build_file_proto_mode = "disable_global",
importpath = "github.com/montanaflynn/stats",
sum = "h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE=",
version = "v0.7.1",
)
go_repository(
name = "com_github_morikuni_aec",
build_file_proto_mode = "disable_global",
importpath = "github.com/morikuni/aec",
sum = "h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=",
version = "v1.0.0",
)
go_repository(
name = "com_github_mostynb_go_grpc_compression",
build_file_proto_mode = "disable_global",
importpath = "github.com/mostynb/go-grpc-compression",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:42/BKWMy0KEJGSdWvzqIyOZ95YcR9mLPqKctH7Uo//I=",
version = "v1.2.3",
)
go_repository(
name = "com_github_mpvl_unique",
build_file_proto_mode = "disable_global",
importpath = "github.com/mpvl/unique",
sum = "h1:D5x39vF5KCwKQaw+OC9ZPiLVHXz3UFw2+psEX+gYcto=",
version = "v0.0.0-20150818121801-cbe035fff7de",
)
executors/multi-queue: implement queue selection fairness (#53013) - Closes https://github.com/sourcegraph/sourcegraph/issues/50642 - Depends on https://github.com/sourcegraph/sourcegraph/pull/53012 This PR adds a dequeue limit for each queue with a sliding window in which the amount of dequeues are evaluated. The dequeues are stored in a Redis cache. Once the final list of candidate queues is established, a queue is chosen randomly according to the configured weights. ### Unknowns All of these are currently arbitarily picked: - ~What should the window size be? Currently set to 5 minutes.~ ✅ configurable as env var - ~What should the dequeue limits in a window be? Currently set to 50 for `batches`, 250 for `codeintel`.~ ✅ configurable in site config - ~What should the weights for the queues be? Currently set to 4 for `batches`, 1 for `codeintel` (`batches` should probably be prioritised).~ ✅ configurable in site config - ~Where should the janitor job be registered to clean up stale cache entries? The routine should have access to the `*rcache.Cache`, unless there's some way of getting an existing cache that I'm not aware of?~ ### TODO - ~Make the parameters configurable. Perhaps keep it undocumented for now.~ ✅ Configurable as env vars and site config ### Dequeue flow chart ![243180731-a04773f0-346f-4463-9877-d95c7e2053cc](https://github.com/sourcegraph/sourcegraph/assets/2979513/f7bad466-6752-47e5-899a-9ae48ab53918) ## Test plan Unit tests <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> --------- Co-authored-by: Randell Callahan <piszmogcode@gmail.com>
2023-07-03 10:28:36 +00:00
go_repository(
name = "com_github_mroth_weightedrand_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/mroth/weightedrand/v2",
sum = "h1:zrEVDIaau/E4QLOKu02kpg8T8myweFlMGikIgbIdrRA=",
version = "v2.0.1",
)
go_repository(
name = "com_github_mschoch_smat",
build_file_proto_mode = "disable_global",
importpath = "github.com/mschoch/smat",
sum = "h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM=",
version = "v0.2.0",
)
go_repository(
name = "com_github_muesli_ansi",
build_file_proto_mode = "disable_global",
importpath = "github.com/muesli/ansi",
sum = "h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI=",
version = "v0.0.0-20230316100256-276c6243b2f6",
)
go_repository(
name = "com_github_muesli_cancelreader",
build_file_proto_mode = "disable_global",
importpath = "github.com/muesli/cancelreader",
sum = "h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=",
version = "v0.2.2",
)
go_repository(
name = "com_github_muesli_reflow",
build_file_proto_mode = "disable_global",
importpath = "github.com/muesli/reflow",
sum = "h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=",
version = "v0.3.0",
)
go_repository(
name = "com_github_muesli_termenv",
build_file_proto_mode = "disable_global",
importpath = "github.com/muesli/termenv",
sum = "h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo=",
version = "v0.15.2",
)
go_repository(
name = "com_github_munnerz_goautoneg",
build_file_proto_mode = "disable_global",
importpath = "github.com/munnerz/goautoneg",
sum = "h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=",
version = "v0.0.0-20191010083416-a7dc8b61c822",
)
go_repository(
name = "com_github_mwitkow_go_conntrack",
build_file_proto_mode = "disable_global",
importpath = "github.com/mwitkow/go-conntrack",
sum = "h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=",
version = "v0.0.0-20190716064945-2f068394615f",
)
go_repository(
name = "com_github_mwitkow_go_proto_validators",
build_file_proto_mode = "disable_global",
importpath = "github.com/mwitkow/go-proto-validators",
sum = "h1:qRlmpTzm2pstMKKzTdvwPCF5QfBNURSlAgN/R+qbKos=",
version = "v0.3.2",
)
go_repository(
name = "com_github_mxk_go_flowrate",
build_file_proto_mode = "disable_global",
importpath = "github.com/mxk/go-flowrate",
sum = "h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=",
version = "v0.0.0-20140419014527-cca7078d478f",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_natefinch_wrap",
build_file_proto_mode = "disable_global",
importpath = "github.com/natefinch/wrap",
sum = "h1:IXzc/pw5KqxJv55gV0lSOcKHYuEZPGbQrOOXr/bamRk=",
version = "v0.2.0",
)
go_repository(
name = "com_github_nats_io_nats_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/nats-io/nats.go",
sum = "h1:/WFBHEc/dOKBF6qf1TZhrdEfTmOZ5JzdJ+Y3m6Y/p7E=",
version = "v1.31.0",
)
go_repository(
name = "com_github_nats_io_nkeys",
build_file_proto_mode = "disable_global",
importpath = "github.com/nats-io/nkeys",
sum = "h1:IzVe95ru2CT6ta874rt9saQRkWfe2nFj1NtvYSLqMzY=",
version = "v0.4.6",
)
go_repository(
name = "com_github_nats_io_nuid",
build_file_proto_mode = "disable_global",
importpath = "github.com/nats-io/nuid",
sum = "h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=",
version = "v1.0.1",
)
go_repository(
name = "com_github_ncruces_go_strftime",
build_file_proto_mode = "disable_global",
importpath = "github.com/ncruces/go-strftime",
sum = "h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=",
version = "v0.1.9",
)
go_repository(
name = "com_github_ncw_swift",
build_file_proto_mode = "disable_global",
importpath = "github.com/ncw/swift",
sum = "h1:4DQRPj35Y41WogBxyhOXlrI37nzGlyEcsforeudyYPQ=",
version = "v1.0.47",
)
go_repository(
name = "com_github_neelance_astrewrite",
build_file_proto_mode = "disable_global",
importpath = "github.com/neelance/astrewrite",
sum = "h1:D6paGObi5Wud7xg83MaEFyjxQB1W5bz5d0IFppr+ymk=",
version = "v0.0.0-20160511093645-99348263ae86",
)
go_repository(
name = "com_github_neelance_sourcemap",
build_file_proto_mode = "disable_global",
importpath = "github.com/neelance/sourcemap",
sum = "h1:bY6ktFuJkt+ZXkX0RChQch2FtHpWQLVS8Qo1YasiIVk=",
version = "v0.0.0-20200213170602-2833bce08e4c",
)
go_repository(
name = "com_github_niemeyer_pretty",
build_file_proto_mode = "disable_global",
importpath = "github.com/niemeyer/pretty",
sum = "h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=",
version = "v0.0.0-20200227124842-a10e7caefd8e",
)
go_repository(
name = "com_github_nightlyone_lockfile",
build_file_proto_mode = "disable_global",
importpath = "github.com/nightlyone/lockfile",
sum = "h1:RHep2cFKK4PonZJDdEl4GmkabuhbsRMgk/k3uAmxBiA=",
version = "v1.0.0",
)
go_repository(
name = "com_github_nishanths_predeclared",
build_file_proto_mode = "disable_global",
importpath = "github.com/nishanths/predeclared",
sum = "h1:3f0nxAmdj/VoCGN/ijdMy7bj6SBagaqYg1B0hu8clMA=",
version = "v0.0.0-20200524104333-86fad755b4d3",
)
go_repository(
name = "com_github_npillmayer_nestext",
build_file_proto_mode = "disable_global",
importpath = "github.com/npillmayer/nestext",
sum = "h1:2dkbzJ5xMcyJW5b8wwrX+nnRNvf/Nn1KwGhIauGyE2E=",
version = "v0.1.3",
)
go_repository(
name = "com_github_nu7hatch_gouuid",
build_file_proto_mode = "disable_global",
importpath = "github.com/nu7hatch/gouuid",
sum = "h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ=",
version = "v0.0.0-20131221200532-179d4d0c4d8d",
)
go_repository(
name = "com_github_nxadm_tail",
build_file_proto_mode = "disable_global",
importpath = "github.com/nxadm/tail",
sum = "h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=",
version = "v1.4.11",
)
go_repository(
name = "com_github_nytimes_gziphandler",
build_file_proto_mode = "disable_global",
importpath = "github.com/NYTimes/gziphandler",
sum = "h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=",
version = "v1.1.1",
)
go_repository(
name = "com_github_oklog_run",
build_file_proto_mode = "disable_global",
importpath = "github.com/oklog/run",
sum = "h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA=",
version = "v1.1.0",
)
go_repository(
name = "com_github_oklog_ulid",
build_file_proto_mode = "disable_global",
importpath = "github.com/oklog/ulid",
sum = "h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=",
version = "v1.3.1",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_oklog_ulid_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/oklog/ulid/v2",
sum = "h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU=",
version = "v2.1.0",
)
go_repository(
name = "com_github_olekukonko_tablewriter",
build_file_proto_mode = "disable_global",
importpath = "github.com/olekukonko/tablewriter",
sum = "h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=",
version = "v0.0.5",
)
go_repository(
name = "com_github_oneofone_xxhash",
build_file_proto_mode = "disable_global",
importpath = "github.com/OneOfOne/xxhash",
sum = "h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=",
version = "v1.2.2",
)
go_repository(
name = "com_github_onsi_ginkgo",
build_file_proto_mode = "disable_global",
importpath = "github.com/onsi/ginkgo",
sum = "h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=",
version = "v1.16.5",
)
go_repository(
name = "com_github_onsi_ginkgo_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/onsi/ginkgo/v2",
sum = "h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY=",
version = "v2.14.0",
)
go_repository(
name = "com_github_onsi_gomega",
build_file_proto_mode = "disable_global",
importpath = "github.com/onsi/gomega",
sum = "h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=",
version = "v1.30.0",
)
go_repository(
name = "com_github_opencontainers_go_digest",
build_file_proto_mode = "disable_global",
importpath = "github.com/opencontainers/go-digest",
sum = "h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=",
version = "v1.0.0",
)
go_repository(
name = "com_github_opencontainers_image_spec",
build_file_proto_mode = "disable_global",
importpath = "github.com/opencontainers/image-spec",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=",
version = "v1.1.0",
)
go_repository(
name = "com_github_opencontainers_runc",
build_file_proto_mode = "disable_global",
importpath = "github.com/opencontainers/runc",
sum = "h1:y2EZDS8sNng4Ksf0GUYNhKbTShZJPJg1FiXJNH/uoCk=",
version = "v1.1.7",
)
go_repository(
name = "com_github_opencontainers_runtime_spec",
build_file_proto_mode = "disable_global",
importpath = "github.com/opencontainers/runtime-spec",
sum = "h1:ucBtEms2tamYYW/SvGpvq9yUN0NEVL6oyLEwDcTSrk8=",
version = "v1.1.0-rc.2",
)
go_repository(
name = "com_github_opencontainers_selinux",
build_file_proto_mode = "disable_global",
importpath = "github.com/opencontainers/selinux",
sum = "h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=",
version = "v1.11.0",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_openfga_api_proto",
build_file_proto_mode = "disable_global",
importpath = "github.com/openfga/api/proto",
sum = "h1:tSJl/atdqsDACjRQQPCbXe2GfEvcOkhdrUNmDToAjTA=",
version = "v0.0.0-20240529184453-5b0b4941f3e0",
)
go_repository(
name = "com_github_openfga_language_pkg_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/openfga/language/pkg/go",
sum = "h1:n44DfITs+CLCYJIgsryJkG2ElwOZJ3huekPZKydPi7U=",
version = "v0.0.0-20240409225820-a53ea2892d6d",
)
go_repository(
name = "com_github_openfga_openfga",
build_file_proto_mode = "disable_global",
importpath = "github.com/openfga/openfga",
replace = "github.com/sourcegraph/openfga",
sum = "h1:0p4KNG4nvdNCHZjyoL9ju9PxttiwtPni5g5aJTldXv4=",
version = "v0.0.0-20240614204729-de6b563022de",
)
go_repository(
# This is no longer used but we keep it for backwards compatability
# tests while on 5.0.x.
name = "com_github_opentracing_contrib_go_stdlib",
build_file_proto_mode = "disable_global",
importpath = "github.com/opentracing-contrib/go-stdlib",
sum = "h1:TBS7YuVotp8myLon4Pv7BtCBzOTo1DeZCld0Z63mW2w=",
version = "v1.0.0",
) # keep
go_repository(
name = "com_github_opentracing_opentracing_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/opentracing/opentracing-go",
sum = "h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=",
version = "v1.2.0",
)
go_repository(
name = "com_github_opsgenie_opsgenie_go_sdk_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/opsgenie/opsgenie-go-sdk-v2",
sum = "h1:0h+YoXSyipf6XQGyIaDg6z5jwRik1JSm+sQetnD7vGY=",
version = "v1.2.22",
)
requestclient: add country-level geolocation data (#58386) This change adds country-level geolocation data to `requestclient` as discussed [here](https://sourcegraph.slack.com/archives/C01PQEVJ5A9/p1700078374822459?thread_ts=1694717740.084639&cid=C01PQEVJ5A9), provided as a 2- or 3-character ISO 3166-1 country code that seems pretty widely used. The inference strategy goes: 1. If we are behind Cloudflare, we trust [Cloudflare's originating country data](https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#cf-ipcountry) and use it as-is 2. If a `Forwarded-For` exists, we look up the first `(*requestclient.Client).Forwarded-For` address in the embedded IP geolocation database 3. Otherwise, we look up `(*requestclient.Client).IP` in the embedded IP geolocation database WE use [DB-IP.com](https://db-ip.com/)'s ["IP to Country Lite" database](https://db-ip.com/db/download/ip-to-country-lite) which includes only country-level data, is free, and allows redistribution with attribution (see docs included in PR). It clocks in at ~8MB, which seems manageable for embedding. Lookup performance looks okay with a trivial benchmark, and we cache the inferred country code in `*requestclient.Client` so that it only gets evaluated once: ``` goos: darwin goarch: arm64 pkg: github.com/sourcegraph/sourcegraph/internal/requestclient/geolocation BenchmarkInferCountryCode-10 2359490 906.9 ns/op 34 B/op 3 allocs/op ``` This change also adds this new data to request client `LogFields`. https://github.com/sourcegraph/sourcegraph/pull/58388 adds this to telemetry events as well. ## Test plan Unit tests
2023-11-22 22:51:48 +00:00
go_repository(
name = "com_github_oschwald_maxminddb_golang",
build_file_proto_mode = "disable_global",
importpath = "github.com/oschwald/maxminddb-golang",
sum = "h1:9FnTOD0YOhP7DGxGsq4glzpGy5+w7pq50AS6wALUMYs=",
version = "v1.12.0",
)
go_repository(
name = "com_github_ovh_go_ovh",
build_file_proto_mode = "disable_global",
importpath = "github.com/ovh/go-ovh",
sum = "h1:bHXZmw8nTgZin4Nv7JuaLs0KG5x54EQR7migYTd1zrk=",
version = "v1.1.0",
)
go_repository(
name = "com_github_package_url_packageurl_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/package-url/packageurl-go",
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
sum = "h1:0H2DQt6DHd/NeRlVwW4EZ4oEI6Bn40XlNPRqegcxuo4=",
version = "v0.1.2",
)
go_repository(
name = "com_github_pascaldekloe_goe",
build_file_proto_mode = "disable_global",
importpath = "github.com/pascaldekloe/goe",
sum = "h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=",
version = "v0.1.0",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_paulmach_orb",
build_file_proto_mode = "disable_global",
importpath = "github.com/paulmach/orb",
sum = "h1:guVYVqzxHE/CQ1KpfGO077TR0ATHSNjp4s6XGLn3W9s=",
version = "v0.10.0",
)
go_repository(
name = "com_github_pborman_getopt",
build_file_proto_mode = "disable_global",
importpath = "github.com/pborman/getopt",
sum = "h1:BHT1/DKsYDGkUgQ2jmMaozVcdk+sVfz0+1ZJq4zkWgw=",
version = "v0.0.0-20170112200414-7148bc3a4c30",
)
go_repository(
name = "com_github_pelletier_go_toml",
build_file_proto_mode = "disable_global",
importpath = "github.com/pelletier/go-toml",
sum = "h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=",
version = "v1.9.5",
)
go_repository(
name = "com_github_pelletier_go_toml_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/pelletier/go-toml/v2",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI=",
version = "v2.1.1",
)
go_repository(
name = "com_github_peterbourgon_diskv",
build_file_proto_mode = "disable_global",
importpath = "github.com/peterbourgon/diskv",
sum = "h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=",
version = "v2.0.1+incompatible",
)
go_repository(
name = "com_github_peterbourgon_ff",
build_file_proto_mode = "disable_global",
importpath = "github.com/peterbourgon/ff",
sum = "h1:xt1lxTG+Nr2+tFtysY7abFgPoH3Lug8CwYJMOmJRXhk=",
version = "v1.7.1",
)
go_repository(
name = "com_github_peterbourgon_ff_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/peterbourgon/ff/v3",
sum = "h1:2J07/5/36kd9HYVt42Zve0xCeQ+LLRIvoKrt6sAZXJ4=",
version = "v3.3.2",
)
go_repository(
name = "com_github_peterhellberg_link",
build_file_proto_mode = "disable_global",
importpath = "github.com/peterhellberg/link",
sum = "h1:s2+RH8EGuI/mI4QwrWGSYQCRz7uNgip9BaM04HKu5kc=",
version = "v1.1.0",
)
go_repository(
name = "com_github_phpdave11_gofpdf",
build_file_proto_mode = "disable_global",
importpath = "github.com/phpdave11/gofpdf",
sum = "h1:KPKiIbfwbvC/wOncwhrpRdXVj2CZTCFlw4wnoyjtHfQ=",
version = "v1.4.2",
)
go_repository(
name = "com_github_phpdave11_gofpdi",
build_file_proto_mode = "disable_global",
importpath = "github.com/phpdave11/gofpdi",
sum = "h1:o61duiW8M9sMlkVXWlvP92sZJtGKENvW3VExs6dZukQ=",
version = "v1.0.13",
)
go_repository(
name = "com_github_pierrec_lz4",
build_file_proto_mode = "disable_global",
importpath = "github.com/pierrec/lz4",
sum = "h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I=",
version = "v2.0.5+incompatible",
)
go_repository(
name = "com_github_pierrec_lz4_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/pierrec/lz4/v4",
sum = "h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ=",
version = "v4.1.21",
)
go_repository(
name = "com_github_pingcap_errors",
build_file_proto_mode = "disable_global",
importpath = "github.com/pingcap/errors",
sum = "h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=",
version = "v0.11.4",
)
go_repository(
name = "com_github_pjbgf_sha1cd",
build_file_proto_mode = "disable_global",
importpath = "github.com/pjbgf/sha1cd",
sum = "h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=",
version = "v0.3.0",
)
go_repository(
name = "com_github_pkg_browser",
build_file_proto_mode = "disable_global",
importpath = "github.com/pkg/browser",
sum = "h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=",
version = "v0.0.0-20210911075715-681adbf594b8",
)
go_repository(
name = "com_github_pkg_diff",
build_file_proto_mode = "disable_global",
importpath = "github.com/pkg/diff",
sum = "h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A=",
version = "v0.0.0-20210226163009-20ebb0f2a09e",
)
go_repository(
name = "com_github_pkg_errors",
build_file_proto_mode = "disable_global",
importpath = "github.com/pkg/errors",
sum = "h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=",
version = "v0.9.1",
)
go_repository(
name = "com_github_pkg_profile",
build_file_proto_mode = "disable_global",
importpath = "github.com/pkg/profile",
sum = "h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA=",
version = "v1.7.0",
)
go_repository(
name = "com_github_pkg_sftp",
build_file_proto_mode = "disable_global",
importpath = "github.com/pkg/sftp",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:JFZT4XbOU7l77xGSpOdW+pwIMqP044IyjXX6FGyEKFo=",
version = "v1.13.6",
)
go_repository(
name = "com_github_pkoukk_tiktoken_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/pkoukk/tiktoken-go",
Add Support for Counting Tokens for Azure Code and Update in Redis (#63100) Description: This PR introduces support for counting tokens within the Azure code and updating these counts in Redis. The token counting logic is embedded directly in the Azure code rather than using a standardized point for all token counting logic. Reasoning: • Azure does not currently support obtaining token usage from their streaming endpoint, unlike OpenAI. • To enable immediate functionality, the token counting logic is placed within the Azure code itself. • The implementation supports GPT-4o. Future Considerations: • When Azure eventually adds support for token usage from the streaming endpoint, we will migrate to using Azure’s built-in capabilities. • This will ensure full utilization of Azure OpenAI features as they achieve parity with OpenAI. Changes: • Added token counting logic to the Azure code. • Updated Redis with the token counts. Testing: • Verified the implementation works with GPT-4o. Conclusion: This is a temporary solution to enable token counting in Azure. We will adapt our approach as Azure enhances its feature set to include token usage from their streaming endpoint. ## Test plan Tested locally with debugger <!-- All pull requests REQUIRE a test plan: https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles --> ## Changelog <!-- 1. Ensure your pull request title is formatted as: $type($domain): $what 2. Add bullet list items for each additional detail you want to cover (see example below) 3. You can edit this after the pull request was merged, as long as release shipping it hasn't been promoted to the public. 4. For more information, please see this how-to https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c? Audience: TS/CSE > Customers > Teammates (in that order). Cheat sheet: $type = chore|fix|feat $domain: source|search|ci|release|plg|cody|local|... --> <!-- Example: Title: fix(search): parse quotes with the appropriate context Changelog section: ## Changelog - When a quote is used with regexp pattern type, then ... - Refactored underlying code. -->
2024-06-28 12:37:53 +00:00
sum = "h1:qOBHXX4PHtvIvmOtyg1EeKlwFRiMKAcoMp4Q+bLQDmw=",
version = "v0.1.7",
)
go_repository(
name = "com_github_pkoukk_tiktoken_go_loader",
build_file_proto_mode = "disable_global",
importpath = "github.com/pkoukk/tiktoken-go-loader",
Add Support for Counting Tokens for Azure Code and Update in Redis (#63100) Description: This PR introduces support for counting tokens within the Azure code and updating these counts in Redis. The token counting logic is embedded directly in the Azure code rather than using a standardized point for all token counting logic. Reasoning: • Azure does not currently support obtaining token usage from their streaming endpoint, unlike OpenAI. • To enable immediate functionality, the token counting logic is placed within the Azure code itself. • The implementation supports GPT-4o. Future Considerations: • When Azure eventually adds support for token usage from the streaming endpoint, we will migrate to using Azure’s built-in capabilities. • This will ensure full utilization of Azure OpenAI features as they achieve parity with OpenAI. Changes: • Added token counting logic to the Azure code. • Updated Redis with the token counts. Testing: • Verified the implementation works with GPT-4o. Conclusion: This is a temporary solution to enable token counting in Azure. We will adapt our approach as Azure enhances its feature set to include token usage from their streaming endpoint. ## Test plan Tested locally with debugger <!-- All pull requests REQUIRE a test plan: https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles --> ## Changelog <!-- 1. Ensure your pull request title is formatted as: $type($domain): $what 2. Add bullet list items for each additional detail you want to cover (see example below) 3. You can edit this after the pull request was merged, as long as release shipping it hasn't been promoted to the public. 4. For more information, please see this how-to https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c? Audience: TS/CSE > Customers > Teammates (in that order). Cheat sheet: $type = chore|fix|feat $domain: source|search|ci|release|plg|cody|local|... --> <!-- Example: Title: fix(search): parse quotes with the appropriate context Changelog section: ## Changelog - When a quote is used with regexp pattern type, then ... - Refactored underlying code. -->
2024-06-28 12:37:53 +00:00
sum = "h1:Sp8yiuxsitkmCfEvUnmNf8wzuZwlGNkRjI2yF0C3QUQ=",
version = "v0.0.2-0.20240522064338-c17e8bc0f699",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "com_github_playwright_community_playwright_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/playwright-community/playwright-go",
sum = "h1:2JViSHpJQ/UL/PO1Gg6gXV5IcXAAsoBJ3KG9L3wKXto=",
version = "v0.2000.1",
)
go_repository(
name = "com_github_pmezard_go_difflib",
build_file_proto_mode = "disable_global",
importpath = "github.com/pmezard/go-difflib",
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
sum = "h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=",
version = "v1.0.1-0.20181226105442-5d4384ee4fb2",
)
go_repository(
name = "com_github_posener_complete",
build_file_proto_mode = "disable_global",
importpath = "github.com/posener/complete",
sum = "h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo=",
version = "v1.2.3",
)
go_repository(
name = "com_github_power_devops_perfstat",
build_file_proto_mode = "disable_global",
importpath = "github.com/power-devops/perfstat",
sum = "h1:0LFwY6Q3gMACTjAbMZBjXAqTOzOwFaj2Ld6cjeQ7Rig=",
version = "v0.0.0-20221212215047-62379fc7944b",
)
go_repository(
name = "com_github_pquerna_cachecontrol",
build_file_proto_mode = "disable_global",
importpath = "github.com/pquerna/cachecontrol",
sum = "h1:vBXSNuE5MYP9IJ5kjsdo8uq+w41jSPgvba2DEnkRx9k=",
version = "v0.2.0",
)
go_repository(
name = "com_github_prashantv_gostub",
build_file_proto_mode = "disable_global",
importpath = "github.com/prashantv/gostub",
sum = "h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=",
version = "v1.1.0",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_pressly_goose_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/pressly/goose/v3",
sum = "h1:uPJdOxF/Ipj7ABVNOAMJXSxwFXZGwMGHNqjC8e61VA0=",
version = "v3.20.0",
)
go_repository(
name = "com_github_prometheus_alertmanager",
build_file_proto_mode = "disable_global",
importpath = "github.com/prometheus/alertmanager",
replace = "github.com/sourcegraph/alertmanager",
chore/deps: upgrade alertmanager package dependency, improve logs and tests (#63329) Upgrades to our forked update v0.27.0, which matches the Alertmanager version we deploy: https://github.com/sourcegraph/alertmanager/commit/3695ef8bcc9a5bf22945c43067b092e79644f1f3. Upon closer inspection I also realized I upgraded `prometheus/common` too far in https://github.com/sourcegraph/sourcegraph/pull/63328 - I've downgraded it to match the revision of Alertmanager we are using, while _also_ fulfilling the OpenFGA dependency https://github.com/sourcegraph/sourcegraph/pull/63329#discussion_r1646630946 for https://github.com/sourcegraph/sourcegraph/pull/63173 💀 The latest version of `prometheus/common` marshals configuration values that are unknown to our version of Alertmanager (v0.27.0) which rejects the generated configuration from `prom-wrapper`. I've also made a few updates to improve the testing and improve the prometheus and alertmanager output by forwarding them to differently-scoped loggers and crude conversion of the log levels: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/d6e36a72-ad4f-4524-9061-89504776edfb) Related: https://github.com/sourcegraph/sourcegraph/pull/63171 Closes CORE-186 ## Test plan `sg start` and `sg run prometheus`, update some alerting configs in http://localhost:9090/alertmanager/#/status: <img src="https://github.com/sourcegraph/sourcegraph/assets/23356519/56cef853-ac39-4035-b584-57aec83e8301" width="30%"> In personal settings: ```json { "alerts.hideObservabilitySiteAlerts": false } ``` No banners show up indicating Prometheus is unhealthy.
2024-06-19 20:46:30 +00:00
sum = "h1:nculomxxOp6cfc6xYjff96kHJ1Lu2Gl/4uWj5lr/wmg=",
version = "v0.24.1-0.20240619011019-3695ef8bcc9a",
)
go_repository(
name = "com_github_prometheus_client_golang",
build_file_proto_mode = "disable_global",
importpath = "github.com/prometheus/client_golang",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE=",
version = "v1.19.1",
)
go_repository(
name = "com_github_prometheus_client_model",
build_file_proto_mode = "disable_global",
importpath = "github.com/prometheus/client_model",
sum = "h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=",
version = "v0.6.1",
)
go_repository(
name = "com_github_prometheus_common",
build_file_proto_mode = "disable_global",
importpath = "github.com/prometheus/common",
replace = "github.com/prometheus/common",
sum = "h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=",
version = "v0.48.0",
)
go_repository(
name = "com_github_prometheus_common_assets",
build_file_proto_mode = "disable_global",
importpath = "github.com/prometheus/common/assets",
sum = "h1:0P5OrzoHrYBOSM1OigWL3mY8ZvV2N4zIE/5AahrSrfM=",
version = "v0.2.0",
)
go_repository(
name = "com_github_prometheus_common_sigv4",
build_file_proto_mode = "disable_global",
importpath = "github.com/prometheus/common/sigv4",
sum = "h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4=",
version = "v0.1.0",
)
go_repository(
name = "com_github_prometheus_exporter_toolkit",
build_file_proto_mode = "disable_global",
importpath = "github.com/prometheus/exporter-toolkit",
chore/deps: upgrade alertmanager package dependency, improve logs and tests (#63329) Upgrades to our forked update v0.27.0, which matches the Alertmanager version we deploy: https://github.com/sourcegraph/alertmanager/commit/3695ef8bcc9a5bf22945c43067b092e79644f1f3. Upon closer inspection I also realized I upgraded `prometheus/common` too far in https://github.com/sourcegraph/sourcegraph/pull/63328 - I've downgraded it to match the revision of Alertmanager we are using, while _also_ fulfilling the OpenFGA dependency https://github.com/sourcegraph/sourcegraph/pull/63329#discussion_r1646630946 for https://github.com/sourcegraph/sourcegraph/pull/63173 💀 The latest version of `prometheus/common` marshals configuration values that are unknown to our version of Alertmanager (v0.27.0) which rejects the generated configuration from `prom-wrapper`. I've also made a few updates to improve the testing and improve the prometheus and alertmanager output by forwarding them to differently-scoped loggers and crude conversion of the log levels: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/d6e36a72-ad4f-4524-9061-89504776edfb) Related: https://github.com/sourcegraph/sourcegraph/pull/63171 Closes CORE-186 ## Test plan `sg start` and `sg run prometheus`, update some alerting configs in http://localhost:9090/alertmanager/#/status: <img src="https://github.com/sourcegraph/sourcegraph/assets/23356519/56cef853-ac39-4035-b584-57aec83e8301" width="30%"> In personal settings: ```json { "alerts.hideObservabilitySiteAlerts": false } ``` No banners show up indicating Prometheus is unhealthy.
2024-06-19 20:46:30 +00:00
sum = "h1:yNTsuZ0aNCNFQ3aFTD2uhPOvr4iD7fdBvKPAEGkNf+g=",
version = "v0.11.0",
)
go_repository(
name = "com_github_prometheus_procfs",
build_file_proto_mode = "disable_global",
importpath = "github.com/prometheus/procfs",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=",
version = "v0.15.1",
)
go_repository(
name = "com_github_prometheus_prometheus",
build_file_proto_mode = "disable_global",
importpath = "github.com/prometheus/prometheus",
sum = "h1:wmk5yNrQlkQ2OvZucMhUB4k78AVfG34szb1UtopS8Vc=",
version = "v0.40.5",
)
go_repository(
name = "com_github_prometheus_statsd_exporter",
build_file_proto_mode = "disable_global",
importpath = "github.com/prometheus/statsd_exporter",
sum = "h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0=",
version = "v0.22.7",
)
go_repository(
name = "com_github_prometheus_tsdb",
build_file_proto_mode = "disable_global",
importpath = "github.com/prometheus/tsdb",
sum = "h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=",
version = "v0.7.1",
)
go_repository(
name = "com_github_protocolbuffers_txtpbfmt",
build_file_proto_mode = "disable_global",
importpath = "github.com/protocolbuffers/txtpbfmt",
sum = "h1:gSVONBi2HWMFXCa9jFdYvYk7IwW/mTLxWOF7rXS4LO0=",
version = "v0.0.0-20201118171849-f6a6b3f636fc",
)
go_repository(
name = "com_github_protonmail_go_crypto",
build_file_proto_mode = "disable_global",
importpath = "github.com/ProtonMail/go-crypto",
sum = "h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78=",
version = "v1.0.0",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "com_github_psanford_memfs",
build_file_proto_mode = "disable_global",
importpath = "github.com/psanford/memfs",
sum = "h1:51xcRlSMBU5rhM9KahnJGfEsBPVPz3182TgFRowA8yY=",
version = "v0.0.0-20230130182539-4dbf7e3e865e",
)
go_repository(
name = "com_github_pseudomuto_protoc_gen_doc",
build_file_proto_mode = "disable_global",
importpath = "github.com/pseudomuto/protoc-gen-doc",
sum = "h1:Ah259kcrio7Ix1Rhb6u8FCaOkzf9qRBqXnvAufg061w=",
version = "v1.5.1",
)
go_repository(
name = "com_github_pseudomuto_protokit",
build_file_proto_mode = "disable_global",
importpath = "github.com/pseudomuto/protokit",
sum = "h1:kCYpE3thoR6Esm0CUvd5xbrDTOZPvQPTDeyXpZfrJdk=",
version = "v0.2.1",
)
go_repository(
name = "com_github_puerkitobio_goquery",
build_file_proto_mode = "disable_global",
importpath = "github.com/PuerkitoBio/goquery",
sum = "h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=",
version = "v1.8.1",
)
go_repository(
name = "com_github_puerkitobio_purell",
build_file_proto_mode = "disable_global",
importpath = "github.com/PuerkitoBio/purell",
sum = "h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=",
version = "v1.1.1",
)
go_repository(
name = "com_github_puerkitobio_rehttp",
build_file_proto_mode = "disable_global",
importpath = "github.com/PuerkitoBio/rehttp",
sum = "h1:JFZ7OeK+hbJpTxhNB0NDZT47AuXqCU0Smxfjtph7/Rs=",
version = "v1.1.0",
)
go_repository(
name = "com_github_puerkitobio_urlesc",
build_file_proto_mode = "disable_global",
importpath = "github.com/PuerkitoBio/urlesc",
sum = "h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=",
version = "v0.0.0-20170810143723-de5bf2ad4578",
)
go_repository(
name = "com_github_qustavo_sqlhooks_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/qustavo/sqlhooks/v2",
sum = "h1:54yBemHnGHp/7xgT+pxwmIlMSDNYKx5JW5dfRAiCZi0=",
version = "v2.1.0",
)
go_repository(
# This is no longer used but we keep it for backwards compatability
# tests while on 5.0.x.
name = "com_github_rafaeljusto_redigomock",
build_file_proto_mode = "disable_global",
importpath = "github.com/rafaeljusto/redigomock",
sum = "h1:d7uo5MVINMxnRr20MxbgDkmZ8QRfevjOVgEa4n0OZyY=",
version = "v2.4.0+incompatible",
) # keep
go_repository(
name = "com_github_rafaeljusto_redigomock_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/rafaeljusto/redigomock/v3",
sum = "h1:B4Y0XJQiPjpwYmkH55aratKX1VfR+JRqzmDKyZbC99o=",
version = "v3.1.2",
)
go_repository(
name = "com_github_rainycape_unidecode",
build_file_proto_mode = "disable_global",
importpath = "github.com/rainycape/unidecode",
sum = "h1:ta7tUOvsPHVHGom5hKW5VXNc2xZIkfCKP8iaqOyYtUQ=",
version = "v0.0.0-20150907023854-cb7f23ec59be",
)
go_repository(
name = "com_github_redis_go_redis_extra_rediscmd_v9",
build_file_proto_mode = "disable_global",
importpath = "github.com/redis/go-redis/extra/rediscmd/v9",
sum = "h1:EaDatTxkdHG+U3Bk4EUr+DZ7fOGwTfezUiUJMaIcaho=",
version = "v9.0.5",
)
go_repository(
name = "com_github_redis_go_redis_extra_redisotel_v9",
build_file_proto_mode = "disable_global",
importpath = "github.com/redis/go-redis/extra/redisotel/v9",
sum = "h1:EfpWLLCyXw8PSM2/XNJLjI3Pb27yVE+gIAfeqp8LUCc=",
version = "v9.0.5",
)
go_repository(
name = "com_github_redis_go_redis_v9",
build_file_proto_mode = "disable_global",
importpath = "github.com/redis/go-redis/v9",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:fOAp1/uJG+ZtcITgZOfYFmTKPE7n4Vclj1wZFgRciUU=",
version = "v9.5.3",
)
go_repository(
name = "com_github_redis_rueidis",
build_file_proto_mode = "disable_global",
importpath = "github.com/redis/rueidis",
sum = "h1:s65oWtotzlIFN8eMPhyYwxlwLR1lUdhza2KtWprKYSo=",
version = "v1.0.19",
)
go_repository(
name = "com_github_remyoudompheng_bigfft",
build_file_proto_mode = "disable_global",
importpath = "github.com/remyoudompheng/bigfft",
sum = "h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=",
version = "v0.0.0-20230129092748-24d4a6f8daec",
)
go_repository(
name = "com_github_rhnvrm_simples3",
build_file_proto_mode = "disable_global",
importpath = "github.com/rhnvrm/simples3",
sum = "h1:H0DJwybR6ryQE+Odi9eqkHuzjYAeJgtGcGtuBwOhsH8=",
version = "v0.6.1",
)
go_repository(
name = "com_github_rickb777_date",
build_file_proto_mode = "disable_global",
importpath = "github.com/rickb777/date",
sum = "h1:FS47C+yEMgIPE2ZUA67ekpU1CZXMSliHkeB/V+ZFUg4=",
version = "v1.14.3",
)
go_repository(
name = "com_github_rickb777_plural",
build_file_proto_mode = "disable_global",
importpath = "github.com/rickb777/plural",
sum = "h1:4CU5NiUqXSM++2+7JCrX+oguXd2D7RY5O1YisMw1yCI=",
version = "v1.2.2",
)
go_repository(
name = "com_github_rivo_uniseg",
build_file_proto_mode = "disable_global",
importpath = "github.com/rivo/uniseg",
sum = "h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=",
version = "v0.4.7",
)
go_repository(
name = "com_github_rjeczalik_notify",
build_file_proto_mode = "disable_global",
importpath = "github.com/rjeczalik/notify",
2023-01-31 18:02:34 +00:00
sum = "h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZeY=",
version = "v0.9.3",
)
go_repository(
name = "com_github_roaringbitmap_roaring",
build_file_proto_mode = "disable_global",
importpath = "github.com/RoaringBitmap/roaring",
sum = "h1:yhEIoH4YezLYT04s1nHehNO64EKFTop/wBhxv2QzDdQ=",
version = "v1.9.4",
)
go_repository(
name = "com_github_robert_nix_ansihtml",
build_file_proto_mode = "disable_global",
importpath = "github.com/robert-nix/ansihtml",
sum = "h1:VTiyQ6/+AxSJoSSLsMecnkh8i0ZqOEdiRl/odOc64fc=",
version = "v1.0.1",
)
go_repository(
name = "com_github_rogpeppe_fastuuid",
build_file_proto_mode = "disable_global",
importpath = "github.com/rogpeppe/fastuuid",
sum = "h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s=",
version = "v1.2.0",
)
go_repository(
name = "com_github_rogpeppe_go_internal",
build_file_proto_mode = "disable_global",
importpath = "github.com/rogpeppe/go-internal",
sum = "h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=",
version = "v1.12.0",
)
go_repository(
name = "com_github_rs_cors",
build_file_proto_mode = "disable_global",
importpath = "github.com/rs/cors",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po=",
version = "v1.11.0",
)
go_repository(
name = "com_github_rs_xid",
build_file_proto_mode = "disable_global",
importpath = "github.com/rs/xid",
sum = "h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc=",
version = "v1.5.0",
)
go_repository(
name = "com_github_rs_zerolog",
build_file_proto_mode = "disable_global",
importpath = "github.com/rs/zerolog",
sum = "h1:uPRuwkWF4J6fGsJ2R0Gn2jB1EQiav9k3S6CSdygQJXY=",
version = "v1.15.0",
)
go_repository(
name = "com_github_russellhaering_gosaml2",
build_file_proto_mode = "disable_global",
importpath = "github.com/russellhaering/gosaml2",
sum = "h1:H/whrl8NuSoxyW46Ww5lKPskm+5K+qYLw9afqJ/Zef0=",
version = "v0.9.1",
)
go_repository(
name = "com_github_russellhaering_goxmldsig",
build_file_proto_mode = "disable_global",
importpath = "github.com/russellhaering/goxmldsig",
sum = "h1:8UcDh/xGyQiyrW+Fq5t8f+l2DLB1+zlhYzkPUJ7Qhys=",
version = "v1.4.0",
)
go_repository(
name = "com_github_russross_blackfriday",
build_file_proto_mode = "disable_global",
importpath = "github.com/russross/blackfriday",
replace = "github.com/russross/blackfriday",
sum = "h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=",
version = "v1.5.2",
)
go_repository(
name = "com_github_russross_blackfriday_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/russross/blackfriday/v2",
sum = "h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=",
version = "v2.1.0",
)
go_repository(
name = "com_github_ruudk_golang_pdf417",
build_file_proto_mode = "disable_global",
importpath = "github.com/ruudk/golang-pdf417",
sum = "h1:K1Xf3bKttbF+koVGaX5xngRIZ5bVjbmPnaxE/dR08uY=",
version = "v0.0.0-20201230142125-a7e3863a1245",
)
go_repository(
name = "com_github_ryanuber_columnize",
build_file_proto_mode = "disable_global",
importpath = "github.com/ryanuber/columnize",
sum = "h1:j1Wcmh8OrK4Q7GXY+V7SVSY8nUWQxHW5TkBe7YUl+2s=",
version = "v2.1.0+incompatible",
)
go_repository(
name = "com_github_ryanuber_go_glob",
build_file_proto_mode = "disable_global",
importpath = "github.com/ryanuber/go-glob",
sum = "h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk=",
version = "v1.0.0",
)
2023-01-27 14:30:35 +00:00
go_repository(
name = "com_github_sabhiram_go_gitignore",
build_file_proto_mode = "disable_global",
importpath = "github.com/sabhiram/go-gitignore",
sum = "h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=",
version = "v0.0.0-20210923224102-525f6e181f06",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_sagikazarmark_crypt",
build_file_proto_mode = "disable_global",
importpath = "github.com/sagikazarmark/crypt",
sum = "h1:ZA/7pXyjkHoK4bW4mIdnCLvL8hd+Nrbiw7Dqk7D4qUk=",
version = "v0.17.0",
)
go_repository(
name = "com_github_sagikazarmark_locafero",
build_file_proto_mode = "disable_global",
importpath = "github.com/sagikazarmark/locafero",
sum = "h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=",
version = "v0.4.0",
)
go_repository(
name = "com_github_sagikazarmark_slog_shim",
build_file_proto_mode = "disable_global",
importpath = "github.com/sagikazarmark/slog-shim",
sum = "h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=",
version = "v0.1.0",
)
go_repository(
name = "com_github_sahilm_fuzzy",
build_file_proto_mode = "disable_global",
importpath = "github.com/sahilm/fuzzy",
sum = "h1:MvTmaQdww/z0Q4wrYjDSCcZ78NoftLQyHBSLW/Cx79Y=",
version = "v0.1.1-0.20230530133925-c48e322e2a8f",
)
go_repository(
name = "com_github_sanity_io_litter",
build_file_proto_mode = "disable_global",
importpath = "github.com/sanity-io/litter",
sum = "h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo=",
version = "v1.5.5",
)
go_repository(
name = "com_github_satori_go_uuid",
build_file_proto_mode = "disable_global",
importpath = "github.com/satori/go.uuid",
sum = "h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=",
version = "v1.2.0",
)
go_repository(
name = "com_github_scaleway_scaleway_sdk_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/scaleway/scaleway-sdk-go",
sum = "h1:0roa6gXKgyta64uqh52AQG3wzZXH21unn+ltzQSXML0=",
version = "v1.0.0-beta.9",
)
go_repository(
name = "com_github_schollz_closestmatch",
build_file_proto_mode = "disable_global",
importpath = "github.com/schollz/closestmatch",
sum = "h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk=",
version = "v2.1.0+incompatible",
)
go_repository(
name = "com_github_schollz_progressbar_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/schollz/progressbar/v3",
requestclient: add country-level geolocation data (#58386) This change adds country-level geolocation data to `requestclient` as discussed [here](https://sourcegraph.slack.com/archives/C01PQEVJ5A9/p1700078374822459?thread_ts=1694717740.084639&cid=C01PQEVJ5A9), provided as a 2- or 3-character ISO 3166-1 country code that seems pretty widely used. The inference strategy goes: 1. If we are behind Cloudflare, we trust [Cloudflare's originating country data](https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#cf-ipcountry) and use it as-is 2. If a `Forwarded-For` exists, we look up the first `(*requestclient.Client).Forwarded-For` address in the embedded IP geolocation database 3. Otherwise, we look up `(*requestclient.Client).IP` in the embedded IP geolocation database WE use [DB-IP.com](https://db-ip.com/)'s ["IP to Country Lite" database](https://db-ip.com/db/download/ip-to-country-lite) which includes only country-level data, is free, and allows redistribution with attribution (see docs included in PR). It clocks in at ~8MB, which seems manageable for embedding. Lookup performance looks okay with a trivial benchmark, and we cache the inferred country code in `*requestclient.Client` so that it only gets evaluated once: ``` goos: darwin goarch: arm64 pkg: github.com/sourcegraph/sourcegraph/internal/requestclient/geolocation BenchmarkInferCountryCode-10 2359490 906.9 ns/op 34 B/op 3 allocs/op ``` This change also adds this new data to request client `LogFields`. https://github.com/sourcegraph/sourcegraph/pull/58388 adds this to telemetry events as well. ## Test plan Unit tests
2023-11-22 22:51:48 +00:00
sum = "h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE=",
version = "v3.13.1",
)
2023-01-31 18:02:34 +00:00
go_repository(
name = "com_github_scim2_filter_parser_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/scim2/filter-parser/v2",
sum = "h1:QGadEcsmypxg8gYChRSM2j1edLyE/2j72j+hdmI4BJM=",
version = "v2.2.0",
)
2024-05-07 07:14:05 +00:00
go_repository(
name = "com_github_sclevine_spec",
build_file_proto_mode = "disable_global",
importpath = "github.com/sclevine/spec",
sum = "h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=",
version = "v1.4.0",
)
go_repository(
name = "com_github_sean_seed",
build_file_proto_mode = "disable_global",
importpath = "github.com/sean-/seed",
sum = "h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=",
version = "v0.0.0-20170313163322-e2103e2c3529",
)
go_repository(
name = "com_github_secure_systems_lab_go_securesystemslib",
build_file_proto_mode = "disable_global",
importpath = "github.com/secure-systems-lab/go-securesystemslib",
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
sum = "h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg=",
version = "v0.7.0",
)
go_repository(
name = "com_github_segmentio_asm",
build_file_proto_mode = "disable_global",
importpath = "github.com/segmentio/asm",
sum = "h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=",
version = "v1.2.0",
)
go_repository(
name = "com_github_segmentio_fasthash",
build_file_proto_mode = "disable_global",
importpath = "github.com/segmentio/fasthash",
sum = "h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM=",
version = "v1.0.3",
)
go_repository(
name = "com_github_segmentio_ksuid",
build_file_proto_mode = "disable_global",
importpath = "github.com/segmentio/ksuid",
sum = "h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c=",
version = "v1.0.4",
)
go_repository(
name = "com_github_sergi_go_diff",
build_file_proto_mode = "disable_global",
importpath = "github.com/sergi/go-diff",
sum = "h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=",
version = "v1.3.1",
)
go_repository(
name = "com_github_serialx_hashring",
build_file_proto_mode = "disable_global",
importpath = "github.com/serialx/hashring",
sum = "h1:ka9QPuQg2u4LGipiZGsgkg3rJCo4iIUCy75FddM0GRQ=",
version = "v0.0.0-20190422032157-8b2912629002",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_sethvargo_go_retry",
build_file_proto_mode = "disable_global",
importpath = "github.com/sethvargo/go-retry",
sum = "h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec=",
version = "v0.2.4",
)
go_repository(
name = "com_github_shibumi_go_pathspec",
build_file_proto_mode = "disable_global",
importpath = "github.com/shibumi/go-pathspec",
sum = "h1:QUyMZhFo0Md5B8zV8x2tesohbb5kfbpTi9rBnKh5dkI=",
version = "v1.3.0",
)
go_repository(
name = "com_github_shirou_gopsutil_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/shirou/gopsutil/v3",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:dEHgzZXt4LMNm+oYELpzl9YCqV65Yr/6SfrvgRBtXeU=",
version = "v3.24.4",
)
go_repository(
name = "com_github_shirou_gopsutil_v4",
build_file_proto_mode = "disable_global",
importpath = "github.com/shirou/gopsutil/v4",
sum = "h1:gGsArG5K6vmsh5hcFOHaPm87UD003CaDMkAOweSQjhM=",
version = "v4.24.5",
)
go_repository(
name = "com_github_shoenig_go_m1cpu",
build_file_proto_mode = "disable_global",
importpath = "github.com/shoenig/go-m1cpu",
sum = "h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=",
version = "v0.1.6",
)
go_repository(
name = "com_github_shoenig_test",
build_file_proto_mode = "disable_global",
importpath = "github.com/shoenig/test",
sum = "h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU=",
version = "v0.6.4",
)
go_repository(
name = "com_github_shopify_goreferrer",
build_file_proto_mode = "disable_global",
importpath = "github.com/Shopify/goreferrer",
sum = "h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0=",
version = "v0.0.0-20220729165902-8cddb4f5de06",
)
go_repository(
name = "com_github_shopify_logrus_bugsnag",
build_file_proto_mode = "disable_global",
importpath = "github.com/Shopify/logrus-bugsnag",
sum = "h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs=",
version = "v0.0.0-20171204204709-577dee27f20d",
)
go_repository(
name = "com_github_shopspring_decimal",
build_file_proto_mode = "disable_global",
importpath = "github.com/shopspring/decimal",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=",
version = "v1.3.1",
)
go_repository(
name = "com_github_shurcool_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/shurcooL/go",
sum = "h1:aSISeOcal5irEhJd1M+IrApc0PdcN7e7Aj4yuEnOrfQ=",
version = "v0.0.0-20200502201357-93f07166e636",
)
go_repository(
name = "com_github_shurcool_go_goon",
build_file_proto_mode = "disable_global",
importpath = "github.com/shurcooL/go-goon",
2023-02-21 09:37:13 +00:00
sum = "h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc=",
version = "v0.0.0-20170922171312-37c2f522c041",
)
go_repository(
name = "com_github_shurcool_httpfs",
build_file_proto_mode = "disable_global",
importpath = "github.com/shurcooL/httpfs",
sum = "h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk=",
version = "v0.0.0-20190707220628-8d4bc4ba7749",
)
go_repository(
name = "com_github_shurcool_httpgzip",
build_file_proto_mode = "disable_global",
importpath = "github.com/shurcooL/httpgzip",
replace = "github.com/sourcegraph/httpgzip",
sum = "h1:VaS8k40GiNVUxVx0ZUilU38NU6tWUHNQOX342DWtZUM=",
version = "v0.0.0-20211015085752-0bad89b3b4df",
)
go_repository(
name = "com_github_shurcool_sanitized_anchor_name",
build_file_proto_mode = "disable_global",
importpath = "github.com/shurcooL/sanitized_anchor_name",
sum = "h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=",
version = "v1.0.0",
)
go_repository(
name = "com_github_shurcool_vfsgen",
build_file_proto_mode = "disable_global",
importpath = "github.com/shurcooL/vfsgen",
sum = "h1:pXY9qYc/MP5zdvqWEUH6SjNiu7VhSjuVFTFiTcphaLU=",
version = "v0.0.0-20200824052919-0d455de96546",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "com_github_sigstore_cosign_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/sigstore/cosign/v2",
sum = "h1:HauwPOMYYaVdQsnvUbF0P+ZsVPrkTB0G7Eq65+z1bQc=",
version = "v2.2.1",
)
go_repository(
name = "com_github_sigstore_rekor",
build_file_proto_mode = "disable_global",
importpath = "github.com/sigstore/rekor",
sum = "h1:pLZ0UjutL7SUdeiysmJCabnRqvI7DsIxnJj8c/+e0Fk=",
version = "v1.3.3",
)
go_repository(
name = "com_github_sigstore_sigstore",
build_file_proto_mode = "disable_global",
importpath = "github.com/sigstore/sigstore",
sum = "h1:ij55dBhLwjICmLTBJZm7SqoQLdsu/oowDanACcJNs48=",
version = "v1.7.5",
)
go_repository(
name = "com_github_sirupsen_logrus",
build_file_proto_mode = "disable_global",
importpath = "github.com/sirupsen/logrus",
requestclient: add country-level geolocation data (#58386) This change adds country-level geolocation data to `requestclient` as discussed [here](https://sourcegraph.slack.com/archives/C01PQEVJ5A9/p1700078374822459?thread_ts=1694717740.084639&cid=C01PQEVJ5A9), provided as a 2- or 3-character ISO 3166-1 country code that seems pretty widely used. The inference strategy goes: 1. If we are behind Cloudflare, we trust [Cloudflare's originating country data](https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#cf-ipcountry) and use it as-is 2. If a `Forwarded-For` exists, we look up the first `(*requestclient.Client).Forwarded-For` address in the embedded IP geolocation database 3. Otherwise, we look up `(*requestclient.Client).IP` in the embedded IP geolocation database WE use [DB-IP.com](https://db-ip.com/)'s ["IP to Country Lite" database](https://db-ip.com/db/download/ip-to-country-lite) which includes only country-level data, is free, and allows redistribution with attribution (see docs included in PR). It clocks in at ~8MB, which seems manageable for embedding. Lookup performance looks okay with a trivial benchmark, and we cache the inferred country code in `*requestclient.Client` so that it only gets evaluated once: ``` goos: darwin goarch: arm64 pkg: github.com/sourcegraph/sourcegraph/internal/requestclient/geolocation BenchmarkInferCountryCode-10 2359490 906.9 ns/op 34 B/op 3 allocs/op ``` This change also adds this new data to request client `LogFields`. https://github.com/sourcegraph/sourcegraph/pull/58388 adds this to telemetry events as well. ## Test plan Unit tests
2023-11-22 22:51:48 +00:00
sum = "h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=",
version = "v1.9.3",
)
go_repository(
name = "com_github_skeema_knownhosts",
build_file_proto_mode = "disable_global",
importpath = "github.com/skeema/knownhosts",
sum = "h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ=",
version = "v1.2.1",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "com_github_skratchdot_open_golang",
build_file_proto_mode = "disable_global",
importpath = "github.com/skratchdot/open-golang",
sum = "h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA=",
version = "v0.0.0-20200116055534-eef842397966",
)
go_repository(
name = "com_github_slack_go_slack",
build_file_proto_mode = "disable_global",
importpath = "github.com/slack-go/slack",
sum = "h1:BGbxa0kMsGEvLOEoZmYs8T1wWfoZXwmQFBb6FgYCXUA=",
version = "v0.10.1",
)
go_repository(
name = "com_github_smacker_go_tree_sitter",
build_file_proto_mode = "disable_global",
importpath = "github.com/smacker/go-tree-sitter",
sum = "h1:PeBjmUlvTGvg6SyM4u7pyk8YCmdbgdFcGrwf7dRBV80=",
version = "v0.0.0-20231219031718-233c2f923ac7",
)
go_repository(
name = "com_github_smartystreets_assertions",
build_file_proto_mode = "disable_global",
importpath = "github.com/smartystreets/assertions",
2023-01-27 14:30:35 +00:00
sum = "h1:Dx1kYM01xsSqKPno3aqLnrwac2LetPvN23diwyr69Qs=",
version = "v1.13.0",
)
go_repository(
name = "com_github_smartystreets_goconvey",
build_file_proto_mode = "disable_global",
importpath = "github.com/smartystreets/goconvey",
sum = "h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=",
version = "v1.6.4",
)
go_repository(
name = "com_github_soheilhy_cmux",
build_file_proto_mode = "disable_global",
importpath = "github.com/soheilhy/cmux",
sum = "h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js=",
version = "v0.1.5",
)
go_repository(
name = "com_github_sourcegraph_cloud_api",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/cloud-api",
sum = "h1:ZCHR0jxMJ0QhwHbHnbXuWTJrIeJT6uuJZ5D8V2Csg6g=",
version = "v0.0.0-20240501113836-ecd1d4cba9dd",
)
go_repository(
name = "com_github_sourcegraph_conc",
2023-01-31 18:02:34 +00:00
build_directives = [
"gazelle:resolve go github.com/sourcegraph/sourcegraph/lib/errors @//lib/errors",
],
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/conc",
2024-01-08 19:06:01 +00:00
sum = "h1:0FsjN+u9fNXTS2C1JnJ6G/gkgcUg8dscyyfu3PwHWUQ=",
version = "v0.3.1-0.20240108182409-4afefce20f9b",
)
go_repository(
name = "com_github_sourcegraph_go_ctags",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/go-ctags",
sum = "h1:hNVb44yWOr43HqizO4++mgA82tusAvxMjib1arIN0a0=",
version = "v0.0.0-20240424152308-4faeee4849da",
)
go_repository(
name = "com_github_sourcegraph_go_diff",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/go-diff",
sum = "h1:11miag7hlORpW7ici5mL7T9PyiEsmVmf+8PFOvJ/ZrA=",
version = "v0.6.2-0.20221123165719-f8cd299c40f3",
)
go_repository(
name = "com_github_sourcegraph_go_jsonschema",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/go-jsonschema",
sum = "h1:Bq9XPdAOBkA9NWeNEh2VeIlGlizg9rL5VkYFZje2S+4=",
version = "v0.0.0-20221230021921-34aaf28fc4ac",
)
go_repository(
name = "com_github_sourcegraph_go_langserver",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/go-langserver",
sum = "h1:EX1bSaIbVia2U/Pt/2Z62y8wJS4Z4iNiK5VCeUKuBx8=",
version = "v2.0.1-0.20181108233942-4a51fa2e1238+incompatible",
)
go_repository(
name = "com_github_sourcegraph_go_lsp",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/go-lsp",
sum = "h1:afLbh+ltiygTOB37ymZVwKlJwWZn+86syPTbrrOAydY=",
version = "v0.0.0-20200429204803-219e11d77f5d",
)
go_repository(
name = "com_github_sourcegraph_go_rendezvous",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/go-rendezvous",
sum = "h1:uBLhh66Nf4BcRnvCkMVEuYZ/bQ9ok0rOlEJhfVUpJj4=",
version = "v0.0.0-20210910070954-ef39ade5591d",
)
go_repository(
name = "com_github_sourcegraph_jsonx",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/jsonx",
sum = "h1:oAdWFqhStsWiiMP/vkkHiMXqFXzl1XfUNOdxKJbd6bI=",
version = "v0.0.0-20200629203448-1a936bd500cf",
)
go_repository(
name = "com_github_sourcegraph_log",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/log",
sum = "h1:5QRKAfZ/qyFIvBFN4SEEnea955/CesDRh3mC53TmPLk=",
version = "v0.0.0-20240515122000-be5f7eea69b1",
)
go_repository(
name = "com_github_sourcegraph_log_logr",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/log/logr",
sum = "h1:Ov40bLTzue0PfsOCGcRWEJt4Xh8ayq4OwBtawEqHgbM=",
version = "v0.0.0-20240425170707-431bcb6c8668",
)
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
go_repository(
name = "com_github_sourcegraph_managed_services_platform_cdktf_gen_cloudflare",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/managed-services-platform-cdktf/gen/cloudflare",
sum = "h1:yd41laqjULwbfRLkxB29H1Ut8IfjaK0ZDlTCKbL6Tl0=",
version = "v0.0.0-20240513203650-e2b1273f1c1a",
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
)
go_repository(
name = "com_github_sourcegraph_managed_services_platform_cdktf_gen_google",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/managed-services-platform-cdktf/gen/google",
sum = "h1:Pn4H0coHJdKScWcznY2eKDLkN7YT0E2B4Bq3fdUhGBI=",
version = "v0.0.0-20240513203650-e2b1273f1c1a",
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
)
go_repository(
name = "com_github_sourcegraph_managed_services_platform_cdktf_gen_google_beta",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/managed-services-platform-cdktf/gen/google_beta",
sum = "h1:AkPNJAX4DqhE4DJ4z8cFv1L38bupC5Oidw+gwTAgSUg=",
version = "v0.0.0-20240513203650-e2b1273f1c1a",
)
go_repository(
name = "com_github_sourcegraph_managed_services_platform_cdktf_gen_nobl9",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/managed-services-platform-cdktf/gen/nobl9",
sum = "h1:2mxm9uSAvpw929LBnr5xHXwYrV8rIw4LYD3Pufujw6Y=",
version = "v0.0.0-20240513203650-e2b1273f1c1a",
)
go_repository(
name = "com_github_sourcegraph_managed_services_platform_cdktf_gen_opsgenie",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/managed-services-platform-cdktf/gen/opsgenie",
sum = "h1:a5CffqYMpDTeVZnz3a6ovY4AvKSuzhvjVJihE24BcKU=",
version = "v0.0.0-20240513203650-e2b1273f1c1a",
)
dev/msp: add CloudSQL integration (#58420) This PR has 3 major changes: 1. Provisioning a Cloud SQL PostgreSQL instance: `resource.postgreSQL` 2. Updates to the MSP runtime for connecting to the database 3. Publishable `msp-example` for the `msp-testbed` deployment, for testing integrations and other MSP features, and adds an example Gorm setup Closes https://github.com/sourcegraph/sourcegraph/issues/56848. For more context, see go/msp ### `resource.postgreSQL` This change adds `resource.postgreSQL` to the spec for provisioning a Cloud SQL database. Example: ```yaml resources: postgreSQL: databases: ["primary"] cpu: 1 memoryGB: 4 ``` When configured, a Cloud SQL instance is provisioned, and the Cloud Run workload SA is granted access to it. The specified `databases` are also created. `cpu` and `memoryGB` are used to generate the custom VM to provision the instance with. A lot of the base configuration for the database instance are taken directly from what we use in Cloud: https://github.com/sourcegraph/controller/blob/9cac1b1aa0dde038280d424f4d4b6c34ffb22e36/internal/resource/sql/sql.go#L116, and is similar to the Redis setup, in that we need the private peering VPC and install additional certs on the Cloud Run instance. ### MSP runtime `service.Contract` now has a helper, `GetPostgreSQLDB(database)`, for generating the appropriate configuration for creating a connection to a given database and returning a `sql.DB`, which most libraries have adapters for. The helper sets up `pgx.ConnConfig` that uses workload identity to connect directly to Cloud SQL, following the guide here: https://github.com/GoogleCloudPlatform/cloud-sql-go-connector?tab=readme-ov-file#automatic-iam-database-authentication In local dev, `PGDSN` can be used to hardcode an appropriate value. ### `msp-example` I've moved the MSP example from #56846 to the top-level `cmd/msp-example,` and set up some guidance for publishing it. This service now also includes a simple database connection and setup using Gorm, used by https://github.com/sourcegraph/accounts.sourcegraph.com, and can be used for testing, e.g. https://github.com/sourcegraph/managed-services/pull/87 ## Test plan - [x] Deploy https://github.com/sourcegraph/managed-services/pull/87, which will connect to the database and set up some tables - [x] Review diff: https://github.com/sourcegraph/managed-services/actions/runs/6951246277 - [x] Tear down database in https://github.com/sourcegraph/managed-services/pull/87, with caveat: requires state surgery. Should be rare enough (we might prefer to tear down environments entirely) - see docstrings in package `postgresqlroles` --------- Co-authored-by: Michael Lin <mlzc@hey.com> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-11-22 23:32:53 +00:00
go_repository(
name = "com_github_sourcegraph_managed_services_platform_cdktf_gen_postgresql",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/managed-services-platform-cdktf/gen/postgresql",
feat/msp: allow enablement of logical replication features for Datastream (#63092) Adds a new `postgreSQL.logicalReplication` configuration to allow MSP to generate prerequisite setup for integration with Datastream: https://cloud.google.com/datastream/docs/sources-postgresql. Integration with Datastream allows the Data Analytics team to self-serve data enrichment needs for the Telemetry V2 pipeline. Enabling this feature entails downtime (Cloud SQL instance restart), so enabling the logical replication feature at the Cloud SQL level (`cloudsql.logical_decoding`) is gated behind `postgreSQL.logicalReplication: {}`. Setting up the required stuff in Postgres is a bit complicated, requiring 3 Postgres provider instances: 1. The default admin one, authenticated with our admin user 2. New: a workload identity provider, using https://github.com/cyrilgdn/terraform-provider-postgresql/pull/448 / https://github.com/sourcegraph/managed-services-platform-cdktf/pull/11. This is required for creating a publication on selected tables, which requires being owner of said table. Because tables are created by application using e.g. auto-migrate, the workload identity is always the table owner, so we need to impersonate the IAM user 3. New: a "replication user" which is created with the replication permission. Replication seems to not be a propagated permission so we need a role/user that has replication enabled. A bit more context scattered here and there in the docstrings. Beyond the Postgres configuration we also introduce some additional resources to enable easy Datastream configuration: 1. Datastream Private Connection, which peers to the service private network 2. Cloud SQL Proxy VM, which only allows connections to `:5432` from the range specified in 1, allowing a connection to the Cloud SQL instance 2. Datastream Connection Profile attached to 1 From there, data team can click-ops or manage the Datastream Stream and BigQuery destination on their own. Closes CORE-165 Closes CORE-212 Sample config: ```yaml resources: postgreSQL: databases: - "primary" logicalReplication: publications: - name: testing database: primary tables: - users ``` ## Test plan https://github.com/sourcegraph/managed-services/pull/1569 ## Changelog - MSP services can now configure `postgreSQL.logicalReplication` to enable Data Analytics team to replicate selected database tables into BigQuery.
2024-07-05 18:24:44 +00:00
sum = "h1:t0hSCAvffnF3VAlSW3M9eeeubpMF6TieVc52vKLT98o=",
version = "v0.0.0-20240617210115-f286e77e83e8",
dev/msp: add CloudSQL integration (#58420) This PR has 3 major changes: 1. Provisioning a Cloud SQL PostgreSQL instance: `resource.postgreSQL` 2. Updates to the MSP runtime for connecting to the database 3. Publishable `msp-example` for the `msp-testbed` deployment, for testing integrations and other MSP features, and adds an example Gorm setup Closes https://github.com/sourcegraph/sourcegraph/issues/56848. For more context, see go/msp ### `resource.postgreSQL` This change adds `resource.postgreSQL` to the spec for provisioning a Cloud SQL database. Example: ```yaml resources: postgreSQL: databases: ["primary"] cpu: 1 memoryGB: 4 ``` When configured, a Cloud SQL instance is provisioned, and the Cloud Run workload SA is granted access to it. The specified `databases` are also created. `cpu` and `memoryGB` are used to generate the custom VM to provision the instance with. A lot of the base configuration for the database instance are taken directly from what we use in Cloud: https://github.com/sourcegraph/controller/blob/9cac1b1aa0dde038280d424f4d4b6c34ffb22e36/internal/resource/sql/sql.go#L116, and is similar to the Redis setup, in that we need the private peering VPC and install additional certs on the Cloud Run instance. ### MSP runtime `service.Contract` now has a helper, `GetPostgreSQLDB(database)`, for generating the appropriate configuration for creating a connection to a given database and returning a `sql.DB`, which most libraries have adapters for. The helper sets up `pgx.ConnConfig` that uses workload identity to connect directly to Cloud SQL, following the guide here: https://github.com/GoogleCloudPlatform/cloud-sql-go-connector?tab=readme-ov-file#automatic-iam-database-authentication In local dev, `PGDSN` can be used to hardcode an appropriate value. ### `msp-example` I've moved the MSP example from #56846 to the top-level `cmd/msp-example,` and set up some guidance for publishing it. This service now also includes a simple database connection and setup using Gorm, used by https://github.com/sourcegraph/accounts.sourcegraph.com, and can be used for testing, e.g. https://github.com/sourcegraph/managed-services/pull/87 ## Test plan - [x] Deploy https://github.com/sourcegraph/managed-services/pull/87, which will connect to the database and set up some tables - [x] Review diff: https://github.com/sourcegraph/managed-services/actions/runs/6951246277 - [x] Tear down database in https://github.com/sourcegraph/managed-services/pull/87, with caveat: requires state surgery. Should be rare enough (we might prefer to tear down environments entirely) - see docstrings in package `postgresqlroles` --------- Co-authored-by: Michael Lin <mlzc@hey.com> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-11-22 23:32:53 +00:00
)
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
go_repository(
name = "com_github_sourcegraph_managed_services_platform_cdktf_gen_random",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/managed-services-platform-cdktf/gen/random",
sum = "h1:Te08CFBDZrBcmICwwOvV5t3GW5GtRDaUSJEuyY0YDNw=",
version = "v0.0.0-20240513203650-e2b1273f1c1a",
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
)
go_repository(
name = "com_github_sourcegraph_managed_services_platform_cdktf_gen_sentry",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/managed-services-platform-cdktf/gen/sentry",
sum = "h1:lws+6zhwD9KFG5c0mt0Xnhqw6uV/3LNv9ymQku0FbO0=",
version = "v0.0.0-20240513203650-e2b1273f1c1a",
)
go_repository(
name = "com_github_sourcegraph_managed_services_platform_cdktf_gen_slack",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/managed-services-platform-cdktf/gen/slack",
sum = "h1:zE0TZON1DJlUxl3NTv8C82UrZN459jGidceiTEhFRYA=",
version = "v0.0.0-20240513203650-e2b1273f1c1a",
)
go_repository(
name = "com_github_sourcegraph_managed_services_platform_cdktf_gen_tfe",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/managed-services-platform-cdktf/gen/tfe",
sum = "h1:I9YTsYSCvI3TodTamcfjts0KVOJ4gXmfIhlKlwa2bpU=",
version = "v0.0.0-20240513203650-e2b1273f1c1a",
)
go_repository(
name = "com_github_sourcegraph_mountinfo",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/mountinfo",
sum = "h1:nBb4Cp27e5UH4Imc53cDcI+6WT6Hm5NR0TIguAqbjUI=",
version = "v0.0.0-20240201124957-b314c0befab1",
)
msp/operationdocs: write to Notion instead of Markdown (#62325) Closes https://github.com/sourcegraph/managed-services/issues/1076 aka closes CORE-28 - https://github.com/sourcegraph/managed-services/pull/1332 also automated the updates. Notes: 1. Notion anchors are ID-based, so we strip all anchor links because we cannot generate them in one pass. `notionreposync` may implement a mechanism for this in the future (filed https://github.com/sourcegraph/notionreposync/issues/8), but for now we don't have a great way around this, especially because of the next point 2. In-place updates are hard because of the block structure, so we destroy page contents and recreate the page every time. This causes a "flicker" as a viewer may see the page disappear slowly before their eyes (we can only delete things 1 block at a time). `notionreposync` may may implement an improved mechanism for this in the future (filed https://github.com/sourcegraph/notionreposync/issues/7) 3. There's something funky going wrong with line breaks, filed https://github.com/sourcegraph/notionreposync/issues/9 - it hurts readability but it's not unmanageable. 4. Sadly Notion does not allow API file uploads (😡 https://developers.notion.com/docs/working-with-files-and-media#uploading-files-and-media-via-the-notion-api), so we generate them into the managed-services repo (https://github.com/sourcegraph/managed-services/pull/1332) and then just link to those diagrams from the generated page. We use a Markdown file that renders the SVG because the native SVG viewer sucks. 5. Made misc changes to operationdocs output where Notion's version is noticeably worse, or difficult to support (tables, lists-in-admonitions, etc) Depends on various improvements upstream in https://github.com/sourcegraph/notionreposync: - https://github.com/sourcegraph/notionreposync/pull/4 - https://github.com/sourcegraph/notionreposync/pull/5 - https://github.com/sourcegraph/notionreposync/pull/6 Follow-up improvements: - CORE-105 - CORE-106 ## Test plan ``` sg msp ops generate-handbook-pages ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/9d314a97-5370-4123-9534-f9f897002110) https://sourcegraph.notion.site/Build-Tracker-infrastructure-operations-bd66bf25d65d41b4875874a6f4d350cc ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/69e1eb48-2fa9-421b-b2fd-969e25f37fee) https://github.com/sourcegraph/managed-services/pull/1332 --------- Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
2024-05-03 21:17:16 +00:00
go_repository(
name = "com_github_sourcegraph_notionreposync",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/notionreposync",
sum = "h1:1uwYDdt1HGBwl+5a1/zyUehFX4/1969Uv34vKlmltcY=",
version = "v0.0.0-20240517090426-98b2d4b017d7",
msp/operationdocs: write to Notion instead of Markdown (#62325) Closes https://github.com/sourcegraph/managed-services/issues/1076 aka closes CORE-28 - https://github.com/sourcegraph/managed-services/pull/1332 also automated the updates. Notes: 1. Notion anchors are ID-based, so we strip all anchor links because we cannot generate them in one pass. `notionreposync` may implement a mechanism for this in the future (filed https://github.com/sourcegraph/notionreposync/issues/8), but for now we don't have a great way around this, especially because of the next point 2. In-place updates are hard because of the block structure, so we destroy page contents and recreate the page every time. This causes a "flicker" as a viewer may see the page disappear slowly before their eyes (we can only delete things 1 block at a time). `notionreposync` may may implement an improved mechanism for this in the future (filed https://github.com/sourcegraph/notionreposync/issues/7) 3. There's something funky going wrong with line breaks, filed https://github.com/sourcegraph/notionreposync/issues/9 - it hurts readability but it's not unmanageable. 4. Sadly Notion does not allow API file uploads (😡 https://developers.notion.com/docs/working-with-files-and-media#uploading-files-and-media-via-the-notion-api), so we generate them into the managed-services repo (https://github.com/sourcegraph/managed-services/pull/1332) and then just link to those diagrams from the generated page. We use a Markdown file that renders the SVG because the native SVG viewer sucks. 5. Made misc changes to operationdocs output where Notion's version is noticeably worse, or difficult to support (tables, lists-in-admonitions, etc) Depends on various improvements upstream in https://github.com/sourcegraph/notionreposync: - https://github.com/sourcegraph/notionreposync/pull/4 - https://github.com/sourcegraph/notionreposync/pull/5 - https://github.com/sourcegraph/notionreposync/pull/6 Follow-up improvements: - CORE-105 - CORE-106 ## Test plan ``` sg msp ops generate-handbook-pages ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/9d314a97-5370-4123-9534-f9f897002110) https://sourcegraph.notion.site/Build-Tracker-infrastructure-operations-bd66bf25d65d41b4875874a6f4d350cc ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/69e1eb48-2fa9-421b-b2fd-969e25f37fee) https://github.com/sourcegraph/managed-services/pull/1332 --------- Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
2024-05-03 21:17:16 +00:00
)
go_repository(
name = "com_github_sourcegraph_run",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/run",
sum = "h1:3A8w5e8HIYPfafHekvmdmmh42RHKGVhmiTZAPJclg7I=",
version = "v0.12.0",
)
go_repository(
name = "com_github_sourcegraph_scip",
2023-01-27 14:30:35 +00:00
# This fixes the build for sourcegraph/scip which depends on sourcegraph/sourcegraph/lib but
# gazelle doesn't know how to resolve those packages from within sourcegraph/scip.
build_directives = [
"gazelle:resolve go github.com/sourcegraph/sourcegraph/lib/errors @//lib/errors",
"gazelle:resolve go github.com/sourcegraph/sourcegraph/lib/codeintel/lsif/protocol @//lib/codeintel/lsif/protocol",
"gazelle:resolve go github.com/sourcegraph/sourcegraph/lib/codeintel/lsif/protocol/reader @//lib/codeintel/lsif/protocol/reader",
"gazelle:resolve go github.com/sourcegraph/sourcegraph/lib/codeintel/lsif/protocol/writer @//lib/codeintel/lsif/protocol/writer",
],
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/scip",
patch_args = ["-p1"],
# For some reason, this isn't being included automatically, causing a test failure
# when we try to use the dependency.
patches = [
"//third_party/com_github_sourcegraph_scip:add_parser_h_to_srcs.patch",
],
sum = "h1:5JZAZpvl15jfrLu0aujng0guhlHfQXWr/CrGXsP4mUw=",
version = "v0.4.1-0.20240802084008-0504a347d36d",
)
go_repository(
name = "com_github_sourcegraph_sourcegraph_accounts_sdk_go",
build_directives = [
"gazelle:resolve go github.com/sourcegraph/sourcegraph/lib/errors @//lib/errors",
feat/enterprise-portal: ConnectRPC layer for {Get/List}CodyGatewayAccess (#62771) This PR exposes the data layer implemented in https://github.com/sourcegraph/sourcegraph/pull/62706 via the Enterprise Portal API. We register the services proposed in #62263 and also set up tooling like gRPC UI locally for DX. Auth is via SAMS M2M; https://github.com/sourcegraph/sourcegraph-accounts-sdk-go/pull/28 and https://github.com/sourcegraph/sourcegraph-accounts/pull/227 rolls out the new scopes, and https://github.com/sourcegraph/managed-services/pull/1474 adds credentials for the enterprise-portal-dev deployment. Closes CORE-112 ## Test plan https://github.com/sourcegraph/sourcegraph/pull/62706 has extensive testing of the data layer, and this PR expands on it a little bit. I tested the RPC layer by hand: Create SAMS client for Enterprise Portal Dev in **accounts.sgdev.org**: ```sh curl -s -X POST \ -H "Authorization: Bearer $MANAGEMENT_SECRET" \ https://accounts.sgdev.org/api/management/v1/identity-provider/clients \ --data '{"name": "enterprise-portal-dev", "scopes": [], "redirect_uris": ["https://enterprise-portal.sgdev.org"]}' | jq ``` Configure `sg.config.overwrite.yaml` ```yaml enterprise-portal: env: SRC_LOG_LEVEL: debug # sams-dev SAMS_URL: https://accounts.sgdev.org ENTERPRISE_PORTAL_SAMS_CLIENT_ID: "sams_cid_..." ENTERPRISE_PORTAL_SAMS_CLIENT_SECRET: "sams_cs_..." ``` Create a test client (later, we will do the same thing for Cody Gateway), also in **accounts.sgdev.org**: ```sh curl -s -X POST \ -H "Authorization: Bearer $MANAGEMENT_SECRET" \ https://accounts.sgdev.org/api/management/v1/identity-provider/clients \ --data '{"name": "enterprise-portal-dev-reader", "scopes": ["enterprise_portal::codyaccess::read", "enterprise_portal::subscription::read"], "redirect_uris": ["https://enterprise-portal.sgdev.org"]}' | jq ``` Then: ``` sg run enterprise-portal ``` Navigate to the locally-enabled gRPC debug UI at http://localhost:6081/debug/grcpui, using https://github.com/sourcegraph/sourcegraph/pull/62883 to get an access token from our test client to add in the request metadata: ```sh sg sams create-client-token -s 'enterprise_portal::codyaccess::read' ``` I'm using some local subscriptions I've made previously in `sg start dotcom`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/a55c6f0d-b0ae-4e68-8e4c-ccb6e2cc442d) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/19d18104-1051-4a82-abe0-58010dd13a27) Without a valid authorization header: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/c9cf4c89-9902-48f8-ac41-daf9a63ca789) Verified a lookup using the returned access tokens also works --------- Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2024-05-27 20:39:57 +00:00
"gazelle:resolve go github.com/sourcegraph/sourcegraph/lib/background @//lib/background",
],
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/sourcegraph-accounts-sdk-go",
feat/dotcom: add Enterprise Portal auth proxy (#63652) Part of https://linear.app/sourcegraph/issue/CORE-211 This introduces authenticated proxies that allow dotcom site admins access to dev and production Enterprise Portal instances, authenticated with client credentials issued to the dotcom instance. The medium-term goal is to use this proxy so that we can use the existing subscriptions UI, backed by the new Enteprise Portal deployments (e.g. https://github.com/sourcegraph/sourcegraph/pull/63653, tracking issue: https://linear.app/sourcegraph/issue/CORE-100/enterprise-portal-migrate-away-from-dotcom-db-as-source-of-truth), until we have a dedicated UI for Enterprise Portal (https://linear.app/sourcegraph/project/kr-p-enterprise-portal-user-interface-dadd5ff28bd8) This is required until we ship https://linear.app/sourcegraph/project/kr-p1-streamlined-role-assignment-via-sams-and-entitle-2f118b3f9d4c/overview, which will allow SAMS to be the source-of-truth for who is a site admin in Sourcegraph.com. Once we have that information, we can use the user's SAMS session directly in Enterprise Portal to authorize access to Enterprise Portal data. ## Test plan Set up `dev-private` with dev credentials: https://github.com/sourcegraph/dev-private/pull/101 `sg start dotcom`, create a personal access token, and try to make ConnectRPC requests matching the spec to the new endpoints: ```sh # Local curl --header "Content-Type: application/json" --header "authorization: token sgp_local_..." --data '{"filters":[{"filter":{"is_archived":false}}]}' -v \ https://sourcegraph.test:3443/.api/enterpriseportal/local/enterpriseportal.subscriptions.v1.SubscriptionsService/ListEnterpriseSubscriptions # Dev curl --header "Content-Type: application/json" --header "authorization: token sgp_local_..." --data '{"filters":[{"filter":{"is_archived":false}}]}' -v \ https://sourcegraph.test:3443/.api/enterpriseportal/dev/enterpriseportal.subscriptions.v1.SubscriptionsService/ListEnterpriseSubscriptions ``` Note that the URL path after `/.api/enterpriseportal/dev/`, i.e. `/enterpriseportal.subscriptions.v1.SubscriptionsService/ListEnterpriseSubscriptions`, and the shape of the parameters, are all the same as if you curl'd the Enterprise Portal API directly, per the Connect protocol: https://connectrpc.com/docs/protocol/ Both local and dev reach out to the existing SAMS dev deployment for credentials, so the `dev-private` credentials work OOTB for both. --------- Co-authored-by: Andre Eleuterio <andreeleuterio@users.noreply.github.com>
2024-07-09 20:46:59 +00:00
sum = "h1:EJyYy5NO8ONkPXOvN1CpgCM7YPh8bEaMdAGcvwDFIxo=",
version = "v0.0.0-20240702160611-15589d6d8eac",
)
go_repository(
name = "com_github_sourcegraph_zoekt",
build_file_proto_mode = "disable_global",
importpath = "github.com/sourcegraph/zoekt",
patch_args = ["-p1"],
patches = [
"//third_party/com_github_sourcegraph_zoekt:x_defs_version.patch",
],
sum = "h1:b1Fjp3Ju2Pgy9OGZfsqn0gfDbAj7vmeWrevhqg1sI8o=",
version = "v0.0.0-20240808144359-20c496e3680f",
)
go_repository(
name = "com_github_spaolacci_murmur3",
build_file_proto_mode = "disable_global",
importpath = "github.com/spaolacci/murmur3",
sum = "h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=",
version = "v0.0.0-20180118202830-f09979ecbc72",
)
go_repository(
name = "com_github_spdx_tools_golang",
build_file_proto_mode = "disable_global",
importpath = "github.com/spdx/tools-golang",
sum = "h1:fJg3SVOGG+eIva9ZUBm/hvyA7PIPVFjRxUKe6fdAgwE=",
version = "v0.5.1",
)
go_repository(
name = "com_github_spf13_afero",
build_file_proto_mode = "disable_global",
importpath = "github.com/spf13/afero",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=",
version = "v1.11.0",
)
go_repository(
name = "com_github_spf13_cast",
build_file_proto_mode = "disable_global",
importpath = "github.com/spf13/cast",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=",
version = "v1.6.0",
)
go_repository(
name = "com_github_spf13_cobra",
build_file_proto_mode = "disable_global",
importpath = "github.com/spf13/cobra",
sum = "h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=",
version = "v1.8.0",
)
go_repository(
name = "com_github_spf13_jwalterweatherman",
build_file_proto_mode = "disable_global",
importpath = "github.com/spf13/jwalterweatherman",
sum = "h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=",
version = "v1.1.0",
)
go_repository(
name = "com_github_spf13_pflag",
build_file_proto_mode = "disable_global",
importpath = "github.com/spf13/pflag",
sum = "h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=",
version = "v1.0.5",
)
go_repository(
name = "com_github_spf13_viper",
build_file_proto_mode = "disable_global",
importpath = "github.com/spf13/viper",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ=",
version = "v1.18.2",
)
go_repository(
name = "com_github_stoewer_go_strcase",
build_file_proto_mode = "disable_global",
importpath = "github.com/stoewer/go-strcase",
sum = "h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=",
version = "v1.3.0",
)
go_repository(
name = "com_github_stretchr_objx",
build_file_proto_mode = "disable_global",
importpath = "github.com/stretchr/objx",
sum = "h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=",
version = "v0.5.2",
)
go_repository(
name = "com_github_stretchr_testify",
build_file_proto_mode = "disable_global",
importpath = "github.com/stretchr/testify",
sum = "h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=",
version = "v1.9.0",
)
go_repository(
name = "com_github_stvp_go_udp_testing",
build_file_proto_mode = "disable_global",
importpath = "github.com/stvp/go-udp-testing",
sum = "h1:LUsDduamlucuNnWcaTbXQ6aLILFcLXADpOzeEH3U+OI=",
version = "v0.0.0-20201019212854-469649b16807",
)
go_repository(
name = "com_github_stvp_tempredis",
build_file_proto_mode = "disable_global",
importpath = "github.com/stvp/tempredis",
sum = "h1:QVqDTf3h2WHt08YuiTGPZLls0Wq99X9bWd0Q5ZSBesM=",
version = "v0.0.0-20181119212430-b82af8480203",
)
go_repository(
name = "com_github_subosito_gotenv",
build_file_proto_mode = "disable_global",
importpath = "github.com/subosito/gotenv",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=",
version = "v1.6.0",
)
go_repository(
name = "com_github_substrait_io_substrait_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/substrait-io/substrait-go",
sum = "h1:buDnjsb3qAqTaNbOR7VKmNgXf4lYQxWEcnSGUWBtmN8=",
version = "v0.4.2",
)
go_repository(
name = "com_github_tadvi_systray",
build_file_proto_mode = "disable_global",
importpath = "github.com/tadvi/systray",
sum = "h1:6yITBqGTE2lEeTPG04SN9W+iWHCRyHqlVYILiSXziwk=",
version = "v0.0.0-20190226123456-11a2b8fa57af",
)
go_repository(
name = "com_github_tdewolff_minify_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/tdewolff/minify/v2",
sum = "h1:kejsHQMM17n6/gwdw53qsi6lg0TGddZADVyQOz1KMdE=",
version = "v2.12.4",
)
go_repository(
name = "com_github_tdewolff_parse_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/tdewolff/parse/v2",
sum = "h1:KCkDvNUMof10e3QExio9OPZJT8SbdKojLBumw8YZycQ=",
version = "v2.6.4",
)
go_repository(
name = "com_github_temoto_robotstxt",
build_file_proto_mode = "disable_global",
importpath = "github.com/temoto/robotstxt",
sum = "h1:W2pOjSJ6SWvldyEuiFXNxz3xZ8aiWX5LbfDiOFd7Fxg=",
version = "v1.1.2",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_testcontainers_testcontainers_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/testcontainers/testcontainers-go",
sum = "h1:jmn/XS22q4YRrcMwWg0pAwlClzs/abopbsBzrepyc4E=",
version = "v0.30.0",
)
go_repository(
name = "com_github_testcontainers_testcontainers_go_modules_mysql",
build_file_proto_mode = "disable_global",
importpath = "github.com/testcontainers/testcontainers-go/modules/mysql",
sum = "h1:wrePvxfU/2HFALKyBqpNs6VoPPvThzHy9aN+PCxse9g=",
version = "v0.30.0",
)
go_repository(
name = "com_github_testcontainers_testcontainers_go_modules_postgres",
build_file_proto_mode = "disable_global",
importpath = "github.com/testcontainers/testcontainers-go/modules/postgres",
sum = "h1:D3HFqpZS90iRGAN7M85DFiuhPfvYvFNnx8urQ6mPAvo=",
version = "v0.30.0",
)
go_repository(
name = "com_github_tetratelabs_wazero",
build_file_proto_mode = "disable_global",
importpath = "github.com/tetratelabs/wazero",
sum = "h1:nqw7zCldxE06B8zSZAY0ACrR9OH5QCcPwYmYlwtcwtE=",
version = "v1.3.0",
)
go_repository(
name = "com_github_throttled_throttled_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/throttled/throttled/v2",
sum = "h1:IezKE1uHlYC/0Al05oZV6Ar+uN/znw3cy9J8banxhEY=",
version = "v2.12.0",
)
go_repository(
name = "com_github_tidwall_gjson",
build_file_proto_mode = "disable_global",
importpath = "github.com/tidwall/gjson",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U=",
version = "v1.17.1",
)
go_repository(
name = "com_github_tidwall_match",
build_file_proto_mode = "disable_global",
importpath = "github.com/tidwall/match",
sum = "h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=",
version = "v1.1.1",
)
go_repository(
name = "com_github_tidwall_pretty",
build_file_proto_mode = "disable_global",
importpath = "github.com/tidwall/pretty",
msp/operationdocs: write to Notion instead of Markdown (#62325) Closes https://github.com/sourcegraph/managed-services/issues/1076 aka closes CORE-28 - https://github.com/sourcegraph/managed-services/pull/1332 also automated the updates. Notes: 1. Notion anchors are ID-based, so we strip all anchor links because we cannot generate them in one pass. `notionreposync` may implement a mechanism for this in the future (filed https://github.com/sourcegraph/notionreposync/issues/8), but for now we don't have a great way around this, especially because of the next point 2. In-place updates are hard because of the block structure, so we destroy page contents and recreate the page every time. This causes a "flicker" as a viewer may see the page disappear slowly before their eyes (we can only delete things 1 block at a time). `notionreposync` may may implement an improved mechanism for this in the future (filed https://github.com/sourcegraph/notionreposync/issues/7) 3. There's something funky going wrong with line breaks, filed https://github.com/sourcegraph/notionreposync/issues/9 - it hurts readability but it's not unmanageable. 4. Sadly Notion does not allow API file uploads (😡 https://developers.notion.com/docs/working-with-files-and-media#uploading-files-and-media-via-the-notion-api), so we generate them into the managed-services repo (https://github.com/sourcegraph/managed-services/pull/1332) and then just link to those diagrams from the generated page. We use a Markdown file that renders the SVG because the native SVG viewer sucks. 5. Made misc changes to operationdocs output where Notion's version is noticeably worse, or difficult to support (tables, lists-in-admonitions, etc) Depends on various improvements upstream in https://github.com/sourcegraph/notionreposync: - https://github.com/sourcegraph/notionreposync/pull/4 - https://github.com/sourcegraph/notionreposync/pull/5 - https://github.com/sourcegraph/notionreposync/pull/6 Follow-up improvements: - CORE-105 - CORE-106 ## Test plan ``` sg msp ops generate-handbook-pages ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/9d314a97-5370-4123-9534-f9f897002110) https://sourcegraph.notion.site/Build-Tracker-infrastructure-operations-bd66bf25d65d41b4875874a6f4d350cc ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/69e1eb48-2fa9-421b-b2fd-969e25f37fee) https://github.com/sourcegraph/managed-services/pull/1332 --------- Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
2024-05-03 21:17:16 +00:00
sum = "h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=",
version = "v1.2.1",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "com_github_titanous_rocacheck",
build_file_proto_mode = "disable_global",
importpath = "github.com/titanous/rocacheck",
sum = "h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0=",
version = "v0.0.0-20171023193734-afe73141d399",
)
go_repository(
# This is no longer used but we keep it for backwards compatability
# tests while on 5.2.x.
name = "com_github_tj_assert",
build_file_proto_mode = "disable_global",
importpath = "github.com/tj/assert",
sum = "h1:NSWpaDaurcAJY7PkL8Xt0PhZE7qpvbZl5ljd8r6U0bI=",
version = "v0.0.0-20190920132354-ee03d75cd160",
) # keep
go_repository(
name = "com_github_tj_go_naturaldate",
build_file_proto_mode = "disable_global",
importpath = "github.com/tj/go-naturaldate",
sum = "h1:OgJIPkR/Jk4bFMBLbxZ8w+QUxwjqSvzd9x+yXocY4RI=",
version = "v1.3.0",
)
go_repository(
name = "com_github_tklauser_go_sysconf",
build_file_proto_mode = "disable_global",
importpath = "github.com/tklauser/go-sysconf",
sum = "h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=",
version = "v0.3.12",
)
go_repository(
name = "com_github_tklauser_numcpus",
build_file_proto_mode = "disable_global",
importpath = "github.com/tklauser/numcpus",
sum = "h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=",
version = "v0.6.1",
)
self hosted models (#63899) This PR is stacked on top of all the prior work @chrsmith has done for shuffling configuration data around; it implements the new "Self hosted models" functionality. ## Configuration Configuring a Sourcegraph instance to use self-hosted models basically involves adding some configuration like this to the site config (if you set `modelConfiguration`, you are opting in to the new system which is in early access): ``` // Setting this field means we are opting into the new Cody model configuration system. "modelConfiguration": { // Disable use of Sourcegraph's servers for model discovery "sourcegraph": null, // Create two model providers "providerOverrides": [ { // Our first model provider "mistral" will be a Huggingface TGI deployment which hosts our // mistral model for chat functionality. "id": "mistral", "displayName": "Mistral", "serverSideConfig": { "type": "huggingface-tgi", "endpoints": [{"url": "https://mistral.example.com/v1"}] }, }, { // Our second model provider "bigcode" will be a Huggingface TGI deployment which hosts our // bigcode/starcoder model for code completion functionality. "id": "bigcode", "displayName": "Bigcode", "serverSideConfig": { "type": "huggingface-tgi", "endpoints": [{"url": "http://starcoder.example.com/v1"}] } } ], // Make these two models available to Cody users "modelOverridesRecommendedSettings": [ "mistral::v1::mixtral-8x7b-instruct", "bigcode::v1::starcoder2-7b" ], // Configure which models Cody will use by default "defaultModels": { "chat": "mistral::v1::mixtral-8x7b-instruct", "fastChat": "mistral::v1::mixtral-8x7b-instruct", "codeCompletion": "bigcode::v1::starcoder2-7b" } } ``` More advanced configurations are possible, the above is our blessed configuration for today. ## Hosting models Another major component of this work is starting to build up recommendations around how to self-host models, which ones to use, how to configure them, etc. For now, we've been testing with these two on a machine with dual A100s: * Huggingface TGI (this is a Docker container for model inference, which provides an OpenAI-compatible API - and is widely popular) * Two models: * Starcoder2 for code completion; specifically `bigcode/starcoder2-15b` with `eetq` 8-bit quantization. * Mixtral 8x7b instruct for chat; specifically `casperhansen/mixtral-instruct-awq` which uses `awq` 4-bit quantization. This is our 'starter' configuration. Other models - specifically other starcoder 2, and mixtral instruct models - certainly work too, and higher parameter versions may of course provide better results. Documentation for how to deploy Huggingface TGI, suggested configuration and debugging tips - coming soon. ## Advanced configuration As part of this effort, I have added a quite extensive set of configuration knobs to to the client side model configuration (see `type ClientSideModelConfigOpenAICompatible` in this PR) Some of these configuration options are needed for things to work at a basic level, while others (e.g. prompt customization) are not needed for basic functionality, but are very important for customers interested in self-hosting their own models. Today, Cody clients have a number of different _autocomplete provider implementations_ which tie model-specific logic to enable autocomplete, to a provider. For example, if you use a GPT model through Azure OpenAI, the autocomplete provider for that is entirely different from what you'd get if you used a GPT model through OpenAI officially. This can lead to some subtle issues for us, and so it is worth exploring ways to have a _generalized autocomplete provider_ - and since with self-hosted models we _must_ address this problem, these configuration knobs fed to the client from the server are a pathway to doing that - initially just for self-hosted models, but in the future possibly generalized to other providers. ## Debugging facilities Working with customers in the past to use OpenAI-compatible APIs, we've learned that debugging can be quite a pain. If you can't see what requests the Sourcegraph backend is making, and what it is getting back.. it can be quite painful to debug. This PR implements quite extensive logging, and a `debugConnections` flag which can be turned on to enable logging of the actual request payloads and responses. This is critical when a customer is trying to add support for a new model, their own custom OpenAI API service, etc. ## Robustness Working with customers in the past, we also learned that various parts of our backend `openai` provider were not super robust. For example, [if more than one message was present it was a fatal error](https://github.com/sourcegraph/sourcegraph/blob/main/internal/completions/client/openai/openai.go#L305), or if the SSE stream yielded `{"error"}` payloads, they would go ignored. Similarly, the SSE event stream parser we use is heavily tailored towards [the exact response structure](https://github.com/sourcegraph/sourcegraph/blob/main/internal/completions/client/openai/decoder.go#L15-L19) which OpenAI's official API returns, and is therefor quite brittle if connecting to a different SSE stream. For this work, I have _started by forking_ our `internal/completions/client/openai` - and made a number of major improvements to it to make it more robust, handle errors better, etc. I have also replaced the usage of a custom SSE event stream parser - which was not spec compliant and brittle - with a proper SSE event stream parser that recently popped up in the Go community: https://github.com/tmaxmax/go-sse My intention is that after more extensive testing, this new `internal/completions/client/openaicompatible` provider will be more robust, more correct, and all around better than `internal/completions/client/openai` (and possibly the azure one) so that we can just supersede those with this new `openaicompatible` one entirely. ## Client implementation Much of the work done in this PR is just "let the site admin configure things, and broadcast that config to the client through the new model config system." Actually getting the clients to respect the new configuration, is a task I am tackling in future `sourcegraph/cody` PRs. ## Test plan 1. This change currently lacks any unit/regression tests, that is a major noteworthy point. I will follow-up with those in a future PR. * However, these changes are **incredibly** isolated, clearly only affecting customers who opt-in to this new self-hosted models configuration. * Most of the heavy lifting (SSE streaming, shuffling data around) is done in other well-tested codebases. 2. Manual testing has played a big role here, specifically: * Running a dev instance with the new configuration, actually connected to Huggingface TGI deployed on a remote server. * Using the new `debugConnections` mechanism (which customers would use) to directly confirm requests are going to the right places, with the right data and payloads. * Confirming with a new client (changes not yet landed) that autocomplete and chat functionality work. Can we use more testing? Hell yeah, and I'm going to add it soon. Does it work quite well and have small room for error? Also yes. ## Changelog Cody Enterprise: added a new configuration for self-hosting models. Reach out to support if you would like to use this feature as it is in early access. --------- Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
2024-07-19 01:34:02 +00:00
go_repository(
name = "com_github_tmaxmax_go_sse",
build_file_proto_mode = "disable_global",
importpath = "github.com/tmaxmax/go-sse",
sum = "h1:pPpTgyyi1r7vG2o6icebnpGEh3ebcnBXqDWkb7aTofs=",
version = "v0.8.0",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "com_github_tmc_dot",
build_file_proto_mode = "disable_global",
importpath = "github.com/tmc/dot",
sum = "h1:hwIpbdjckSFqmZ6hod7WZgGR7tVVrSUzZrBfNZl7AOg=",
version = "v0.0.0-20210901225022-f9bc17da75c0",
)
go_repository(
name = "com_github_tmc_grpc_websocket_proxy",
build_file_proto_mode = "disable_global",
importpath = "github.com/tmc/grpc-websocket-proxy",
sum = "h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE=",
version = "v0.0.0-20220101234140-673ab2c3ae75",
)
go_repository(
name = "com_github_tomnomnom_linkheader",
build_file_proto_mode = "disable_global",
importpath = "github.com/tomnomnom/linkheader",
sum = "h1:nrZ3ySNYwJbSpD6ce9duiP+QkD3JuLCcWkdaehUS/3Y=",
version = "v0.0.0-20180905144013-02ca5825eb80",
)
go_repository(
name = "com_github_tonistiigi_fsutil",
build_file_proto_mode = "disable_global",
importpath = "github.com/tonistiigi/fsutil",
sum = "h1:uUe8rNyVXM8moActoBol6Xf6xX2GMr7SosR2EywMvGg=",
version = "v0.0.0-20230629203738-36ef4d8c0dbb",
)
go_repository(
name = "com_github_tonistiigi_go_actions_cache",
build_file_proto_mode = "disable_global",
importpath = "github.com/tonistiigi/go-actions-cache",
sum = "h1:8eY6m1mjgyB8XySUR7WvebTM8D/Vs86jLJzD/Tw7zkc=",
version = "v0.0.0-20220404170428-0bdeb6e1eac7",
)
go_repository(
name = "com_github_tonistiigi_go_archvariant",
build_file_proto_mode = "disable_global",
importpath = "github.com/tonistiigi/go-archvariant",
sum = "h1:5LC1eDWiBNflnTF1prCiX09yfNHIxDC/aukdhCdTyb0=",
version = "v1.0.0",
)
go_repository(
name = "com_github_tonistiigi_units",
build_file_proto_mode = "disable_global",
importpath = "github.com/tonistiigi/units",
sum = "h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0=",
version = "v0.0.0-20180711220420-6950e57a87ea",
)
go_repository(
name = "com_github_tonistiigi_vt100",
build_file_proto_mode = "disable_global",
importpath = "github.com/tonistiigi/vt100",
sum = "h1:Y/M5lygoNPKwVNLMPXgVfsRT40CSFKXCxuU8LoHySjs=",
version = "v0.0.0-20230623042737-f9a4f7ef6531",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_tursodatabase_libsql_client_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/tursodatabase/libsql-client-go",
sum = "h1:Y6cw8yjWCEJDy5Bll7HjTinkgTQU55AXiKSEe29SpgA=",
version = "v0.0.0-20240411070317-a1138d155304",
)
go_repository(
name = "com_github_uber_gonduit",
build_file_proto_mode = "disable_global",
importpath = "github.com/uber/gonduit",
sum = "h1:rP4TE8ZWChXDIkExuPMvB1TLWZWBrBQfY5qhIvJwKhk=",
version = "v0.13.0",
)
go_repository(
name = "com_github_uber_jaeger_client_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/uber/jaeger-client-go",
sum = "h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o=",
version = "v2.30.0+incompatible",
)
go_repository(
name = "com_github_uber_jaeger_lib",
build_file_proto_mode = "disable_global",
importpath = "github.com/uber/jaeger-lib",
sum = "h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg=",
version = "v2.4.1+incompatible",
)
go_repository(
name = "com_github_ugorji_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/ugorji/go",
chore/deps: upgrade alertmanager package dependency, improve logs and tests (#63329) Upgrades to our forked update v0.27.0, which matches the Alertmanager version we deploy: https://github.com/sourcegraph/alertmanager/commit/3695ef8bcc9a5bf22945c43067b092e79644f1f3. Upon closer inspection I also realized I upgraded `prometheus/common` too far in https://github.com/sourcegraph/sourcegraph/pull/63328 - I've downgraded it to match the revision of Alertmanager we are using, while _also_ fulfilling the OpenFGA dependency https://github.com/sourcegraph/sourcegraph/pull/63329#discussion_r1646630946 for https://github.com/sourcegraph/sourcegraph/pull/63173 💀 The latest version of `prometheus/common` marshals configuration values that are unknown to our version of Alertmanager (v0.27.0) which rejects the generated configuration from `prom-wrapper`. I've also made a few updates to improve the testing and improve the prometheus and alertmanager output by forwarding them to differently-scoped loggers and crude conversion of the log levels: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/d6e36a72-ad4f-4524-9061-89504776edfb) Related: https://github.com/sourcegraph/sourcegraph/pull/63171 Closes CORE-186 ## Test plan `sg start` and `sg run prometheus`, update some alerting configs in http://localhost:9090/alertmanager/#/status: <img src="https://github.com/sourcegraph/sourcegraph/assets/23356519/56cef853-ac39-4035-b584-57aec83e8301" width="30%"> In personal settings: ```json { "alerts.hideObservabilitySiteAlerts": false } ``` No banners show up indicating Prometheus is unhealthy.
2024-06-19 20:46:30 +00:00
sum = "h1:j4s+tAvLfL3bZyefP2SEWmhBzmuIlH/eqNuPdFPgngw=",
version = "v1.1.4",
)
go_repository(
name = "com_github_ugorji_go_codec",
build_file_proto_mode = "disable_global",
importpath = "github.com/ugorji/go/codec",
sum = "h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=",
version = "v1.2.7",
)
go_repository(
name = "com_github_urfave_cli",
build_file_proto_mode = "disable_global",
importpath = "github.com/urfave/cli",
sum = "h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8=",
version = "v1.22.12",
)
go_repository(
name = "com_github_urfave_cli_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/urfave/cli/v2",
sg msp: initial prototype (#55905) The eventual goal is to be able to generate a spec somewhat close to the infrastructure definitions for Cody Gateway today based on the way we generate infrastructure for Cloud - see go/rfc-msp . This PR is a first-step prototype to demonstrate CDKTF integration, draft out the sketch as proposed in go/rfc-msp, and lay out some basic architecture for the stuff. A barebones CDKTF setup that imitates ~most of the Cody Gateway setup can be generated and interacted with (see test plan), but has not been applied live anywhere - a few components are still missing, and a migration plan needs to be determined. The current goal is to land this PR as-is and iterate from here. The new command set `sg msp` is only included with the `msp` build tag, so it won't be distributed just yet. To install a version of `sg` that includes a functional `sg msp` command, run: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg install -f -p=false ``` In a vanilla build of `sg`, you'll get an error when trying to use `sg msp`: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/15c6cde2-25c2-439e-b41d-b674cc36f23f) ## Binary size Thanks to Michael's improvements to generated CDKTF Go modules, we are not looking at a 500MB increase in `sg` binary sizes, but we are still faced with a ~20% increase at the moment: ```sh # Fresh sg installation $ curl --proto '=https' --tlsv1.2 -sSLf https://install.sg.dev | sh $ du -h $(which sg) 132M /Users/robert@sourcegraph.com/.sg/sg # MSP-enabled sg build $ go build -tags=msp -o=./sg ./dev/sg && du -h ./sg 161M ./sg ``` However, the _default_ build of `sg` continues to not include `msp`, so the binary size remains the same: ```sh $ go build -o=./sg ./dev/sg && du -h ./sg 132M ./sg ``` ## Architecture See `dev/managedservicesplatform/internal/stack/README.md` and `dev/managedservicesplatform/internal/resource/README.md` for some rudimentary docs on some CDKTF conventions. ## Specifications Set up initial specifications here: https://github.com/sourcegraph/managed-services ## Test plan Currently: ``` go build -tags=msp -o=./sg ./dev/sg && ./sg msp generate -o=./tmp ./dev/sg/msp/example/example-service.service.yaml dev ``` And check out the `./tmp` output. Each module is plan-able out of the box right now, as we default to a local Terraform backend: ``` cd ./tmp asdf install # a .tool-versions is generated cd stacks/project terraform init terraform plan ``` --------- Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-09-08 00:24:34 +00:00
sum = "h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs=",
version = "v2.25.7",
)
go_repository(
name = "com_github_urfave_negroni",
build_file_proto_mode = "disable_global",
importpath = "github.com/urfave/negroni",
sum = "h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc=",
version = "v1.0.0",
)
go_repository(
name = "com_github_valyala_bytebufferpool",
build_file_proto_mode = "disable_global",
importpath = "github.com/valyala/bytebufferpool",
sum = "h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=",
version = "v1.0.0",
)
go_repository(
name = "com_github_valyala_fasthttp",
build_file_proto_mode = "disable_global",
importpath = "github.com/valyala/fasthttp",
sum = "h1:wqBQpxH71XW0e2g+Og4dzQM8pk34aFYlA1Ga8db7gU0=",
version = "v1.52.0",
)
go_repository(
name = "com_github_valyala_fasttemplate",
build_file_proto_mode = "disable_global",
importpath = "github.com/valyala/fasttemplate",
sum = "h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=",
version = "v1.2.2",
)
go_repository(
name = "com_github_valyala_tcplisten",
build_file_proto_mode = "disable_global",
importpath = "github.com/valyala/tcplisten",
sum = "h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=",
version = "v1.0.0",
)
go_repository(
name = "com_github_vbatts_tar_split",
build_file_proto_mode = "disable_global",
importpath = "github.com/vbatts/tar-split",
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
sum = "h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts=",
version = "v0.11.5",
)
go_repository(
name = "com_github_vektah_gqlparser_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/vektah/gqlparser/v2",
sum = "h1:C02NsyEsL4TXJB7ndonqTfuQOL4XPIu0aAWugdmTgmc=",
version = "v2.4.5",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_vertica_vertica_sql_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/vertica/vertica-sql-go",
sum = "h1:fL+FKEAEy5ONmsvya2WH5T8bhkvY27y/Ik3ReR2T+Qw=",
version = "v1.3.3",
)
go_repository(
name = "com_github_vmihailenco_msgpack_v5",
build_file_proto_mode = "disable_global",
importpath = "github.com/vmihailenco/msgpack/v5",
sum = "h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU=",
version = "v5.3.5",
)
go_repository(
name = "com_github_vmihailenco_tagparser_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/vmihailenco/tagparser/v2",
sum = "h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=",
version = "v2.0.0",
)
go_repository(
name = "com_github_vultr_govultr_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/vultr/govultr/v2",
sum = "h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs=",
version = "v2.17.2",
)
go_repository(
name = "com_github_vvakame_gcplogurl",
build_file_proto_mode = "disable_global",
importpath = "github.com/vvakame/gcplogurl",
sum = "h1:dH55ru2OQOIAKjZi5wwXjNnSfN0oXLFYkMQy908s+tU=",
version = "v0.2.0",
)
2023-01-31 18:02:34 +00:00
go_repository(
name = "com_github_wk8_go_ordered_map_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/wk8/go-ordered-map/v2",
msp: generate projectID up-front and persist in spec (#59220) This is a big diff, but they all tie together, so hear me out: The only way to get the project ID right now is to query the appropriate Terraform Cloud workspace outputs. However, to do that, you need access to `sourcegraph-secrets`, to get the appropriate TFC access token. This is awkward because as an operator, you would follow the instructions to request `mspServiceEditor` on your desired project - but now, to use various MSP tooling like `sg msp pg connect`, you must _also_ request access to `sourcegraph-secrets`, so that we can get a TFC token to find the project ID and other stuff. Because we might have a large number of services it's not feasible to manually set up Entitle bundles (they cannot be programmatically created). The approach I want to take is to copy the MSP team TFC token from `sourcegraph-secrets` into each individual MSP environment project. Then, we can get the MSP team TFC token from the _environment_ project instead, access for which will be granted by the `mspServiceEditor` role. To do this however, we must know the project ID up front. So this PR makes the following changes: 1. Makes it so that the randomized project ID isn't managed by Terraform, but generated statically, and configured in `environments[].projectID`. 2. This requires changes to `sg msp init` to create a project ID the same way we create it in-Terraform today, but in addition to service initialization, we must now also have tooling to start configuration a new environment as well, so that we can generate a project ID for the operator. This is done via a new command, `sg msp init-env`, which inserts a new environment into a service spec. - MSP service specs are intended to be operator-written and hopefully include lots of docstrings on configuration, so we take special care to preserve formatting and comments by manipulating `yaml.Node` directly. 4. In order to use `yaml.Node`, however, we must switch over to `gopkg.in/yaml.v3` - previously, we used the K8S YAML library, mostly as a carry-over from what is used in Cloud. In order to use `gopkg.in/yaml.v3`, we need to: - Replace all `json` struct tags with `yaml`, as the YAML library does not support JSON tags - Upgrade `github.com/invopop/jsonschema` so that we can point the JSON schema generator to use the `yaml` tags as well 5. Now that we have `projectID` statically available, we can remove code that queries TFC workspaces for the project ID and replace them with references to the spec instead. ## Test plan 1. Unit tests on `sg msp init`'s generated output 2. Unit tests on inserting environment 3. Unit tests on project ID generator 4. https://github.com/sourcegraph/managed-services/pull/295
2023-12-23 01:25:40 +00:00
sum = "h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=",
version = "v2.1.8",
2023-01-31 18:02:34 +00:00
)
go_repository(
name = "com_github_wsxiaoys_terminal",
build_file_proto_mode = "disable_global",
importpath = "github.com/wsxiaoys/terminal",
sum = "h1:3UeQBvD0TFrlVjOeLOBz+CPAI8dnbqNSVwUwRrkp7vQ=",
version = "v0.0.0-20160513160801-0940f3fc43a0",
)
go_repository(
name = "com_github_xanzy_go_gitlab",
build_file_proto_mode = "disable_global",
importpath = "github.com/xanzy/go-gitlab",
sum = "h1:jR8V9cK9jXRQDb46KOB20NCF3ksY09luaG0IfXE6p7w=",
version = "v0.86.0",
)
go_repository(
name = "com_github_xanzy_ssh_agent",
build_file_proto_mode = "disable_global",
importpath = "github.com/xanzy/ssh-agent",
sum = "h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=",
version = "v0.3.3",
)
go_repository(
name = "com_github_xdg_go_pbkdf2",
build_file_proto_mode = "disable_global",
importpath = "github.com/xdg-go/pbkdf2",
sum = "h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=",
version = "v1.0.0",
)
go_repository(
name = "com_github_xdg_go_scram",
build_file_proto_mode = "disable_global",
importpath = "github.com/xdg-go/scram",
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
sum = "h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY=",
version = "v1.1.2",
)
go_repository(
name = "com_github_xdg_go_stringprep",
build_file_proto_mode = "disable_global",
importpath = "github.com/xdg-go/stringprep",
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
sum = "h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8=",
version = "v1.0.4",
)
go_repository(
name = "com_github_xeipuuv_gojsonpointer",
build_file_proto_mode = "disable_global",
importpath = "github.com/xeipuuv/gojsonpointer",
sum = "h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo=",
version = "v0.0.0-20190905194746-02993c407bfb",
)
go_repository(
name = "com_github_xeipuuv_gojsonreference",
build_file_proto_mode = "disable_global",
importpath = "github.com/xeipuuv/gojsonreference",
sum = "h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=",
version = "v0.0.0-20180127040603-bd5ef7bd5415",
)
go_repository(
name = "com_github_xeipuuv_gojsonschema",
build_file_proto_mode = "disable_global",
importpath = "github.com/xeipuuv/gojsonschema",
sum = "h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=",
version = "v1.2.0",
)
go_repository(
name = "com_github_xeonx_timeago",
build_file_proto_mode = "disable_global",
importpath = "github.com/xeonx/timeago",
sum = "h1:9rRzv48GlJC0vm+iBpLcWAr8YbETyN9Vij+7h2ammz4=",
version = "v1.0.0-rc4",
)
go_repository(
name = "com_github_xhit_go_str2duration_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/xhit/go-str2duration/v2",
sum = "h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc=",
version = "v2.1.0",
)
go_repository(
name = "com_github_xiang90_probing",
build_file_proto_mode = "disable_global",
importpath = "github.com/xiang90/probing",
sum = "h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=",
version = "v0.0.0-20190116061207-43a291ad63a2",
)
go_repository(
name = "com_github_xlab_treeprint",
build_file_proto_mode = "disable_global",
importpath = "github.com/xlab/treeprint",
sum = "h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ=",
version = "v1.2.0",
)
go_repository(
name = "com_github_xo_terminfo",
build_file_proto_mode = "disable_global",
importpath = "github.com/xo/terminfo",
sum = "h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=",
version = "v0.0.0-20220910002029-abceb7e1c41e",
)
go_repository(
name = "com_github_xordataexchange_crypt",
build_file_proto_mode = "disable_global",
importpath = "github.com/xordataexchange/crypt",
sum = "h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow=",
version = "v0.0.3-0.20170626215501-b2862e3d0a77",
)
go_repository(
name = "com_github_xrash_smetrics",
build_file_proto_mode = "disable_global",
importpath = "github.com/xrash/smetrics",
sum = "h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=",
version = "v0.0.0-20201216005158-039620a65673",
)
go_repository(
name = "com_github_xsam_otelsql",
build_file_proto_mode = "disable_global",
importpath = "github.com/XSAM/otelsql",
sum = "h1:i9xtxtdcqXV768a5C6SoT/RkG+ue3JTOgkYInzlTOqs=",
version = "v0.27.0",
)
go_repository(
name = "com_github_yalp_jsonpath",
build_file_proto_mode = "disable_global",
importpath = "github.com/yalp/jsonpath",
sum = "h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY=",
version = "v0.0.0-20180802001716-5cc68e5049a0",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_ydb_platform_ydb_go_genproto",
build_file_proto_mode = "disable_global",
importpath = "github.com/ydb-platform/ydb-go-genproto",
sum = "h1:ckwNHVo4bv2tqNkgx3W3HANh3ta1j6TR5qw08J1A7Tw=",
version = "v0.0.0-20240126124512-dbb0e1720dbf",
)
go_repository(
name = "com_github_ydb_platform_ydb_go_sdk_v3",
build_file_proto_mode = "disable_global",
importpath = "github.com/ydb-platform/ydb-go-sdk/v3",
sum = "h1:Ebo6J5AMXgJ3A438ECYotA0aK7ETqjQx9WoZvVxzKBE=",
version = "v3.55.1",
)
go_repository(
name = "com_github_yosssi_ace",
build_file_proto_mode = "disable_global",
importpath = "github.com/yosssi/ace",
sum = "h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA=",
version = "v0.0.5",
)
go_repository(
name = "com_github_youmark_pkcs8",
build_file_proto_mode = "disable_global",
importpath = "github.com/youmark/pkcs8",
sum = "h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=",
version = "v0.0.0-20181117223130-1be2e3e5546d",
)
go_repository(
name = "com_github_yudai_gojsondiff",
build_file_proto_mode = "disable_global",
importpath = "github.com/yudai/gojsondiff",
sum = "h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA=",
version = "v1.0.0",
)
go_repository(
name = "com_github_yudai_golcs",
build_file_proto_mode = "disable_global",
importpath = "github.com/yudai/golcs",
sum = "h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M=",
version = "v0.0.0-20170316035057-ecda9a501e82",
)
go_repository(
name = "com_github_yuin_goldmark",
build_file_proto_mode = "disable_global",
importpath = "github.com/yuin/goldmark",
sum = "h1:NjGd7lO7zrUn/A7eKwn5PEOt4ONYGqpxSEeZuduvgxc=",
version = "v1.7.2",
)
go_repository(
name = "com_github_yuin_goldmark_emoji",
build_file_proto_mode = "disable_global",
importpath = "github.com/yuin/goldmark-emoji",
sum = "h1:c/RgTShNgHTtc6xdz2KKI74jJr6rWi7FPgnP9GAsO5s=",
version = "v1.0.2",
)
go_repository(
name = "com_github_yuin_goldmark_highlighting_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/yuin/goldmark-highlighting/v2",
sum = "h1:Py16JEzkSdKAtEFJjiaYLYBOWGXc1r/xHj/Q/5lA37k=",
version = "v2.0.0-20220924101305-151362477c87",
)
go_repository(
name = "com_github_yuin_gopher_lua",
build_file_proto_mode = "disable_global",
importpath = "github.com/yuin/gopher-lua",
sum = "h1:k/gmLsJDWwWqbLCur2yWnJzwQEKRcAHXo6seXGuSwWw=",
version = "v0.0.0-20210529063254-f4c35e4016d9",
)
go_repository(
name = "com_github_yusufpapurcu_wmi",
build_file_proto_mode = "disable_global",
importpath = "github.com/yusufpapurcu/wmi",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=",
version = "v1.2.4",
)
go_repository(
name = "com_github_yvasiyarov_go_metrics",
build_file_proto_mode = "disable_global",
importpath = "github.com/yvasiyarov/go-metrics",
sum = "h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=",
version = "v0.0.0-20140926110328-57bccd1ccd43",
)
go_repository(
name = "com_github_yvasiyarov_gorelic",
build_file_proto_mode = "disable_global",
importpath = "github.com/yvasiyarov/gorelic",
sum = "h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=",
version = "v0.0.0-20141212073537-a9bba5b9ab50",
)
go_repository(
name = "com_github_yvasiyarov_newrelic_platform_go",
build_file_proto_mode = "disable_global",
importpath = "github.com/yvasiyarov/newrelic_platform_go",
sum = "h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY=",
version = "v0.0.0-20140908184405-b21fdbd4370f",
)
go_repository(
name = "com_github_zeebo_assert",
build_file_proto_mode = "disable_global",
importpath = "github.com/zeebo/assert",
sum = "h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=",
version = "v1.3.0",
)
go_repository(
name = "com_github_zeebo_xxh3",
build_file_proto_mode = "disable_global",
importpath = "github.com/zeebo/xxh3",
sum = "h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=",
version = "v1.0.2",
)
go_repository(
name = "com_github_zenazn_goji",
build_file_proto_mode = "disable_global",
importpath = "github.com/zenazn/goji",
sum = "h1:4lbD8Mx2h7IvloP7r2C0D6ltZP6Ufip8Hn0wmSK5LR8=",
version = "v1.0.1",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "com_github_ziutek_mymysql",
build_file_proto_mode = "disable_global",
importpath = "github.com/ziutek/mymysql",
sum = "h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs=",
version = "v1.5.4",
)
go_repository(
name = "com_google_cloud_go",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go",
sum = "h1:OIPFAdfrFDFO2ve2U7r/H5SwSbBzEdrBdE7xkgwc+kY=",
version = "v0.114.0",
)
go_repository(
name = "com_google_cloud_go_accessapproval",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/accessapproval",
sum = "h1:fMbP4cJX/926h+kwGtABmcG83PXsjkB+q7nSBzZpJoo=",
version = "v1.7.6",
)
go_repository(
name = "com_google_cloud_go_accesscontextmanager",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/accesscontextmanager",
sum = "h1:NipmPd3BCzwa/mr40SK8pWRkbzv9Th5Azhi4dBYazlM=",
version = "v1.8.6",
)
go_repository(
name = "com_google_cloud_go_aiplatform",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/aiplatform",
sum = "h1:bbFYY4JInclG10czRFUYj2rjD+obhh3Gi9zVlyoMgEc=",
version = "v1.66.0",
)
go_repository(
name = "com_google_cloud_go_analytics",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/analytics",
sum = "h1:UH/PWBcPxHKolWxaS3hO+aj+wDTuq7XKvdtpqR3lyOI=",
version = "v0.23.1",
)
go_repository(
name = "com_google_cloud_go_apigateway",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/apigateway",
sum = "h1:60GMRN1JFwq9MldvEVMdR3gDJ0vI0C/BwgkImG6bx/M=",
version = "v1.6.6",
)
go_repository(
name = "com_google_cloud_go_apigeeconnect",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/apigeeconnect",
sum = "h1:ObsKNGtdu0ckkCSUpCN5fVAVg+DmzFg89JlqsW4OAWk=",
version = "v1.6.6",
)
go_repository(
name = "com_google_cloud_go_apigeeregistry",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/apigeeregistry",
sum = "h1:l8VFHdNMC+9Q4EHKye2eOZBu5IwddXF6ufAXI7D+PB8=",
version = "v0.8.4",
)
go_repository(
name = "com_google_cloud_go_apikeys",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/apikeys",
sum = "h1:B9CdHFZTFjVti89tmyXXrO+7vSNo2jvZuHG8zD5trdQ=",
version = "v0.6.0",
)
go_repository(
name = "com_google_cloud_go_appengine",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/appengine",
sum = "h1:cM+Lj0A0nCtujM9lqRId5L8hz7bHRfu3q3KdKtpn+38=",
version = "v1.8.6",
)
go_repository(
name = "com_google_cloud_go_area120",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/area120",
sum = "h1:7QJ4ZzqLOwh0pHD3UAa+VwiyWmDI7bdmkYKVkte8/wg=",
version = "v0.8.6",
)
go_repository(
name = "com_google_cloud_go_artifactregistry",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/artifactregistry",
sum = "h1:icIyRzJ1Ag6EOafuDuFFJ/AdStcOFRVfSGURn27/7Pk=",
version = "v1.14.8",
)
go_repository(
name = "com_google_cloud_go_asset",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/asset",
sum = "h1:+NpxL5L53VY91EoJTHeGGXSWEUllf2hhXpCyTnSrd3Q=",
version = "v1.18.1",
)
go_repository(
name = "com_google_cloud_go_assuredworkloads",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/assuredworkloads",
sum = "h1:3NlUes0xLN2kcSU24qQADFYsOaetCPg0HSA302AyV5s=",
version = "v1.11.6",
)
go_repository(
name = "com_google_cloud_go_auth_oauth2adapt",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/auth/oauth2adapt",
sum = "h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4=",
version = "v0.2.2",
)
go_repository(
name = "com_google_cloud_go_automl",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/automl",
sum = "h1:NHBO5cjo2IgwaJ5qlez/iA35XI1db87PPlOB0Kjt5RM=",
version = "v1.13.6",
)
go_repository(
name = "com_google_cloud_go_baremetalsolution",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/baremetalsolution",
sum = "h1:jCR4rnVsG6ocK6ngFr2Z6ugKZfTENmMZkiV6Ma2tEeE=",
version = "v1.2.5",
)
go_repository(
name = "com_google_cloud_go_batch",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/batch",
sum = "h1:b9fVZDxxp4LWMhXV7uAhyMGmPuzlzPrsZ0uh+RM92h8=",
version = "v1.8.3",
)
go_repository(
name = "com_google_cloud_go_beyondcorp",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/beyondcorp",
sum = "h1:fnil8viEdcAJJiwiJPCT2fl3Grx3XFwXxTq7n9g/8QM=",
version = "v1.0.5",
)
go_repository(
name = "com_google_cloud_go_bigquery",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/bigquery",
sum = "h1:kA96WfgvCbkqfLnr7xI5uEfJ4h4FrnkdEb0yty0KSZo=",
version = "v1.60.0",
)
go_repository(
name = "com_google_cloud_go_billing",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/billing",
sum = "h1:XcYB8aKj97d4/0kh+LQgrxPxOo/0jgPNp5Q1nyzCyvs=",
version = "v1.18.4",
)
go_repository(
name = "com_google_cloud_go_binaryauthorization",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/binaryauthorization",
sum = "h1:XiAdW5HAWtk9WEjEA5MXYiRJ28Tjp1xGPPAMRFI5bnc=",
version = "v1.8.2",
)
go_repository(
name = "com_google_cloud_go_certificatemanager",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/certificatemanager",
sum = "h1:oc15T+leZ2Wm5oocvGTbDXwonka0chpJTEiHIVsBiEA=",
version = "v1.8.0",
)
go_repository(
name = "com_google_cloud_go_channel",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/channel",
sum = "h1:rBnTls9G5nC/jOrb9V/tZFHFXt6kBMNlIQKg6DjAlRM=",
version = "v1.17.6",
)
go_repository(
name = "com_google_cloud_go_cloudbuild",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/cloudbuild",
sum = "h1:66hY1gXV2cdn4gquy5TieaJwaZmRzrQ5cK++pVgnCkQ=",
version = "v1.16.0",
)
go_repository(
name = "com_google_cloud_go_clouddms",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/clouddms",
sum = "h1:t1nc49kRzEU2vrDxQQIEc5rZ4Hr187YrdOZPMAgMwMI=",
version = "v1.7.5",
)
dev/msp: add CloudSQL integration (#58420) This PR has 3 major changes: 1. Provisioning a Cloud SQL PostgreSQL instance: `resource.postgreSQL` 2. Updates to the MSP runtime for connecting to the database 3. Publishable `msp-example` for the `msp-testbed` deployment, for testing integrations and other MSP features, and adds an example Gorm setup Closes https://github.com/sourcegraph/sourcegraph/issues/56848. For more context, see go/msp ### `resource.postgreSQL` This change adds `resource.postgreSQL` to the spec for provisioning a Cloud SQL database. Example: ```yaml resources: postgreSQL: databases: ["primary"] cpu: 1 memoryGB: 4 ``` When configured, a Cloud SQL instance is provisioned, and the Cloud Run workload SA is granted access to it. The specified `databases` are also created. `cpu` and `memoryGB` are used to generate the custom VM to provision the instance with. A lot of the base configuration for the database instance are taken directly from what we use in Cloud: https://github.com/sourcegraph/controller/blob/9cac1b1aa0dde038280d424f4d4b6c34ffb22e36/internal/resource/sql/sql.go#L116, and is similar to the Redis setup, in that we need the private peering VPC and install additional certs on the Cloud Run instance. ### MSP runtime `service.Contract` now has a helper, `GetPostgreSQLDB(database)`, for generating the appropriate configuration for creating a connection to a given database and returning a `sql.DB`, which most libraries have adapters for. The helper sets up `pgx.ConnConfig` that uses workload identity to connect directly to Cloud SQL, following the guide here: https://github.com/GoogleCloudPlatform/cloud-sql-go-connector?tab=readme-ov-file#automatic-iam-database-authentication In local dev, `PGDSN` can be used to hardcode an appropriate value. ### `msp-example` I've moved the MSP example from #56846 to the top-level `cmd/msp-example,` and set up some guidance for publishing it. This service now also includes a simple database connection and setup using Gorm, used by https://github.com/sourcegraph/accounts.sourcegraph.com, and can be used for testing, e.g. https://github.com/sourcegraph/managed-services/pull/87 ## Test plan - [x] Deploy https://github.com/sourcegraph/managed-services/pull/87, which will connect to the database and set up some tables - [x] Review diff: https://github.com/sourcegraph/managed-services/actions/runs/6951246277 - [x] Tear down database in https://github.com/sourcegraph/managed-services/pull/87, with caveat: requires state surgery. Should be rare enough (we might prefer to tear down environments entirely) - see docstrings in package `postgresqlroles` --------- Co-authored-by: Michael Lin <mlzc@hey.com> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-11-22 23:32:53 +00:00
go_repository(
name = "com_google_cloud_go_cloudsqlconn",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/cloudsqlconn",
sum = "h1:rMtPv66pkuk2K1ciCicjZY8Ma1DSyOYSoqwPUw/Timo=",
version = "v1.5.1",
)
go_repository(
name = "com_google_cloud_go_cloudtasks",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/cloudtasks",
sum = "h1:Ev+poxwb7pudBhiF0ObwAWT7Dh9BZAcsvAfFTWg0MPc=",
version = "v1.12.7",
)
go_repository(
name = "com_google_cloud_go_compute",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/compute",
sum = "h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU=",
version = "v1.25.1",
)
go_repository(
name = "com_google_cloud_go_compute_metadata",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/compute/metadata",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc=",
version = "v0.3.0",
)
go_repository(
name = "com_google_cloud_go_contactcenterinsights",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/contactcenterinsights",
sum = "h1:sCDKUmDj9Tfd6Qj7x4XbwC43oYzEBwSDLC1tReQWS/Y=",
version = "v1.13.1",
)
go_repository(
name = "com_google_cloud_go_container",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/container",
sum = "h1:y5gmgrMMhTrLnQQdMCw0t/Yis9Ps7jvAG4JYcRWxR8g=",
version = "v1.35.0",
)
go_repository(
name = "com_google_cloud_go_containeranalysis",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/containeranalysis",
sum = "h1:yzohQ0HDoZq2TtCJkbUBsJs9RIR5WbKZlHrD7ilp2yg=",
version = "v0.11.5",
)
go_repository(
name = "com_google_cloud_go_datacatalog",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/datacatalog",
sum = "h1:BGDsEjqpAo0Ka+b9yDLXnE5k+jU3lXGMh//NsEeDMIg=",
version = "v1.20.0",
)
go_repository(
name = "com_google_cloud_go_dataflow",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/dataflow",
sum = "h1:GuZJgkOL64cYySwYEYqQkggdxwoZTk8cvekQW0t3KRM=",
version = "v0.9.6",
)
go_repository(
name = "com_google_cloud_go_dataform",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/dataform",
sum = "h1:0EzWf+c2R5V/ujZBb22H/EL5wpzD/bDFYPA2f3czB1g=",
version = "v0.9.3",
)
go_repository(
name = "com_google_cloud_go_datafusion",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/datafusion",
sum = "h1:zSmMj/qZ0Yk+q/v5Wg40FTJ0WYPCtanYYekRt7cSKJ0=",
version = "v1.7.6",
)
go_repository(
name = "com_google_cloud_go_datalabeling",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/datalabeling",
sum = "h1:2zz44bPbDMHsPanQ89SybqhHDQBH1EZk8icGotyrvSU=",
version = "v0.8.6",
)
go_repository(
name = "com_google_cloud_go_dataplex",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/dataplex",
sum = "h1:Ob8NPT1UcB4kDaDx7/UdsRfZ8xUvUggZshXUlGWDahk=",
version = "v1.15.0",
)
go_repository(
name = "com_google_cloud_go_dataproc",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/dataproc",
sum = "h1:W47qHL3W4BPkAIbk4SWmIERwsWBaNnWm0P2sdx3YgGU=",
version = "v1.12.0",
)
go_repository(
name = "com_google_cloud_go_dataproc_v2",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/dataproc/v2",
sum = "h1:+cM8p/R6FdTuQYlriJOSUCvAZfMDgBKf0/ph9bMIjaY=",
version = "v2.4.1",
)
go_repository(
name = "com_google_cloud_go_dataqna",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/dataqna",
sum = "h1:FI/1q7VnANchQR9ug+nzujfiusLMfC3BHT7/fHi+BVU=",
version = "v0.8.6",
)
go_repository(
name = "com_google_cloud_go_datastore",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/datastore",
dev/msp: add CloudSQL integration (#58420) This PR has 3 major changes: 1. Provisioning a Cloud SQL PostgreSQL instance: `resource.postgreSQL` 2. Updates to the MSP runtime for connecting to the database 3. Publishable `msp-example` for the `msp-testbed` deployment, for testing integrations and other MSP features, and adds an example Gorm setup Closes https://github.com/sourcegraph/sourcegraph/issues/56848. For more context, see go/msp ### `resource.postgreSQL` This change adds `resource.postgreSQL` to the spec for provisioning a Cloud SQL database. Example: ```yaml resources: postgreSQL: databases: ["primary"] cpu: 1 memoryGB: 4 ``` When configured, a Cloud SQL instance is provisioned, and the Cloud Run workload SA is granted access to it. The specified `databases` are also created. `cpu` and `memoryGB` are used to generate the custom VM to provision the instance with. A lot of the base configuration for the database instance are taken directly from what we use in Cloud: https://github.com/sourcegraph/controller/blob/9cac1b1aa0dde038280d424f4d4b6c34ffb22e36/internal/resource/sql/sql.go#L116, and is similar to the Redis setup, in that we need the private peering VPC and install additional certs on the Cloud Run instance. ### MSP runtime `service.Contract` now has a helper, `GetPostgreSQLDB(database)`, for generating the appropriate configuration for creating a connection to a given database and returning a `sql.DB`, which most libraries have adapters for. The helper sets up `pgx.ConnConfig` that uses workload identity to connect directly to Cloud SQL, following the guide here: https://github.com/GoogleCloudPlatform/cloud-sql-go-connector?tab=readme-ov-file#automatic-iam-database-authentication In local dev, `PGDSN` can be used to hardcode an appropriate value. ### `msp-example` I've moved the MSP example from #56846 to the top-level `cmd/msp-example,` and set up some guidance for publishing it. This service now also includes a simple database connection and setup using Gorm, used by https://github.com/sourcegraph/accounts.sourcegraph.com, and can be used for testing, e.g. https://github.com/sourcegraph/managed-services/pull/87 ## Test plan - [x] Deploy https://github.com/sourcegraph/managed-services/pull/87, which will connect to the database and set up some tables - [x] Review diff: https://github.com/sourcegraph/managed-services/actions/runs/6951246277 - [x] Tear down database in https://github.com/sourcegraph/managed-services/pull/87, with caveat: requires state surgery. Should be rare enough (we might prefer to tear down environments entirely) - see docstrings in package `postgresqlroles` --------- Co-authored-by: Michael Lin <mlzc@hey.com> Co-authored-by: Joe Chen <joe@sourcegraph.com>
2023-11-22 23:32:53 +00:00
sum = "h1:0P9WcsQeTWjuD1H14JIY7XQscIPQ4Laje8ti96IC5vg=",
version = "v1.15.0",
)
go_repository(
name = "com_google_cloud_go_datastream",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/datastream",
sum = "h1:nHdOKbFmKJ4tPjGtNNIO0//G7QAht6eHTUnREWPn2yI=",
version = "v1.10.5",
)
go_repository(
name = "com_google_cloud_go_deploy",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/deploy",
sum = "h1:UxcxzjwxGPkT7RBdMmoc5a7QxHQVdpZllD6el2VC3JA=",
version = "v1.17.2",
)
go_repository(
name = "com_google_cloud_go_dialogflow",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/dialogflow",
sum = "h1:B8Y5j4/QsDirX136OoPm62kG3y5gd8rzBpHSR/FW9vI=",
version = "v1.52.0",
)
go_repository(
name = "com_google_cloud_go_dlp",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/dlp",
sum = "h1:dTsEN6r1BoplUACz7teOmE6lRG1swREiwXkfkY7bi6c=",
version = "v1.12.1",
)
go_repository(
name = "com_google_cloud_go_documentai",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/documentai",
sum = "h1:UdDy7nDTwr+mN1KiJqsj5AabauoW9SkgH9eY8BuFXJE=",
version = "v1.26.1",
)
go_repository(
name = "com_google_cloud_go_domains",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/domains",
sum = "h1:NHqZk4XzHFlmXM3LMGwDVET4NKr60W2jaNCRGYod5Ic=",
version = "v0.9.6",
)
go_repository(
name = "com_google_cloud_go_edgecontainer",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/edgecontainer",
sum = "h1:a++vBi1J00NP1ifVP5mV/3j1/EJKWPj0h6NfUPLfuCQ=",
version = "v1.2.0",
)
go_repository(
name = "com_google_cloud_go_errorreporting",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/errorreporting",
sum = "h1:kj1XEWMu8P0qlLhm3FwcaFsUvXChV/OraZwA70trRR0=",
version = "v0.3.0",
)
go_repository(
name = "com_google_cloud_go_essentialcontacts",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/essentialcontacts",
sum = "h1:FDdJGJEXK4RxvT6gdRBqGaCQVpi96RRB7MTyRHUcb20=",
version = "v1.6.7",
)
go_repository(
name = "com_google_cloud_go_eventarc",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/eventarc",
sum = "h1:JMUiLYzxkxr7BqnCPkyJ6Ycgrs6YQlZT44H0rHg7jQY=",
version = "v1.13.5",
)
go_repository(
name = "com_google_cloud_go_filestore",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/filestore",
sum = "h1:BpaB7bxICPUTntAV+yVUK9bxAUOv7uHRSEibSKMBJVA=",
version = "v1.8.2",
)
go_repository(
name = "com_google_cloud_go_firestore",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/firestore",
sum = "h1:/k8ppuWOtNuDHt2tsRV42yI21uaGnKDEQnRFeBpbFF8=",
version = "v1.15.0",
)
go_repository(
name = "com_google_cloud_go_functions",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/functions",
sum = "h1:0kcko/2AKwm4USnWcGs/W/k++PAYPA3dYaQw1y5Xg3M=",
version = "v1.16.1",
)
go_repository(
name = "com_google_cloud_go_gaming",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/gaming",
sum = "h1:7vEhFnZmd931Mo7sZ6pJy7uQPDxF7m7v8xtBheG08tc=",
version = "v1.9.0",
)
go_repository(
name = "com_google_cloud_go_gkebackup",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/gkebackup",
sum = "h1:SATJwsF8PjErP7GwHE+xK8gJ7f7hULuqtazV19ylPgg=",
version = "v1.4.0",
)
go_repository(
name = "com_google_cloud_go_gkeconnect",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/gkeconnect",
sum = "h1:7X9P6lGkOF/nJRYZBQBG2XPhunqWbNMacy9AXN7qUcU=",
version = "v0.8.6",
)
go_repository(
name = "com_google_cloud_go_gkehub",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/gkehub",
sum = "h1:kKreFf+097KfW+Tz/SqZKeXs/eFOjs1NDrsVjRPI18o=",
version = "v0.14.6",
)
go_repository(
name = "com_google_cloud_go_gkemulticloud",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/gkemulticloud",
sum = "h1:CFBoDcQi9zLOkzM6xqmRzljZhF4A6A47QaQ0WtNd+DA=",
version = "v1.1.2",
)
go_repository(
name = "com_google_cloud_go_grafeas",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/grafeas",
sum = "h1:CYjC+xzdPvbV65gi6Dr4YowKcmLo045pm18L0DhdELM=",
version = "v0.2.0",
)
go_repository(
name = "com_google_cloud_go_gsuiteaddons",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/gsuiteaddons",
sum = "h1:q3x2NE0je/tSVL66MAht5YVbGGHjTV9BxFD2lyDQ0dU=",
version = "v1.6.6",
)
go_repository(
name = "com_google_cloud_go_iam",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/iam",
sum = "h1:z4VHOhwKLF/+UYXAJDFwGtNF0b6gjsW1Pk9Ml0U/IoM=",
version = "v1.1.7",
)
go_repository(
name = "com_google_cloud_go_iap",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/iap",
sum = "h1:FrLAtgXzWPwe8rNp7AD+2Lgg4LqyhgXvEdiGK+jtd9g=",
version = "v1.9.5",
)
go_repository(
name = "com_google_cloud_go_ids",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/ids",
sum = "h1:tNc3NpIp2LUmFJxP2CBlzYw0FTnd68r73mIzg8UlM3Q=",
version = "v1.4.6",
)
go_repository(
name = "com_google_cloud_go_iot",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/iot",
sum = "h1:nRV/e1e3lEjsVoD5mW99JERwL8MKohyQyY63+lfBMA4=",
version = "v1.7.6",
)
go_repository(
name = "com_google_cloud_go_kms",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/kms",
sum = "h1:szIeDCowID8th2i8XE4uRev5PMxQFqW+JjwYxL9h6xs=",
version = "v1.15.8",
)
go_repository(
name = "com_google_cloud_go_language",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/language",
sum = "h1:srkreCxnVa5+a5PXUri/K+VWxG50wGvz5+PEYjgaENQ=",
version = "v1.12.4",
)
go_repository(
name = "com_google_cloud_go_lifesciences",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/lifesciences",
sum = "h1:8w3edjRiSN6GCxT0uJoXr6Zo2XNYD+6TxPZa7uIIOaU=",
version = "v0.9.6",
)
go_repository(
name = "com_google_cloud_go_logging",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/logging",
sum = "h1:iEIOXFO9EmSiTjDmfpbRjOxECO7R8C7b8IXUGOj7xZw=",
version = "v1.9.0",
)
go_repository(
name = "com_google_cloud_go_longrunning",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/longrunning",
sum = "h1:xAe8+0YaWoCKr9t1+aWe+OeQgN/iJK1fEgZSXmjuEaE=",
version = "v0.5.6",
)
go_repository(
name = "com_google_cloud_go_managedidentities",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/managedidentities",
sum = "h1:7+hGPQSojhnYNZCg3fG2mQIF7XMfvNpCpi2Zg5/Qx1g=",
version = "v1.6.6",
)
go_repository(
name = "com_google_cloud_go_maps",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/maps",
sum = "h1:vcqmqk0wt1NRzQc84Qo6z8HYyol/znqbG7tAS5Qm91g=",
version = "v1.7.1",
)
go_repository(
name = "com_google_cloud_go_mediatranslation",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/mediatranslation",
sum = "h1:EVW0wCQ7asoMjw8fm8oUe6pQWBaVQth/iquk7ysidy0=",
version = "v0.8.6",
)
go_repository(
name = "com_google_cloud_go_memcache",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/memcache",
sum = "h1:rqDPCIUfVBvv7ojOGx5PRkPgWeWSKpOht2w6plaxklY=",
version = "v1.10.6",
)
go_repository(
name = "com_google_cloud_go_metastore",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/metastore",
sum = "h1:K7gyYoqPvQgCc82tiB0CQkXOpg8AZxJtRGMVdN5B83U=",
version = "v1.13.5",
)
go_repository(
name = "com_google_cloud_go_monitoring",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/monitoring",
sum = "h1:0yvFXK+xQd95VKo6thndjwnJMno7c7Xw1CwMByg0B+8=",
version = "v1.18.1",
)
go_repository(
name = "com_google_cloud_go_networkconnectivity",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/networkconnectivity",
sum = "h1:t67aEKwmO+SXvQC5ncOjm3vTwnsbO/mTzlCWdK0nwqs=",
version = "v1.14.5",
)
go_repository(
name = "com_google_cloud_go_networkmanagement",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/networkmanagement",
sum = "h1:uSoVcd78+uNSW34Q+BNumUvTxAtVaKHc8O9WUz091gg=",
version = "v1.13.0",
)
go_repository(
name = "com_google_cloud_go_networksecurity",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/networksecurity",
sum = "h1:3ggPKshcFs1oRh5qI+Gq1s2CIU9BL99MKtYSBG4Z8s0=",
version = "v0.9.6",
)
go_repository(
name = "com_google_cloud_go_notebooks",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/notebooks",
sum = "h1:A9jxIdxEccgL9iJLqvU4j5HT3/13YluoF2IbiV+hAN4=",
version = "v1.11.4",
)
go_repository(
name = "com_google_cloud_go_optimization",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/optimization",
sum = "h1:T/j8xyIkmHGjU6kxeUjK3UTqiXlbvpZQ2A+F5vnH21Y=",
version = "v1.6.4",
)
go_repository(
name = "com_google_cloud_go_orchestration",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/orchestration",
sum = "h1:i5iSxsu1Cx1itTQEEY/YvsAo1OO8gosGGXhnOjBjgJA=",
version = "v1.9.1",
)
go_repository(
name = "com_google_cloud_go_orgpolicy",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/orgpolicy",
sum = "h1:x9GttuUZXXeKcJgHSGxYoPn2hOJhhuaN5YYJKfAfmLo=",
version = "v1.12.2",
)
go_repository(
name = "com_google_cloud_go_osconfig",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/osconfig",
sum = "h1:wIOhgzklE0hHZsho02rRVXYBHSfsAwYZYIaxFaUBIjs=",
version = "v1.12.6",
)
go_repository(
name = "com_google_cloud_go_oslogin",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/oslogin",
sum = "h1:v71OrrkKyqr5Mfnt345GqSOURzByv08qfrtvfhOVcnc=",
version = "v1.13.2",
)
go_repository(
name = "com_google_cloud_go_phishingprotection",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/phishingprotection",
sum = "h1:DcAre1psFwJM/FBA/MkDj0H6uxZhACE5IW/xF9ssHDQ=",
version = "v0.8.6",
)
go_repository(
name = "com_google_cloud_go_policytroubleshooter",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/policytroubleshooter",
sum = "h1:wxBRfNoMy7rnoEeaTOHIEHCUEdUIQIwQGUqfBWH6cyQ=",
version = "v1.10.4",
)
go_repository(
name = "com_google_cloud_go_privatecatalog",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/privatecatalog",
sum = "h1:bcIABOUmpnzQip83OVv+Ju/NxXjUTRLUSP+FVLFG6kk=",
version = "v0.9.6",
)
go_repository(
name = "com_google_cloud_go_profiler",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/profiler",
sum = "h1:ZeRDZbsOBDyRG0OiK0Op1/XWZ3xeLwJc9zjkzczUxyY=",
version = "v0.4.0",
)
go_repository(
name = "com_google_cloud_go_pubsub",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/pubsub",
sum = "h1:J1OT7h51ifATIedjqk/uBNPh+1hkvUaH4VKbz4UuAsc=",
version = "v1.38.0",
)
go_repository(
name = "com_google_cloud_go_pubsublite",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/pubsublite",
sum = "h1:pX+idpWMIH30/K7c0epN6V703xpIcMXWRjKJsz0tYGY=",
version = "v1.8.1",
)
go_repository(
name = "com_google_cloud_go_recaptchaenterprise",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/recaptchaenterprise",
sum = "h1:u6EznTGzIdsyOsvm+Xkw0aSuKFXQlyjGE9a4exk6iNQ=",
version = "v1.3.1",
)
go_repository(
name = "com_google_cloud_go_recaptchaenterprise_v2",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/recaptchaenterprise/v2",
sum = "h1:nykUP2WD/914jui/IldiCOuoTn6T8ha1Ys6/N9sAqJY=",
version = "v2.12.0",
)
go_repository(
name = "com_google_cloud_go_recommendationengine",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/recommendationengine",
sum = "h1:m0eQtYCToxMSbDKOnpJ2YGdQhyjOPffg4Y8lM2RWzao=",
version = "v0.8.6",
)
go_repository(
name = "com_google_cloud_go_recommender",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/recommender",
sum = "h1:3M6lD39/GlOMYOikeF5wflSa4EP5pGFthoIASbyhIXE=",
version = "v1.12.2",
)
go_repository(
name = "com_google_cloud_go_redis",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/redis",
sum = "h1:zlGxeAsiwcPU+Cta76ALduhdBAVhuYpEjv59V5L/ves=",
version = "v1.14.3",
)
go_repository(
name = "com_google_cloud_go_resourcemanager",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/resourcemanager",
sum = "h1:VPfJFbWxrTYQzEXCDbJNpcvSB8eZhTSM0YHH146fIB8=",
version = "v1.9.6",
)
go_repository(
name = "com_google_cloud_go_resourcesettings",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/resourcesettings",
sum = "h1:l/IbRDDmGJFlR4bRZGtfYvix1Pu0jAKGLr7wgUtixHQ=",
version = "v1.6.6",
)
go_repository(
name = "com_google_cloud_go_retail",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/retail",
sum = "h1:AyVdElkdIU3JedWpX/qENbt8iUmKD+kiyj7ZpzguhTg=",
version = "v1.16.1",
)
go_repository(
name = "com_google_cloud_go_run",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/run",
sum = "h1:xQND6EJn1LgouCLPSfykkzagyr4gq4FKiRexNxXixV0=",
version = "v1.3.6",
)
go_repository(
name = "com_google_cloud_go_scheduler",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/scheduler",
sum = "h1:h1/VZk0XdkSh/jI7dDNp3V0Qi8yTkclOljDVPelXvAw=",
version = "v1.10.7",
)
go_repository(
name = "com_google_cloud_go_secretmanager",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/secretmanager",
sum = "h1:e5pIo/QEgiFiHPVJPxM5jbtUr4O/u5h2zLHYtkFQr24=",
version = "v1.12.0",
)
go_repository(
name = "com_google_cloud_go_security",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/security",
sum = "h1:LYMj7ISEEjVQ0ub6E6ygGhjVbNQTH5CawKZz0bbPMVE=",
version = "v1.15.6",
)
go_repository(
name = "com_google_cloud_go_securitycenter",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/securitycenter",
sum = "h1:NpEJeFbm3ad3ibpbpIBKXJS7eQq1cZhtt9nrDTMO/QQ=",
version = "v1.28.0",
)
go_repository(
name = "com_google_cloud_go_servicecontrol",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/servicecontrol",
sum = "h1:d0uV7Qegtfaa7Z2ClDzr9HJmnbJW7jn0WhZ7wOX6hLE=",
version = "v1.11.1",
)
go_repository(
name = "com_google_cloud_go_servicedirectory",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/servicedirectory",
sum = "h1:gkzx9Cd+OTOD+zY4u5vtbdvOx7vrvHYdeDiNdC6vKyw=",
version = "v1.11.5",
)
go_repository(
name = "com_google_cloud_go_servicemanagement",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/servicemanagement",
sum = "h1:fopAQI/IAzlxnVeiKn/8WiV6zKndjFkvi+gzu+NjywY=",
version = "v1.8.0",
)
go_repository(
name = "com_google_cloud_go_serviceusage",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/serviceusage",
sum = "h1:rXyq+0+RSIm3HFypctp7WoXxIA563rn206CfMWdqXX4=",
version = "v1.6.0",
)
go_repository(
name = "com_google_cloud_go_shell",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/shell",
sum = "h1:/oJf9sboa2FfHWCmHXy+XfTRnZy8lC7O5zFyfE1EA6s=",
version = "v1.7.6",
)
go_repository(
name = "com_google_cloud_go_spanner",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/spanner",
sum = "h1:O9kf49dfaDRzPpKJNChHUJ+Bao02WPedZb8ZPyi02lI=",
version = "v1.60.0",
)
go_repository(
name = "com_google_cloud_go_speech",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/speech",
sum = "h1:xo/cmhBtqoqqNg/5I8m0ECXPiqYg2fS2ioOccH+qbKE=",
version = "v1.22.1",
)
go_repository(
name = "com_google_cloud_go_storage",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/storage",
sum = "h1:VEpDQV5CJxFmJ6ueWNsKxcr1QAYOXEgxDa+sBbJahPw=",
version = "v1.40.0",
)
go_repository(
name = "com_google_cloud_go_storagetransfer",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/storagetransfer",
sum = "h1:BawJo/u0P21cdxc2gB878qIFDC80COq2i0qWZeNevSw=",
version = "v1.10.5",
)
go_repository(
name = "com_google_cloud_go_talent",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/talent",
sum = "h1:4xgDFfOcgcSY0dUzaSc2tQCSRoLDEJ5CfbW5jfcgNJk=",
version = "v1.6.7",
)
go_repository(
name = "com_google_cloud_go_texttospeech",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/texttospeech",
sum = "h1:gLEyDoJeFGdoX7jSKbf+nJy7CTgjsSbCZXwzzkXgH9w=",
version = "v1.7.6",
)
go_repository(
name = "com_google_cloud_go_tpu",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/tpu",
sum = "h1:Cb1txkZYbKlGIZ4tQr9EjEB9snAOU6qyjvNezGXDunI=",
version = "v1.6.6",
)
go_repository(
name = "com_google_cloud_go_trace",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/trace",
sum = "h1:XF0Ejdw0NpRfAvuZUeQe3ClAG4R/9w5JYICo7l2weaw=",
version = "v1.10.6",
)
go_repository(
name = "com_google_cloud_go_translate",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/translate",
sum = "h1:SXOtKYnT7ZkeMtPwujaBOBt5Ph4kf6LIuMpAgu/WON0=",
version = "v1.10.2",
)
go_repository(
name = "com_google_cloud_go_video",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/video",
sum = "h1:y4jgUqDiWMfX+beJnlrnloBQxEIa9v+KrlkD2QJVpeE=",
version = "v1.20.5",
)
go_repository(
name = "com_google_cloud_go_videointelligence",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/videointelligence",
sum = "h1:P0Sa8+5KOEAVk/fazUNjVPzRCijCheZWJ8wL8xBn9Uk=",
version = "v1.11.6",
)
go_repository(
name = "com_google_cloud_go_vision",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/vision",
sum = "h1:/CsSTkbmO9HC8iQpxbK8ATms3OQaX3YQUeTMGCxlaK4=",
version = "v1.2.0",
)
go_repository(
name = "com_google_cloud_go_vision_v2",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/vision/v2",
sum = "h1:kvR1sHcuPYat1wI3BYY7CEX2xLAcUHPYL6dOzV2Xf4Q=",
version = "v2.8.1",
)
go_repository(
name = "com_google_cloud_go_vmmigration",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/vmmigration",
sum = "h1:sbaWK76csqtk0TGPGCiJqZi7tfrU0LnrhUjZHI5YVdc=",
version = "v1.7.6",
)
go_repository(
name = "com_google_cloud_go_vmwareengine",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/vmwareengine",
sum = "h1:Mf8abigBstvjfSGq9twhtbMTCONL0Cjds+tGbc2pV0M=",
version = "v1.1.2",
)
go_repository(
name = "com_google_cloud_go_vpcaccess",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/vpcaccess",
sum = "h1:wbMTRdZ9P5+3D6oQWWqB/YxDCFR5m5OJ+b+hHwaBBQQ=",
version = "v1.7.6",
)
go_repository(
name = "com_google_cloud_go_webrisk",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/webrisk",
sum = "h1:rVhi2WOHcZF72X7spXVTFTmRGeFN4NFeW7/Ku7kgeug=",
version = "v1.9.6",
)
go_repository(
name = "com_google_cloud_go_websecurityscanner",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/websecurityscanner",
sum = "h1:YAwNB/HjKOVAy9D7W8Bkv8OQ9G2lqIqFOuJbyH5Xo4Q=",
version = "v1.6.6",
)
go_repository(
name = "com_google_cloud_go_workflows",
build_file_proto_mode = "disable_global",
importpath = "cloud.google.com/go/workflows",
sum = "h1:hH511zmS93oE6j64m/eiGWnfgqailh/S8+f3MVNLcE8=",
version = "v1.12.5",
)
go_repository(
name = "com_layeh_gopher_luar",
build_file_proto_mode = "disable_global",
importpath = "layeh.com/gopher-luar",
sum = "h1:55b0mpBhN9XSshEd2Nz6WsbYXctyBT35azk4POQNSXo=",
version = "v1.0.10",
)
go_repository(
name = "com_lukechampine_uint128",
build_file_proto_mode = "disable_global",
importpath = "lukechampine.com/uint128",
sum = "h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo=",
version = "v1.3.0",
)
go_repository(
name = "com_shuralyov_dmitri_gpu_mtl",
build_file_proto_mode = "disable_global",
importpath = "dmitri.shuralyov.com/gpu/mtl",
sum = "h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY=",
version = "v0.0.0-20190408044501-666a987793e9",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "com_terrastruct_oss_d2",
build_file_proto_mode = "disable_global",
importpath = "oss.terrastruct.com/d2",
sum = "h1:VgZgiwtMhh3uVR2mm7e0bdh25f1px3ZCPM/la5GKfMc=",
version = "v0.6.5",
)
go_repository(
name = "com_terrastruct_oss_util_go",
build_file_proto_mode = "disable_global",
importpath = "oss.terrastruct.com/util-go",
sum = "h1:n6y6RoZCgZDchN4gLGlzNRO1Jdf9xOGGqohDBph5BG8=",
version = "v0.0.0-20231101220827-55b3812542c2",
)
go_repository(
name = "dev_bobheadxi_go_gobenchdata",
build_file_proto_mode = "disable_global",
importpath = "go.bobheadxi.dev/gobenchdata",
sum = "h1:3Pts2nPUZdgFSU63nWzvfs2xRbK8WVSNeJ2H9e/Ypew=",
version = "v1.3.1",
)
go_repository(
name = "dev_bobheadxi_go_streamline",
build_file_proto_mode = "disable_global",
importpath = "go.bobheadxi.dev/streamline",
sum = "h1:EwbDggkws9Qo/fl4Zo801Z8mgf4xZBOX7/bbfTthsy4=",
version = "v1.3.2",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "dev_cdr_slog",
build_file_proto_mode = "disable_global",
importpath = "cdr.dev/slog",
sum = "h1:Jf+VOk2lif79HeTlnLaZ70zYTsuVSUEu/47U9VaG2Rw=",
version = "v1.4.2-0.20221206192828-e4803b10ae17",
)
go_repository(
name = "dev_cel_expr",
build_file_proto_mode = "disable_global",
importpath = "cel.dev/expr",
sum = "h1:O1jzfJCQBfL5BFoYktaxwIhuttaQPsVWerH9/EEKx0w=",
version = "v0.15.0",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "dev_chainguard_apko",
build_file_proto_mode = "disable_global",
importpath = "chainguard.dev/apko",
sum = "h1:K8lM5Gu/Ny3Q4b4oGDNyz2YX3wHcs72CqfBcsPh25Vc=",
version = "v0.14.0",
)
go_repository(
name = "dev_lsp_go_uri",
build_file_proto_mode = "disable_global",
importpath = "go.lsp.dev/uri",
sum = "h1:KcZJmh6nFIBeJzTugn5JTU6OOyG0lDOo3R9KwTxTYbo=",
version = "v0.3.0",
)
go_repository(
name = "ht_sr_git_sbinet_gg",
build_file_proto_mode = "disable_global",
importpath = "git.sr.ht/~sbinet/gg",
2024-05-01 12:57:34 +00:00
sum = "h1:6V43j30HM623V329xA9Ntq+WJrMjDxRjuAB1LFWF5m8=",
version = "v0.5.0",
)
go_repository(
name = "in_gopkg_alecthomas_kingpin_v2",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/alecthomas/kingpin.v2",
sum = "h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=",
version = "v2.2.6",
)
go_repository(
name = "in_gopkg_alexcesaro_statsd_v2",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/alexcesaro/statsd.v2",
sum = "h1:FXkZSCZIH17vLCO5sO2UucTHsH9pc+17F6pl3JVCwMc=",
version = "v2.0.0",
)
go_repository(
name = "in_gopkg_asn1_ber_v1",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/asn1-ber.v1",
sum = "h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM=",
version = "v1.0.0-20181015200546-f715ec2f112d",
)
go_repository(
name = "in_gopkg_check_v1",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/check.v1",
sum = "h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=",
version = "v1.0.0-20201130134442-10cb98267c6c",
)
go_repository(
name = "in_gopkg_errgo_v2",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/errgo.v2",
sum = "h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=",
version = "v2.1.0",
)
go_repository(
name = "in_gopkg_fsnotify_v1",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/fsnotify.v1",
sum = "h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=",
version = "v1.4.7",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "in_gopkg_go_jose_go_jose_v2",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/go-jose/go-jose.v2",
sum = "h1:qEzJlIDmG9q5VO0M/o8tGS65QMHMS1w01TQJB1VPJ4U=",
version = "v2.6.1",
)
go_repository(
name = "in_gopkg_inconshreveable_log15_v2",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/inconshreveable/log15.v2",
sum = "h1:RlWgLqCMMIYYEVcAR5MDsuHlVkaIPDAF+5Dehzg8L5A=",
version = "v2.0.0-20180818164646-67afb5ed74ec",
)
go_repository(
name = "in_gopkg_inf_v0",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/inf.v0",
sum = "h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=",
version = "v0.9.1",
)
go_repository(
name = "in_gopkg_ini_v1",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/ini.v1",
sum = "h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=",
version = "v1.67.0",
)
go_repository(
name = "in_gopkg_natefinch_lumberjack_v2",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/natefinch/lumberjack.v2",
sum = "h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=",
version = "v2.2.1",
)
go_repository(
name = "in_gopkg_resty_v1",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/resty.v1",
sum = "h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=",
version = "v1.12.0",
)
go_repository(
name = "in_gopkg_square_go_jose_v2",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/square/go-jose.v2",
replace = "gopkg.in/go-jose/go-jose.v2",
sum = "h1:nt80fvSDlhKWQgSWyHyy5CfmlQr+asih51R8PTWNKKs=",
version = "v2.6.3",
)
chore/deps: upgrade alertmanager package dependency, improve logs and tests (#63329) Upgrades to our forked update v0.27.0, which matches the Alertmanager version we deploy: https://github.com/sourcegraph/alertmanager/commit/3695ef8bcc9a5bf22945c43067b092e79644f1f3. Upon closer inspection I also realized I upgraded `prometheus/common` too far in https://github.com/sourcegraph/sourcegraph/pull/63328 - I've downgraded it to match the revision of Alertmanager we are using, while _also_ fulfilling the OpenFGA dependency https://github.com/sourcegraph/sourcegraph/pull/63329#discussion_r1646630946 for https://github.com/sourcegraph/sourcegraph/pull/63173 💀 The latest version of `prometheus/common` marshals configuration values that are unknown to our version of Alertmanager (v0.27.0) which rejects the generated configuration from `prom-wrapper`. I've also made a few updates to improve the testing and improve the prometheus and alertmanager output by forwarding them to differently-scoped loggers and crude conversion of the log levels: ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/d6e36a72-ad4f-4524-9061-89504776edfb) Related: https://github.com/sourcegraph/sourcegraph/pull/63171 Closes CORE-186 ## Test plan `sg start` and `sg run prometheus`, update some alerting configs in http://localhost:9090/alertmanager/#/status: <img src="https://github.com/sourcegraph/sourcegraph/assets/23356519/56cef853-ac39-4035-b584-57aec83e8301" width="30%"> In personal settings: ```json { "alerts.hideObservabilitySiteAlerts": false } ``` No banners show up indicating Prometheus is unhealthy.
2024-06-19 20:46:30 +00:00
go_repository(
name = "in_gopkg_telebot_v3",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/telebot.v3",
sum = "h1:3I4LohaAyJBiivGmkfB+CiVu7QFOWkuZ4+KHgO/G3rs=",
version = "v3.2.1",
)
go_repository(
name = "in_gopkg_tomb_v1",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/tomb.v1",
sum = "h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=",
version = "v1.0.0-20141024135613-dd632973f1e7",
)
go_repository(
name = "in_gopkg_warnings_v0",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/warnings.v0",
sum = "h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=",
version = "v0.1.2",
)
go_repository(
name = "in_gopkg_yaml_v2",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/yaml.v2",
sum = "h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=",
version = "v2.4.0",
)
go_repository(
name = "in_gopkg_yaml_v3",
build_file_proto_mode = "disable_global",
importpath = "gopkg.in/yaml.v3",
sum = "h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=",
version = "v3.0.1",
)
go_repository(
name = "io_etcd_go_bbolt",
build_file_proto_mode = "disable_global",
importpath = "go.etcd.io/bbolt",
sum = "h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA=",
version = "v1.3.8",
)
go_repository(
name = "io_etcd_go_etcd_api_v3",
build_file_proto_mode = "disable_global",
importpath = "go.etcd.io/etcd/api/v3",
sum = "h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k=",
version = "v3.5.10",
)
go_repository(
name = "io_etcd_go_etcd_client_pkg_v3",
build_file_proto_mode = "disable_global",
importpath = "go.etcd.io/etcd/client/pkg/v3",
sum = "h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0=",
version = "v3.5.10",
)
go_repository(
name = "io_etcd_go_etcd_client_v2",
build_file_proto_mode = "disable_global",
importpath = "go.etcd.io/etcd/client/v2",
sum = "h1:MrmRktzv/XF8CvtQt+P6wLUlURaNpSDJHFZhe//2QE4=",
version = "v2.305.10",
)
go_repository(
name = "io_etcd_go_etcd_client_v3",
build_file_proto_mode = "disable_global",
importpath = "go.etcd.io/etcd/client/v3",
sum = "h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao=",
version = "v3.5.10",
)
go_repository(
name = "io_etcd_go_etcd_pkg_v3",
build_file_proto_mode = "disable_global",
importpath = "go.etcd.io/etcd/pkg/v3",
sum = "h1:WPR8K0e9kWl1gAhB5A7gEa5ZBTNkT9NdNWrR8Qpo1CM=",
version = "v3.5.10",
)
go_repository(
name = "io_etcd_go_etcd_raft_v3",
build_file_proto_mode = "disable_global",
importpath = "go.etcd.io/etcd/raft/v3",
sum = "h1:cgNAYe7xrsrn/5kXMSaH8kM/Ky8mAdMqGOxyYwpP0LA=",
version = "v3.5.10",
)
go_repository(
name = "io_etcd_go_etcd_server_v3",
build_file_proto_mode = "disable_global",
importpath = "go.etcd.io/etcd/server/v3",
sum = "h1:4NOGyOwD5sUZ22PiWYKmfxqoeh72z6EhYjNosKGLmZg=",
version = "v3.5.10",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "io_filippo_edwards25519",
build_file_proto_mode = "disable_global",
importpath = "filippo.io/edwards25519",
sum = "h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=",
version = "v1.1.0",
)
go_repository(
name = "io_gorm_driver_postgres",
build_file_proto_mode = "disable_global",
importpath = "gorm.io/driver/postgres",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:DkegyItji119OlcaLjqN11kHoUgZ/j13E0jkJZgD6A8=",
version = "v1.5.9",
)
go_repository(
name = "io_gorm_driver_sqlite",
build_file_proto_mode = "disable_global",
importpath = "gorm.io/driver/sqlite",
sum = "h1:zKYbzRCpBrT1bNijRnxLDJWPjVfImGEn0lSnUY5gZ+c=",
version = "v1.5.0",
)
go_repository(
name = "io_gorm_gorm",
build_file_proto_mode = "disable_global",
importpath = "gorm.io/gorm",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:dQpO+33KalOA+aFYGlK+EfxcI5MbO7EP2yYygwh9h+s=",
version = "v1.25.10",
)
go_repository(
name = "io_gorm_plugin_opentelemetry",
build_file_proto_mode = "disable_global",
importpath = "gorm.io/plugin/opentelemetry",
sum = "h1:7p0ocWELjSSRI7NCKPW2mVe6h43YPini99sNJcbsTuc=",
version = "v0.1.4",
)
go_repository(
name = "io_k8s_api",
build_file_proto_mode = "disable_global",
importpath = "k8s.io/api",
sum = "h1:hBC7B9+MU+ptchxEqTNW2DkUosJpp1P+Wn6YncZ474A=",
version = "v0.29.2",
)
go_repository(
name = "io_k8s_apiextensions_apiserver",
build_file_proto_mode = "disable_global",
importpath = "k8s.io/apiextensions-apiserver",
sum = "h1:UK3xB5lOWSnhaCk0RFZ0LUacPZz9RY4wi/yt2Iu+btg=",
version = "v0.29.2",
)
go_repository(
name = "io_k8s_apimachinery",
build_file_proto_mode = "disable_global",
importpath = "k8s.io/apimachinery",
sum = "h1:EWGpfJ856oj11C52NRCHuU7rFDwxev48z+6DSlGNsV8=",
version = "v0.29.2",
)
go_repository(
name = "io_k8s_apiserver",
build_file_proto_mode = "disable_global",
importpath = "k8s.io/apiserver",
sum = "h1:+Z9S0dSNr+CjnVXQePG8TcBWHr3Q7BmAr7NraHvsMiQ=",
version = "v0.29.2",
)
go_repository(
name = "io_k8s_client_go",
build_file_proto_mode = "disable_global",
importpath = "k8s.io/client-go",
sum = "h1:FEg85el1TeZp+/vYJM7hkDlSTFZ+c5nnK44DJ4FyoRg=",
version = "v0.29.2",
)
go_repository(
name = "io_k8s_code_generator",
build_file_proto_mode = "disable_global",
importpath = "k8s.io/code-generator",
sum = "h1:c9/iw2KnNpw2IRV+wwuG/Wns2TjPSgjWzbbjTevyiHI=",
version = "v0.29.2",
)
go_repository(
name = "io_k8s_component_base",
build_file_proto_mode = "disable_global",
importpath = "k8s.io/component-base",
sum = "h1:lpiLyuvPA9yV1aQwGLENYyK7n/8t6l3nn3zAtFTJYe8=",
version = "v0.29.2",
)
go_repository(
name = "io_k8s_gengo",
build_file_proto_mode = "disable_global",
importpath = "k8s.io/gengo",
sum = "h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks=",
version = "v0.0.0-20230829151522-9cce18d56c01",
)
go_repository(
name = "io_k8s_klog",
build_file_proto_mode = "disable_global",
importpath = "k8s.io/klog",
sum = "h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=",
version = "v1.0.0",
)
go_repository(
name = "io_k8s_klog_v2",
build_file_proto_mode = "disable_global",
importpath = "k8s.io/klog/v2",
sum = "h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0=",
version = "v2.110.1",
)
go_repository(
name = "io_k8s_kms",
build_file_proto_mode = "disable_global",
importpath = "k8s.io/kms",
sum = "h1:MDsbp98gSlEQs7K7dqLKNNTwKFQRYYvO4UOlBOjNy6Y=",
version = "v0.29.2",
)
go_repository(
name = "io_k8s_kube_openapi",
build_file_proto_mode = "disable_global",
importpath = "k8s.io/kube-openapi",
sum = "h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780=",
version = "v0.0.0-20231010175941-2dd684a91f00",
)
go_repository(
name = "io_k8s_sigs_apiserver_network_proxy_konnectivity_client",
build_file_proto_mode = "disable_global",
importpath = "sigs.k8s.io/apiserver-network-proxy/konnectivity-client",
sum = "h1:TgtAeesdhpm2SGwkQasmbeqDo8th5wOBA5h/AjTKA4I=",
version = "v0.28.0",
)
go_repository(
name = "io_k8s_sigs_controller_runtime",
build_file_proto_mode = "disable_global",
importpath = "sigs.k8s.io/controller-runtime",
sum = "h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk=",
version = "v0.17.3",
)
go_repository(
name = "io_k8s_sigs_json",
build_file_proto_mode = "disable_global",
importpath = "sigs.k8s.io/json",
sum = "h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=",
version = "v0.0.0-20221116044647-bc3834ca7abd",
)
go_repository(
name = "io_k8s_sigs_kustomize_kyaml",
build_file_proto_mode = "disable_global",
importpath = "sigs.k8s.io/kustomize/kyaml",
sum = "h1:tNNQIC+8cc+aXFTVg+RtQAOsjwUdYBZRAgYOVI3RBc4=",
version = "v0.13.3",
)
Build images end-to-end using Bazel v2 (#61845) * wip * gitserver (mostly) wolfi 4 bazel * the big heck of all things * Add rules_apko lock translation rules to WORKSPACE * Call apko_repositories() more * fix rules_apko to handle our shorter repo urls * fix workspace from rebase, and missing locks * visibility on wolfi_base_image * hand-fix a lock coz apko lock is :b:roken * remove chainguard repo+keyring from base * update locks * add chainguard repo+keychain to single server manifest * unrelated fixes, server+grafana still h*cked * fix postgres-exporter * the big fix * aws lib got bumped? * downgrade sso-oidc? idk * ignore wolfi locks from prettier * dynamically do the locks with a reporule * document and make nice :nails: * bazel run @rules_apko//apko patch * Fix .typo.typo * Update tooling for end-to-end Bazel images (#61106) * Update sg wolfi image to build using Bazel * bazel run @rules_apko//apko patch * Fix .typo.typo * Add update-images and implement apko YAML change monitoring * Use bazel apko and add support for additional repos * Refactor sg wolfi * Rework wolfi base image auto-update pipeline * sg bazel configure * [rough] Add --check flag to sg wolfi lock * Refactor sg wolfi lock --check * Simplify check and update apko lock hash operations * Fix resolveImagePath when running in bazel * Fixup logic error in CheckApkoLockHashes * Tweak DoBaseImageBuild output * Remove debug output * Fix sg wolfi lock --check behaviour for all images * Replace base image build step with apko lock --check * Remove debug line * Minor fixups for CI step * Wrap with AnnotatedCmd * Fixup annotation * Update apko lockfiles * Allow additional repos to be passed * Update build-base-image.sh with bazel + add back to pipeline * Ensure that modified base images are rebuilt * Solve bazelception * Remove timestamp for bit-level reproducibility * Skip local keygen when running on buildkite * Add workaround for lack of local repo support in rules_apko * Run apkoOps first as it's quick and might fail * Remove blocking allBaseImagesBuilt step * Remove unused promethus-gcp image * Add special cases to resolveImagePath * Cleanly handle case where no bazel build path exists This could happen in cases where a base image is only used outside of sourcegraph/sourcegraph, or if you've added a new base image config but haven't added the associated Bazel scaffolding * Add debugging around failing docker builds * More debugging * Normalise apko_lockfile to match repo.bzl * Fixup apko docker call * Try passing imageconfigdir differently to docker * Run ls in different container * Soft-fail when using legacy build in Buildkite * Add missing include * Workaround for building sourcegraph and sourcegraph-dev * Add postgresql-client package to server This contains createdb, which was recently moved from postgresql * Inflate postgres-12-codeinsights image to avoid rules_apko errors * Remove update line from yaml files * Fix issue caused by moving base sourcegraph image * Remove apk-tools from server * Update lockfiles * Address review feedback * Remove debug lines * fix unbound var --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> * go mod tidy + gazelle-update-repos after merging main * Use aspect bazel cache * Use Aspect bazel caching when calling bazel in bash and sg * Append annotation * Run apko lock on aspect agent * Remove base image builds Discussion in https://sourcegraph.slack.com/archives/C05EVRLQEUR/p1712307465660509 * Remove unused functionality * Update BaseImageConfig comments * Rewrite wolfi-images/README.md * Add .apko/range.sh to .gitattributes * Remove "wolfi" from :base_image and :base_tarball targets * remove allowlist extras from debugging * Tweak user instructions around package testing * Add agent healthcheck to buildkite scripts * prettier * sg bazel configure * bazel run //:gazelle-update-repos --------- Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch> Co-authored-by: Noah S-C <noah@sourcegraph.com>
2024-04-12 15:18:43 +00:00
go_repository(
name = "io_k8s_sigs_release_utils",
build_file_proto_mode = "disable_global",
importpath = "sigs.k8s.io/release-utils",
sum = "h1:JKDOvhCk6zW8ipEOkpTGDH/mW3TI+XqtPp16aaQ79FU=",
version = "v0.7.7",
)
go_repository(
name = "io_k8s_sigs_structured_merge_diff_v4",
build_file_proto_mode = "disable_global",
importpath = "sigs.k8s.io/structured-merge-diff/v4",
sum = "h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=",
version = "v4.4.1",
)
go_repository(
name = "io_k8s_sigs_yaml",
build_file_proto_mode = "disable_global",
importpath = "sigs.k8s.io/yaml",
sum = "h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=",
version = "v1.4.0",
)
go_repository(
name = "io_k8s_utils",
build_file_proto_mode = "disable_global",
importpath = "k8s.io/utils",
sum = "h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=",
version = "v0.0.0-20230726121419-3b25d923346b",
)
go_repository(
name = "io_moul_http2curl_v2",
build_file_proto_mode = "disable_global",
importpath = "moul.io/http2curl/v2",
sum = "h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs=",
version = "v2.3.0",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "io_nhooyr_websocket",
build_file_proto_mode = "disable_global",
importpath = "nhooyr.io/websocket",
sum = "h1:f/qXNc2/3DpoSZkHt1DQu6rj4zGC8JmkkLkWss0MgN0=",
version = "v1.8.11",
)
go_repository(
name = "io_opencensus_go",
build_file_proto_mode = "disable_global",
importpath = "go.opencensus.io",
sum = "h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=",
version = "v0.24.0",
)
go_repository(
name = "io_opentelemetry_go_collector",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:mssWo1y31p1F/SRsSBnVUX6YocgawCqM1blpE+hkWog=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_component",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/component",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:j52YAsp8EmqYUotVUwhovkqFZGuxArEkk65V4TI46NE=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_config_configauth",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/config/configauth",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:tv2Ilj0X9T8ZsDd4mB8Sl+nXQ8CG8MJVQ1Lo4mmE0Pk=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_config_configcompression",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/config/configcompression",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:ClkAY1rzaxFawmC53BUf3TjTWKOGx+2xnpqOJIkg6Tk=",
version = "v1.10.0",
)
go_repository(
name = "io_opentelemetry_go_collector_config_configgrpc",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/config/configgrpc",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:H1TXxUwxaZINmAzuehP/8ExKhJKzuw/oBGc7juzwloo=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_config_confighttp",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/config/confighttp",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:tgCWMKuIorSr4+iQOv0A8Ya/8do73hiG5KHinWaz63Q=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_config_confignet",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/config/confignet",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:A2/8y2oEFaJbmtl+r1JIP0y+281vmmcPp0P51xcSn5s=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_config_configopaque",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/config/configopaque",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:FAxj6ggLpJE/kFnR1ezYwjRdo6gHo2+CjlIsHVCFVnQ=",
version = "v1.10.0",
)
go_repository(
name = "io_opentelemetry_go_collector_config_configretry",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/config/configretry",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:AwWGdeYJvUCZfh127Jb8uj7kuoPrJ3t2iZGwQUxmb7c=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_config_configtelemetry",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/config/configtelemetry",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:KLbhkFqdw9D31t0IhJ/rnhMRvz/s14eie0fKfm5xWns=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_config_configtls",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/config/configtls",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:nbk8sJIHoYYQbpZtUkUQceTbjC4wEjoePKJ15v8cCcU=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_config_internal",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/config/internal",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:pimS3uLHfOBbConZrviGoTwu+bkTNDoQBtbeWCg8U8k=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_confmap",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/confmap",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:qKKZyWzropSKfgtGv12JzADOXNgThqH1Vx6qzblBE24=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_consumer",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/consumer",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:L/7SA/U2ua5L4yTLChnI9I+IFGKYU5ufNQ76QKYcPYs=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_exporter",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/exporter",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:g0nF/FAwuA7tTJf5uo1PvlQl7xFqCgvfH+FYqufBSiw=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_exporter_otlpexporter",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/exporter/otlpexporter",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:YKdYP3tDOQC6sOdOD1/Sun6CA4Zwpky+aRve3dx5QcE=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_exporter_otlphttpexporter",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/exporter/otlphttpexporter",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:26jP07GOjipKnFAKw0hDnCTB67tXZzHN+uxii3mnbjw=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_extension",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/extension",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:vTsd+GElvT7qKk9Y9d6UKuuT2Ngx0mai8Q48hkKQMwM=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_extension_auth",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/extension/auth",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:i7cQl+Ewpve/DIN4rFMg1GiyUPE14LZsYWrJ1RqtP84=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_featuregate",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/featuregate",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:krSqokHTp7JthgmtewysqHuOAkcuuZl7G2n91s7HygE=",
version = "v1.10.0",
)
go_repository(
name = "io_opentelemetry_go_collector_pdata",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/pdata",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:oLyPLGvPTQrcRT64ZVruwvmH/u3SHTfNo01pteS4WOE=",
version = "v1.10.0",
)
go_repository(
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
name = "io_opentelemetry_go_collector_pdata_testdata",
build_file_proto_mode = "disable_global",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
importpath = "go.opentelemetry.io/collector/pdata/testdata",
sum = "h1:iI6NOE0L2je/bxlWzAWHQ/yCtnGupgv42Hl9Al1q/g4=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_receiver",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/receiver",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:V3JBKkX+7e/NYpDDZVyeu2VQB1/lLFuoJFPfupdCcZs=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_collector_receiver_otlpreceiver",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/collector/receiver/otlpreceiver",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:TycVVl4AWioV6kWeFcCIk2QuKfXOzn88yw989opsMdE=",
version = "v0.103.0",
)
go_repository(
name = "io_opentelemetry_go_contrib_config",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/contrib/config",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs=",
version = "v0.7.0",
)
go_repository(
name = "io_opentelemetry_go_contrib_detectors_gcp",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/contrib/detectors/gcp",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:eVfDeFAPnMFZUhNdDZ/BbpEmC7/xxDKTSba5NhJH88s=",
version = "v1.27.0",
)
go_repository(
name = "io_opentelemetry_go_contrib_instrumentation_google_golang_org_grpc_otelgrpc",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck=",
version = "v0.52.0",
)
# See https://github.com/open-telemetry/opentelemetry-go-contrib/issues/872
go_repository(
name = "io_opentelemetry_go_contrib_instrumentation_net_http_httptrace_otelhttptrace",
build_directives = [
"gazelle:resolve go go.opentelemetry.io/otel/exporters/otlp/internal @io_opentelemetry_go_otel//exporters/otlp/internal",
"gazelle:resolve go go.opentelemetry.io/otel/exporters/otlp/internal/envconfig @io_opentelemetry_go_otel//exporters/otlp/internal/envconfig",
],
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace",
sum = "h1:ZjF6qLnAVNq6xUh0sK2mCEqwnRrpgr0mLALQXJL34NI=",
version = "v0.40.0",
)
2023-01-27 14:30:35 +00:00
# See https://github.com/open-telemetry/opentelemetry-go-contrib/issues/872
go_repository(
name = "io_opentelemetry_go_contrib_instrumentation_net_http_otelhttp",
build_directives = [
"gazelle:resolve go go.opentelemetry.io/otel/exporters/otlp/internal @io_opentelemetry_go_otel//exporters/otlp/internal",
],
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A=",
version = "v0.52.0",
)
go_repository(
name = "io_opentelemetry_go_contrib_instrumentation_runtime",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/contrib/instrumentation/runtime",
sum = "h1:EbmAUG9hEAMXyfWEasIt2kmh/WmXUznUksChApTgBGc=",
version = "v0.42.0",
)
go_repository(
name = "io_opentelemetry_go_contrib_propagators_b3",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/contrib/propagators/b3",
sum = "h1:ImOVvHnku8jijXqkwCSyYKRDt2YrnGXD4BbhcpfbfJo=",
version = "v1.17.0",
)
go_repository(
name = "io_opentelemetry_go_contrib_propagators_jaeger",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/contrib/propagators/jaeger",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:tJPpZAEsihJgRTnXrPjY3rjED8Av3EJdi1kvKCi1yMc=",
version = "v1.27.0",
)
go_repository(
name = "io_opentelemetry_go_contrib_propagators_opencensus",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/contrib/propagators/opencensus",
sum = "h1:wQBFvTXNs/UcCiWEi0cadOGJ8LMxDSOWbNtldFS0VI4=",
version = "v0.42.0",
)
go_repository(
name = "io_opentelemetry_go_contrib_propagators_ot",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/contrib/propagators/ot",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:xFPqk7ntRR87dqvl6RfeHiq9UlE8mPSuL6Dtr/zysL8=",
version = "v1.27.0",
)
go_repository(
name = "io_opentelemetry_go_otel",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg=",
version = "v1.27.0",
)
go_repository(
name = "io_opentelemetry_go_otel_bridge_opencensus",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/bridge/opencensus",
sum = "h1:YHivttTaDhbZIHuPlg1sWsy2P5gj57vzqPfkHItgbwQ=",
version = "v0.39.0",
)
go_repository(
name = "io_opentelemetry_go_otel_bridge_opentracing",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/bridge/opentracing",
sum = "h1:ZujpdLoATPdsyzp8hE5xW3jCNVZE46eMm42eu1JuxKk=",
version = "v1.22.0",
)
go_repository(
name = "io_opentelemetry_go_otel_exporters_jaeger",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/exporters/jaeger",
sum = "h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4=",
version = "v1.17.0",
)
go_repository(
name = "io_opentelemetry_go_otel_exporters_otlp_internal_retry",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/exporters/otlp/internal/retry",
sum = "h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0=",
version = "v1.16.0",
)
go_repository(
name = "io_opentelemetry_go_otel_exporters_otlp_otlpmetric",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/exporters/otlp/otlpmetric",
sum = "h1:f6BwB2OACc3FCbYVznctQ9V6KK7Vq6CjmYXJ7DeSs4E=",
version = "v0.39.0",
)
go_repository(
name = "io_opentelemetry_go_otel_exporters_otlp_otlpmetric_otlpmetricgrpc",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w=",
version = "v1.27.0",
)
go_repository(
name = "io_opentelemetry_go_otel_exporters_otlp_otlpmetric_otlpmetrichttp",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp",
sum = "h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc=",
version = "v1.27.0",
)
# See https://github.com/open-telemetry/opentelemetry-go-contrib/issues/872
go_repository(
name = "io_opentelemetry_go_otel_exporters_otlp_otlptrace",
build_directives = [
"gazelle:resolve go go.opentelemetry.io/otel/exporters/otlp/internal @io_opentelemetry_go_otel//exporters/otlp/internal",
"gazelle:resolve go go.opentelemetry.io/otel/exporters/otlp/internal/envconfig @io_opentelemetry_go_otel//exporters/otlp/internal/envconfig",
],
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/exporters/otlp/otlptrace",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc=",
version = "v1.27.0",
)
# See https://github.com/open-telemetry/opentelemetry-go-contrib/issues/872
go_repository(
name = "io_opentelemetry_go_otel_exporters_otlp_otlptrace_otlptracegrpc",
build_directives = [
"gazelle:resolve go go.opentelemetry.io/otel/exporters/otlp/internal @io_opentelemetry_go_otel//exporters/otlp/internal",
"gazelle:resolve go go.opentelemetry.io/otel/exporters/otlp/internal/envconfig @io_opentelemetry_go_otel//exporters/otlp/internal/envconfig",
],
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA=",
version = "v1.27.0",
)
# See https://github.com/open-telemetry/opentelemetry-go-contrib/issues/872
go_repository(
name = "io_opentelemetry_go_otel_exporters_otlp_otlptrace_otlptracehttp",
build_directives = [
"gazelle:resolve go go.opentelemetry.io/otel/exporters/otlp/internal @io_opentelemetry_go_otel//exporters/otlp/internal",
"gazelle:resolve go go.opentelemetry.io/otel/exporters/otlp/internal/envconfig @io_opentelemetry_go_otel//exporters/otlp/internal/envconfig",
],
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s=",
version = "v1.27.0",
)
go_repository(
name = "io_opentelemetry_go_otel_exporters_prometheus",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/exporters/prometheus",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ=",
version = "v0.49.0",
)
go_repository(
name = "io_opentelemetry_go_otel_exporters_stdout_stdoutmetric",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/exporters/stdout/stdoutmetric",
sum = "h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0=",
version = "v1.27.0",
)
go_repository(
name = "io_opentelemetry_go_otel_exporters_stdout_stdouttrace",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/exporters/stdout/stdouttrace",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE=",
version = "v1.27.0",
)
go_repository(
name = "io_opentelemetry_go_otel_metric",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/metric",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik=",
version = "v1.27.0",
)
go_repository(
name = "io_opentelemetry_go_otel_sdk",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/sdk",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI=",
version = "v1.27.0",
)
go_repository(
name = "io_opentelemetry_go_otel_sdk_metric",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/sdk/metric",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI=",
version = "v1.27.0",
)
go_repository(
name = "io_opentelemetry_go_otel_trace",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/otel/trace",
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) Thread: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299 One problem caused by this upgrade is that the [deprecated `jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858) no longer builds at all with the last published version, so for the upgrade to go through it must be removed. I've updated local `sg start` to work with this change, but some Release team support is needed for deployment configuration + customer-facing docs changes: https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ, since current guidance asks customers to configure `jaegerexporter`. Part of https://linear.app/sourcegraph/issue/SEC-1680 Closes https://linear.app/sourcegraph/issue/CORE-177 ## Test plan Followed steps shared in https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to run locally, since `sg run jaeger otel-collector` alone is insufficient to get updated images: ```diff diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml index b995a3d531b..76de80d4f84 100644 --- a/wolfi-images/opentelemetry-collector.yaml +++ b/wolfi-images/opentelemetry-collector.yaml @@ -7,7 +7,11 @@ contents: - mailcap ## opentelemetry-collector packages - - opentelemetry-collector@sourcegraph + - opentelemetry-collector@branch + keyring: + - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub + repositories: + - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade' paths: - path: /otel-collector ``` plus `sg wolfi lock opentelemetry-collector` will make `sg run otel-collector` use the correct image. **The above diffs SHOULD NOT be committed. The lock should happen post-merge.** Spot-checked some traces locally with: ``` sg run jaeger otel-collector sg start ``` ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41) ![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63) ## Changelog - OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0 - OpenTelemetry Collector: The [deprecated `jaegerexporter` has been removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858). Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector should use `exporter: { otlp/jaeger: ... }` to send traces directly to Jaeger via its OTLP receiver. - Users of the default Jaeger configurations now need to provide `JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST` configuration. --------- Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com> Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 16:01:41 +00:00
sum = "h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw=",
version = "v1.27.0",
)
go_repository(
name = "io_opentelemetry_go_proto_otlp",
build_file_proto_mode = "disable_global",
importpath = "go.opentelemetry.io/proto/otlp",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94=",
version = "v1.2.0",
)
go_repository(
name = "io_rsc_binaryregexp",
build_file_proto_mode = "disable_global",
importpath = "rsc.io/binaryregexp",
sum = "h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE=",
version = "v0.2.0",
)
go_repository(
name = "io_rsc_pdf",
build_file_proto_mode = "disable_global",
importpath = "rsc.io/pdf",
sum = "h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4=",
version = "v0.1.1",
)
go_repository(
name = "io_rsc_quote_v3",
build_file_proto_mode = "disable_global",
importpath = "rsc.io/quote/v3",
sum = "h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY=",
version = "v3.1.0",
)
go_repository(
name = "io_rsc_sampler",
build_file_proto_mode = "disable_global",
importpath = "rsc.io/sampler",
sum = "h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4=",
version = "v1.3.0",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "net_howett_plist",
build_file_proto_mode = "disable_global",
importpath = "howett.net/plist",
sum = "h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM=",
version = "v1.0.0",
)
go_repository(
name = "net_pgregory_rapid",
build_file_proto_mode = "disable_global",
importpath = "pgregory.net/rapid",
sum = "h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=",
version = "v1.1.0",
)
go_repository(
name = "net_starlark_go",
build_file_proto_mode = "disable_global",
importpath = "go.starlark.net",
sum = "h1:xwwDQW5We85NaTk2APgoN9202w/l0DVGp+GZMfsrh7s=",
version = "v0.0.0-20210223155950-e043a3d3c984",
)
go_repository(
name = "org_bitbucket_creachadair_shell",
build_file_proto_mode = "disable_global",
importpath = "bitbucket.org/creachadair/shell",
sum = "h1:Z96pB6DkSb7F3Y3BBnJeOZH2gazyMTWlvecSD4vDqfk=",
version = "v0.0.7",
)
go_repository(
name = "org_cuelang_go",
build_file_proto_mode = "disable_global",
importpath = "cuelang.org/go",
sum = "h1:W3oBBjDTm7+IZfCKZAmC8uDG0eYfJL4Pp/xbbCMKaVo=",
version = "v0.4.3",
)
2024-05-01 12:57:34 +00:00
go_repository(
name = "org_gioui",
build_file_proto_mode = "disable_global",
importpath = "gioui.org",
sum = "h1:RbzDn1h/pCVf/q44ImQSa/J3MIFpY3OWphzT/Tyei+w=",
version = "v0.2.0",
)
go_repository(
name = "org_gioui_cpu",
build_file_proto_mode = "disable_global",
importpath = "gioui.org/cpu",
sum = "h1:tNJdnP5CgM39PRc+KWmBRRYX/zJ+rd5XaYxY5d5veqA=",
version = "v0.0.0-20220412190645-f1e9e8c3b1f7",
)
go_repository(
name = "org_gioui_shader",
build_file_proto_mode = "disable_global",
importpath = "gioui.org/shader",
sum = "h1:cvZmU+eODFR2545X+/8XucgZdTtEjR3QWW6W65b0q5Y=",
version = "v1.0.6",
)
go_repository(
name = "org_gioui_x",
build_file_proto_mode = "disable_global",
importpath = "gioui.org/x",
sum = "h1:/MbdjKH19F16auv19UiQxli2n6BYPw7eyh9XBOTgmEw=",
version = "v0.2.0",
)
go_repository(
name = "org_golang_google_api",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/api",
sum = "h1:if5fPvudRQ78GeRx3RayIoiuV7modtErPIZC/T2bIvE=",
version = "v0.182.0",
)
go_repository(
name = "org_golang_google_appengine",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/appengine",
sum = "h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=",
version = "v1.6.8",
)
go_repository(
name = "org_golang_google_cloud",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/cloud",
sum = "h1:Cpp2P6TPjujNoC5M2KHY6g7wfyLYfIWRZaSdIKfDasA=",
version = "v0.0.0-20151119220103-975617b05ea8",
)
go_repository(
name = "org_golang_google_genproto",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/genproto",
sum = "h1:wu/KJm9KJwpfHWhkkZGohVC6KRrc1oJNr4jwtQMOQXw=",
version = "v0.0.0-20240401170217-c3f982113cda",
)
go_repository(
name = "org_golang_google_genproto_googleapis_api",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/genproto/googleapis/api",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw=",
version = "v0.0.0-20240528184218-531527333157",
)
go_repository(
name = "org_golang_google_genproto_googleapis_bytestream",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/genproto/googleapis/bytestream",
sum = "h1:Px+x8PNp8izq1ORW6jI007V/fRZ3bWrgcWHImtBduXc=",
version = "v0.0.0-20240521202816-d264139d666e",
)
go_repository(
name = "org_golang_google_genproto_googleapis_rpc",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/genproto/googleapis/rpc",
Adding Anthropic messages API support to the Google provider through Google vertex (#63282) [Linear Issue](https://linear.app/sourcegraph/project/claude-3-on-gcp-8c014e1a3506/overview) This PR adds support for anthropic models in the google provider through google vertex. NOTE: The current code only supported Google Gemini API and had boiler plate code for Google vertex(only for the gemini model) this PR adds Google Vertex for anthropic models properly so this way the google provider can be run in 3 different configurations 1. Google Gemini API(this works but only for chat and not for completions which is the intended behaviour for now) 2. Google Vertex API Anthropic Model(This works perfectly and is added in this PR and tested for both chat and completions and it works great) 3. Google Vertex API Gemini Model (this doesn't work yet and can eventually be added to this codebase but we gotta add a new decoder for the streaming responses of the gemini model through this API we can take care of this later) Sense of Urgency: This is a P0 because of enterprise requirements so I would appreciate a fast approval and merging. <!-- 💡 To write a useful PR description, make sure that your description covers: - WHAT this PR is changing: - How was it PREVIOUSLY. - How it will be from NOW on. - WHY this PR is needed. - CONTEXT, i.e. to which initiative, project or RFC it belongs. The structure of the description doesn't matter as much as covering these points, so use your best judgement based on your context. Learn how to write good pull request description: https://www.notion.so/sourcegraph/Write-a-good-pull-request-description-610a7fd3e613496eb76f450db5a49b6e?pvs=4 --> ## Test plan - Run this branch for Cody instance -> https://github.com/sourcegraph/cody/pull/4606 - Ask @arafatkatze to dm you the siteadmin config to make things work - Check the logs and play with completions and chat <!-- All pull requests REQUIRE a test plan: https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles --> ## Changelog <!-- 1. Ensure your pull request title is formatted as: $type($domain): $what 3. Add bullet list items for each additional detail you want to cover (see example below) 4. You can edit this after the pull request was merged, as long as release shipping it hasn't been promoted to the public. 5. For more information, please see this how-to https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c? Audience: TS/CSE > Customers > Teammates (in that order). Cheat sheet: $type = chore|fix|feat $domain: source|search|ci|release|plg|cody|local|... --> <!-- Example: Title: fix(search): parse quotes with the appropriate context Changelog section: ## Changelog - When a quote is used with regexp pattern type, then ... - Refactored underlying code. --> --------- Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com> Co-authored-by: Beatrix <beatrix@sourcegraph.com> Co-authored-by: Stephen Gutekanst <stephen@sourcegraph.com>
2024-06-20 17:50:15 +00:00
sum = "h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8=",
version = "v0.0.0-20240528184218-531527333157",
)
go_repository(
name = "org_golang_google_grpc",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/grpc",
sum = "h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=",
version = "v1.65.0",
)
go_repository(
name = "org_golang_google_protobuf",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/protobuf",
sum = "h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=",
version = "v1.34.2",
)
go_repository(
name = "org_golang_x_crypto",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/crypto",
sum = "h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=",
version = "v0.24.0",
)
go_repository(
name = "org_golang_x_exp",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/exp",
sum = "h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM=",
version = "v0.0.0-20240604190554-fc45aab8b7f8",
2024-05-01 12:57:34 +00:00
)
go_repository(
name = "org_golang_x_exp_shiny",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/exp/shiny",
sum = "h1:sgkbz1SFTsoQIvzTIw45hccUcGocu00QM3qucBYV8b0=",
version = "v0.0.0-20230801115018-d63ba01acd4b",
)
go_repository(
name = "org_golang_x_image",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/image",
2024-05-01 12:57:34 +00:00
sum = "h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4=",
version = "v0.14.0",
)
go_repository(
name = "org_golang_x_lint",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/lint",
sum = "h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=",
version = "v0.0.0-20210508222113-6edffad5e616",
)
go_repository(
name = "org_golang_x_mobile",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/mobile",
sum = "h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs=",
version = "v0.0.0-20190719004257-d2bd2a29d028",
)
go_repository(
name = "org_golang_x_mod",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/mod",
sum = "h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=",
version = "v0.18.0",
)
go_repository(
name = "org_golang_x_net",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/net",
sum = "h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=",
version = "v0.26.0",
)
go_repository(
name = "org_golang_x_oauth2",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/oauth2",
sum = "h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=",
version = "v0.21.0",
)
go_repository(
name = "org_golang_x_sync",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/sync",
sum = "h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=",
version = "v0.7.0",
)
go_repository(
name = "org_golang_x_sys",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/sys",
sum = "h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=",
version = "v0.22.0",
)
go_repository(
name = "org_golang_x_telemetry",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/telemetry",
sum = "h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk=",
version = "v0.0.0-20240521205824-bda55230c457",
)
go_repository(
name = "org_golang_x_term",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/term",
sum = "h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA=",
version = "v0.21.0",
)
go_repository(
name = "org_golang_x_text",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/text",
sum = "h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=",
version = "v0.16.0",
)
go_repository(
name = "org_golang_x_time",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/time",
sum = "h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=",
version = "v0.5.0",
)
go_repository(
name = "org_golang_x_tools",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/tools",
sum = "h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA=",
version = "v0.22.0",
)
go_repository(
name = "org_golang_x_tools_go_vcs",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/tools/go/vcs",
sum = "h1:cOIJqWBl99H1dH5LWizPa+0ImeeJq3t3cJjaeOWUAL4=",
version = "v0.1.0-deprecated",
)
go_repository(
name = "org_golang_x_xerrors",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/xerrors",
2024-05-01 12:57:34 +00:00
sum = "h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=",
version = "v0.0.0-20231012003039-104605ab7028",
)
go_repository(
name = "org_gonum_v1_gonum",
build_file_proto_mode = "disable_global",
importpath = "gonum.org/v1/gonum",
sum = "h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ=",
version = "v0.15.0",
)
go_repository(
name = "org_gonum_v1_netlib",
build_file_proto_mode = "disable_global",
importpath = "gonum.org/v1/netlib",
sum = "h1:OE9mWmgKkjJyEmDAAtGMPjXu+YNeGvK9VTSHY6+Qihc=",
version = "v0.0.0-20190313105609-8cb42192e0e0",
)
go_repository(
name = "org_gonum_v1_plot",
build_file_proto_mode = "disable_global",
importpath = "gonum.org/v1/plot",
2024-05-01 12:57:34 +00:00
sum = "h1:+LBDVFYwFe4LHhdP8coW6296MBEY4nQ+Y4vuUpJopcE=",
version = "v0.14.0",
)
go_repository(
name = "org_kernel_pub_linux_libs_security_libcap_cap",
build_file_proto_mode = "disable_global",
importpath = "kernel.org/pub/linux/libs/security/libcap/cap",
sum = "h1:sPQ9qlSNR26fToTKbxe/HDWJlXvBLqGmt84LGCQkOy0=",
version = "v1.2.67",
)
go_repository(
name = "org_kernel_pub_linux_libs_security_libcap_psx",
build_file_proto_mode = "disable_global",
importpath = "kernel.org/pub/linux/libs/security/libcap/psx",
sum = "h1:NxbXJ7pDVq0FKBsqjieT92QDXI2XaqH2HAi4QcCOHt8=",
version = "v1.2.67",
)
go_repository(
name = "org_modernc_cc_v3",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/cc/v3",
sum = "h1:QoR1Sn3YWlmA1T4vLaKZfawdVtSiGx8H+cEojbC7v1Q=",
version = "v3.41.0",
)
go_repository(
name = "org_modernc_cc_v4",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/cc/v4",
sum = "h1:dycHFB/jDc3IyacKipCNSDrjIC0Lm1hyoWOZTRR20Lk=",
version = "v4.21.2",
)
go_repository(
name = "org_modernc_ccgo_v3",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/ccgo/v3",
sum = "h1:o3OmOqx4/OFnl4Vm3G8Bgmqxnvxnh0nbxeT5p/dWChA=",
version = "v3.17.0",
)
go_repository(
name = "org_modernc_ccgo_v4",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/ccgo/v4",
sum = "h1:6wrtRozgrhCxieCeJh85QsxkX/2FFrT9hdaWPlbn4Zo=",
version = "v4.17.10",
)
go_repository(
name = "org_modernc_ccorpus",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/ccorpus",
sum = "h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=",
version = "v1.11.6",
)
go_repository(
name = "org_modernc_fileutil",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/fileutil",
sum = "h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE=",
version = "v1.3.0",
)
go_repository(
name = "org_modernc_gc_v2",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/gc/v2",
sum = "h1:9cNzOqPyMJBvrUipmynX0ZohMhcxPtMccYgGOJdOiBw=",
version = "v2.4.1",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "org_modernc_gc_v3",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/gc/v3",
sum = "h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI=",
version = "v3.0.0-20240107210532-573471604cb6",
)
go_repository(
name = "org_modernc_httpfs",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/httpfs",
sum = "h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=",
version = "v1.0.6",
)
go_repository(
name = "org_modernc_libc",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/libc",
sum = "h1:uau0VoiT5hnR+SpoWekCKbLqm7v6dhRL3hI+NQhgN3M=",
version = "v1.52.1",
)
go_repository(
name = "org_modernc_mathutil",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/mathutil",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=",
version = "v1.6.0",
)
go_repository(
name = "org_modernc_memory",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/memory",
sum = "h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E=",
version = "v1.8.0",
)
go_repository(
name = "org_modernc_opt",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/opt",
sum = "h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=",
version = "v0.1.3",
)
go_repository(
name = "org_modernc_sortutil",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/sortutil",
sum = "h1:jQiD3PfS2REGJNzNCMMaLSp/wdMNieTbKX920Cqdgqc=",
version = "v1.2.0",
)
go_repository(
name = "org_modernc_sqlite",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/sqlite",
sum = "h1:YFhPVfu2iIgUf9kuA1CR7iiHdcEEsI2i+yjRYHscyxk=",
version = "v1.30.1",
)
go_repository(
name = "org_modernc_strutil",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/strutil",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA=",
version = "v1.2.0",
)
go_repository(
name = "org_modernc_tcl",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/tcl",
sum = "h1:npxzTwFTZYM8ghWicVIX1cRWzj7Nd8i6AqqX2p+IYao=",
version = "v1.13.1",
)
go_repository(
name = "org_modernc_token",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/token",
sum = "h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=",
version = "v1.1.0",
)
go_repository(
name = "org_modernc_z",
build_file_proto_mode = "disable_global",
importpath = "modernc.org/z",
sum = "h1:RTNHdsrOpeoSeOF4FbzTo8gBYByaJ5xT7NgZ9ZqRiJM=",
version = "v1.5.1",
)
go_repository(
name = "org_mongodb_go_mongo_driver",
build_file_proto_mode = "disable_global",
importpath = "go.mongodb.org/mongo-driver",
sum = "h1:YIc7HTYsKndGK4RFzJ3covLz1byri52x0IoMB0Pt/vk=",
version = "v1.13.1",
)
go_repository(
name = "org_uber_go_atomic",
build_file_proto_mode = "disable_global",
importpath = "go.uber.org/atomic",
sum = "h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=",
version = "v1.11.0",
)
go_repository(
name = "org_uber_go_automaxprocs",
build_file_proto_mode = "disable_global",
importpath = "go.uber.org/automaxprocs",
sum = "h1:2LxUOGiR3O6tw8ui5sZa2LAaHnsviZdVOUZw4fvbnME=",
version = "v1.5.2",
)
go_repository(
name = "org_uber_go_goleak",
build_file_proto_mode = "disable_global",
importpath = "go.uber.org/goleak",
sum = "h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=",
version = "v1.3.0",
)
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
go_repository(
name = "org_uber_go_mock",
build_file_proto_mode = "disable_global",
importpath = "go.uber.org/mock",
sum = "h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=",
version = "v0.4.0",
)
go_repository(
name = "org_uber_go_multierr",
build_file_proto_mode = "disable_global",
importpath = "go.uber.org/multierr",
sum = "h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=",
version = "v1.11.0",
)
go_repository(
name = "org_uber_go_ratelimit",
build_file_proto_mode = "disable_global",
importpath = "go.uber.org/ratelimit",
sum = "h1:UQE2Bgi7p2B85uP5dC2bbRtig0C+OeNRnNEafLjsLPA=",
version = "v0.2.0",
)
go_repository(
name = "org_uber_go_tools",
build_file_proto_mode = "disable_global",
importpath = "go.uber.org/tools",
sum = "h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=",
version = "v0.0.0-20190618225709-2cfd321de3ee",
)
go_repository(
name = "org_uber_go_zap",
build_file_proto_mode = "disable_global",
importpath = "go.uber.org/zap",
enterprise-portal: implement basic MSP IAM and RPCs (#63173) Closes CORE-99, closes CORE-176 This PR is based off (and was also served as PoC of) [RFC 962: MSP IAM framework](https://docs.google.com/document/d/1ItJlQnpR5AHbrfAholZqjH8-8dPF1iQcKh99gE6SSjs/edit). It comes with two main parts: 1. The initial version of the MSP IAM SDK: `lib/managedservicesplatform/iam` - Embeds the [OpenFGA server implementation](https://github.com/openfga/openfga/tree/main/pkg/server) and exposes the a `ClientV1` for interacting with it. - Automagically manages the both MSP IAM's and OpenFGA's database migrations upon initializing the `ClientV1`. ![CleanShot 2024-06-18 at 15 09 24@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/387e0e28-a6c2-4664-b946-0ea4a1dd0804) - Ensures the specified OpenFGA's store and automatization model DSL exists. - Utility types and helpers to avoid easy mistakes (i.e. make the relation tuples a bit more strongly-typed). - Decided to put all types and pre-defined values together to simulate a "central registry" and acting as a forcing function for services to form some sort of convention. Then when we migrate the OpenFGA server to a separate standalone service, it will be less headache about consolidating similar meaning types/relations but different string literals. 1. The first use case of the MSP IAM: `cmd/enterprise-portal/internal/subscriptionsservice` - Added/updated RPCs: - Listing enterprise subscriptions via permissions - Update enterprise subscriptions to assign instance domains - Update enterprise subscriptions membership to assign roles (and permissions) - A database table for enterprise subscriptions, only storing the extra instance domains as Enterprise Portal is not the writeable-source-of-truth. ## Other minor changes - Moved `internal/redislock` to `lib/redislock` to be used in MSP IAM SDK. - Call `createdb ...` as part of `enterprise-portal` install script in `sg.config.yaml` (`msp_iam` database is a hard requirement of MSP IAM framework). ## Test plan Tested with gRPC UI: - `UpdateEnterpriseSubscription` to assign an instance domain - `UpdateEnterpriseSubscriptionMembership` to assign roles - `ListEnterpriseSubscriptions`: - List by subscription ID - List by instance domain - List by view cody analytics permissions --------- Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2024-06-20 01:46:48 +00:00
sum = "h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=",
version = "v1.27.0",
)
go_repository(
name = "tech_einride_go_aip",
build_file_proto_mode = "disable_global",
importpath = "go.einride.tech/aip",
sum = "h1:d/4TW92OxXBngkSOwWS2CH5rez869KpKMaN44mdxkFI=",
version = "v0.67.1",
)
go_repository(
name = "tools_gotest",
build_file_proto_mode = "disable_global",
importpath = "gotest.tools",
sum = "h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=",
version = "v2.2.0+incompatible",
)
go_repository(
name = "tools_gotest_v3",
build_file_proto_mode = "disable_global",
importpath = "gotest.tools/v3",
sum = "h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=",
version = "v3.5.1",
)
go_repository(
name = "xyz_gomodules_jsonpatch_v2",
build_file_proto_mode = "disable_global",
importpath = "gomodules.xyz/jsonpatch/v2",
sum = "h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw=",
version = "v2.4.0",
)