diff --git a/deps.bzl b/deps.bzl index 5deaec2911d..148f5604d6a 100644 --- a/deps.bzl +++ b/deps.bzl @@ -41,8 +41,8 @@ def go_dependencies(): name = "com_connectrpc_connect", build_file_proto_mode = "disable_global", importpath = "connectrpc.com/connect", - sum = "h1:rOdrK/RTI/7TVnn3JsVxt3n028MlTRwmK5Q4heSpjis=", - version = "v1.16.1", + sum = "h1:ybd6y+ls7GOlb7Bh5C8+ghA6SvCBajHwxssO2CGFjqE=", + version = "v1.16.2", ) go_repository( name = "com_connectrpc_grpcreflect", @@ -2701,8 +2701,8 @@ def go_dependencies(): name = "com_github_google_martian_v3", build_file_proto_mode = "disable_global", importpath = "github.com/google/martian/v3", - sum = "h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw=", - version = "v3.3.2", + sum = "h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc=", + version = "v3.3.3", ) go_repository( name = "com_github_google_pprof", @@ -2764,8 +2764,8 @@ def go_dependencies(): name = "com_github_googleapis_gax_go_v2", build_file_proto_mode = "disable_global", importpath = "github.com/googleapis/gax-go/v2", - sum = "h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA=", - version = "v2.12.2", + sum = "h1:9gWcmF85Wvq4ryPFvGFaOgPIs1AQX0d0bcbGw4Z96qg=", + version = "v2.12.4", ) go_repository( name = "com_github_googleapis_gnostic", @@ -5890,8 +5890,8 @@ def go_dependencies(): ], build_file_proto_mode = "disable_global", importpath = "github.com/sourcegraph/sourcegraph-accounts-sdk-go", - sum = "h1:+7J5NMA9FJDaf0IhNpIcTEg+Gzu/GN5dRT40wdFU10I=", - version = "v0.0.0-20240531163352-fe74c17cf0d1", + sum = "h1:m6ljyXK3Dp/5iWgfqtkKsTD8Ksyjwl0BSZgEpdgoG48=", + version = "v0.0.0-20240620234947-0d3d4d90b75e", ) go_repository( name = "com_github_sourcegraph_zoekt", @@ -6555,71 +6555,71 @@ def go_dependencies(): name = "com_google_cloud_go", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go", - sum = "h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM=", - version = "v0.112.1", + 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:uzmAMSgYcnlHa9X9YSQZ4Q1wlfl4NNkZyQgho1Z6p04=", - version = "v1.7.5", + 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:2GLNaNu9KRJhJBFTIVRoPwk6xE5mUDgD47abBq4Zp/I=", - version = "v1.8.5", + 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:0cSrii1ZeLr16MbBoocyy5KVnrSdiQ3KN/vtrTe7RqE=", - version = "v1.60.0", + 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:Q+y94XH84jM8SK8O7qiY/PJRexb6n7dRbQ6PiUa4YGM=", - version = "v0.23.0", + 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:sPXnpk+6TneKIrjCjcpX5YGsAKy3PTdpIchoj8/74OE=", - version = "v1.6.5", + 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:CrfIKv9Go3fh/QfQgisU3MeP90Ww7l/sVGmr3TpECo8=", - version = "v1.6.5", + 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:C+QU2K+DzDjk4g074ouwHQGkoff1h5OMQp6sblCVreQ=", - version = "v0.8.3", + sum = "h1:l8VFHdNMC+9Q4EHKye2eOZBu5IwddXF6ufAXI7D+PB8=", + version = "v0.8.4", ) go_repository( name = "com_google_cloud_go_appengine", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/appengine", - sum = "h1:l2SviT44zWQiOv8bPoMBzW0vOcMO22iO0s+nVtVhdts=", - version = "v1.8.5", + 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:vTs08KPLN/iMzTbxpu5ciL06KcsrVPMjz4IwcQyZ4uY=", - version = "v0.8.5", + sum = "h1:7QJ4ZzqLOwh0pHD3UAa+VwiyWmDI7bdmkYKVkte8/wg=", + version = "v0.8.6", ) go_repository( name = "com_google_cloud_go_artifactregistry", @@ -6632,92 +6632,99 @@ def go_dependencies(): name = "com_google_cloud_go_asset", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/asset", - sum = "h1:xgFnBP3luSbUcC9RWJvb3Zkt+y/wW6PKwPHr3ssnIP8=", - version = "v1.17.2", + 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:gCrN3IyvqY3cP0wh2h43d99CgH3G+WYs9CeuFVKChR8=", - version = "v1.11.5", + 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:ijiJy9sYWh75WrqImXsfWc1e3HR3iO+ef9fvW03Ig/4=", - version = "v1.13.5", + 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:LFydisRmS7hQk9P/YhekwuZGqb45TW4QavcrMToWo5A=", - version = "v1.2.4", + 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:2HK4JerwVaIcCh/lJiHwh6+uswPthiMMWhiSWLELayk=", - version = "v1.8.0", + 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:qs0J0O9Ol2h1yA0AU+r7l3hOCPzs2MjE1d6d/kaHIKo=", - version = "v1.0.4", + 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:CpT+/njKuKT3CEmswm6IbhNu9u35zt5dO4yPDLW+nG4=", - version = "v1.59.1", + 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:oWUEQvuC4JvtnqLZ35zgzdbuHt4Itbftvzbe6aEyFdE=", - version = "v1.18.2", + 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:1jcyh2uIUwSZkJ/JmL8kd5SUkL/Krbv8zmYLEbAz6kY=", - version = "v1.8.1", + 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:UMBr/twXvH3jcT5J5/YjRxf2tvwTYIfrpemTebe0txc=", - version = "v1.7.5", + 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:/omiBnyFjm4S1ETHoOmJbL7LH7Ljcei4rYG6Sj3hc80=", - version = "v1.17.5", + 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:ZB6oOmJo+MTov9n629fiCrO9YZPOg25FZvQ7gIHu5ng=", - version = "v1.15.1", + 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:Sr0Zo5EAcPQiCBgHWICg3VGkcdS/LLP1d9SR7qQBM/s=", - version = "v1.7.4", + sum = "h1:t1nc49kRzEU2vrDxQQIEc5rZ4Hr187YrdOZPMAgMwMI=", + version = "v1.7.5", ) go_repository( name = "com_google_cloud_go_cloudsqlconn", @@ -6730,8 +6737,8 @@ def go_dependencies(): name = "com_google_cloud_go_cloudtasks", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/cloudtasks", - sum = "h1:EUt1hIZ9bLv8Iz9yWaCrqgMnIU+Tdh0yXM1MMVGhjfE=", - version = "v1.12.6", + sum = "h1:Ev+poxwb7pudBhiF0ObwAWT7Dh9BZAcsvAfFTWg0MPc=", + version = "v1.12.7", ) go_repository( name = "com_google_cloud_go_compute", @@ -6751,78 +6758,78 @@ def go_dependencies(): name = "com_google_cloud_go_contactcenterinsights", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/contactcenterinsights", - sum = "h1:6Vs/YnDG5STGjlWMEjN/xtmft7MrOTOnOZYUZtGTx0w=", - version = "v1.13.0", + 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:MAaNH7VRNPWEhvqOypq2j+7ONJKrKzon4v9nS3nLZe0=", - version = "v1.31.0", + 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:doJ0M1ljS4hS0D2UbHywlHGwB7sQLNrt9vFk9Zyi7vY=", - version = "v0.11.4", + 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:A0vKYCQdxQuV4Pi0LL9p39Vwvg4jH5yYveMv50gU5Tw=", - version = "v1.19.3", + 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:RYHtcPhmE664+F0Je46p+NvFbG8z//KCXp+uEqB4jZU=", - version = "v0.9.5", + 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:5e4eqGrd0iDTCg4Q+VlAao5j2naKAA7xRurNtwmUknU=", - version = "v0.9.2", + 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:HQ/BUOP8OIGJxuztpYvNvlb+/U+/Bfs9SO8tQbh61fk=", - version = "v1.7.5", + 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:GpIFRdm0qIZNsxqURFJwHt0ZBJZ0nF/mUVEigR7PH/8=", - version = "v0.8.5", + 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:fxIfdU8fxzR3clhOoNI7XFppvAmndxDu1AMH+qX9WKQ=", - version = "v1.14.2", + sum = "h1:Ob8NPT1UcB4kDaDx7/UdsRfZ8xUvUggZshXUlGWDahk=", + version = "v1.15.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:/u81Fd+BvCLp+xjctI1DiWVJn6cn9/s3Akc8xPH02yk=", - version = "v2.4.0", + 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:9ybXs3nr9BzxSGC04SsvtuXaHY0qmJSLIpIAbZo9GqQ=", - version = "v0.8.5", + sum = "h1:FI/1q7VnANchQR9ug+nzujfiusLMfC3BHT7/fHi+BVU=", + version = "v0.8.6", ) go_repository( name = "com_google_cloud_go_datastore", @@ -6835,50 +6842,50 @@ def go_dependencies(): name = "com_google_cloud_go_datastream", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/datastream", - sum = "h1:o1QDKMo/hk0FN7vhoUQURREuA0rgKmnYapB+1M+7Qz4=", - version = "v1.10.4", + 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:m27Ojwj03gvpJqCbodLYiVmE9x4/LrHGGMjzc0LBfM4=", - version = "v1.17.1", + 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:KqG0oxGE71qo0lRVyAoeBozefCvsMfcDzDjoLYSY0F4=", - version = "v1.49.0", + 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:lTipOuJaSjlYnnotPMbEhKURLC6GzCMDDzVbJAEbmYM=", - version = "v1.11.2", + 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:lI62GMEEPO6vXJI9hj+G9WjOvnR0hEjvjokrnex4cxA=", - version = "v1.25.0", + 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:Mml/R6s3vQQvFPpi/9oX3O5dRirgjyJ8cksK8N19Y7g=", - version = "v0.9.5", + 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:tBY32km78ScpK2aOP84JoW/+wtpx5WluyPUSEE3270U=", - version = "v1.1.5", + sum = "h1:a++vBi1J00NP1ifVP5mV/3j1/EJKWPj0h6NfUPLfuCQ=", + version = "v1.2.0", ) go_repository( name = "com_google_cloud_go_errorreporting", @@ -6891,120 +6898,120 @@ def go_dependencies(): name = "com_google_cloud_go_essentialcontacts", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/essentialcontacts", - sum = "h1:13eHn5qBnsawxI7mIrv4jRIEmQ1xg0Ztqw5ZGqtUNfA=", - version = "v1.6.6", + 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:ORkd6/UV5FIdA8KZQDLNZYKS7BBOrj0p01DXPmT4tE4=", - version = "v1.13.4", + 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:X5G4y/vrUo1B8Nsz93qSWTMAcM8LXbGUldq33OdcdCw=", - version = "v1.8.1", + 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:8aLcKnMPoldYU3YHgu4t2exrKhLQkqaXAGqT0ljrFVw=", - version = "v1.14.0", + 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:IWVylmK5F6hJ3R5zaRW7jI5PrWhCvtBVU4axQLmXSo4=", - version = "v1.16.0", + sum = "h1:0kcko/2AKwm4USnWcGs/W/k++PAYPA3dYaQw1y5Xg3M=", + version = "v1.16.1", ) go_repository( name = "com_google_cloud_go_gkebackup", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/gkebackup", - sum = "h1:iuE8KNtTsPOc79qeWoNS8zOWoXPD9SAdOmwgxtlCmh8=", - version = "v1.3.5", + 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:17d+ZSSXKqG/RwZCq3oFMIWLPI8Zw3b8+a9/BEVlwH0=", - version = "v0.8.5", + 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:RboLNFzf9wEMSo7DrKVBlf+YhK/A/jrLN454L5Tz99Q=", - version = "v0.14.5", + 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:rsSZAGLhyjyE/bE2ToT5fqo1qSW7S+Ubsc9jFOcbhSI=", - version = "v1.1.1", + sum = "h1:CFBoDcQi9zLOkzM6xqmRzljZhF4A6A47QaQ0WtNd+DA=", + version = "v1.1.2", ) go_repository( name = "com_google_cloud_go_gsuiteaddons", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/gsuiteaddons", - sum = "h1:CZEbaBwmbYdhFw21Fwbo+C35HMe36fTE0FBSR4KSfWg=", - version = "v1.6.5", + 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:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc=", - version = "v1.1.6", + 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:94zirc2r4t6KzhAMW0R6Dme005eTP6yf7g6vN4IhRrA=", - version = "v1.9.4", + 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:xd4U7pgl3GHV+MABnv1BF4/Vy/zBF7CYC8XngkOLzag=", - version = "v1.4.5", + 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:munTeBlbqI33iuTYgXy7S8lW2TCgi5l1hA4roSIY+EE=", - version = "v1.7.5", + 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:7caV9K3yIxvlQPAcaFffhlT7d1qpxjB1wHBtjWa13SM=", - version = "v1.15.7", + 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:iaJZg6K4j/2PvZZVcjeO/btcWWIllVRBhuTFjGO4LXs=", - version = "v1.12.3", + 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:gXvN70m2p+4zgJFzaz6gMKaxTuF9WJ0USYoMLWAOm8g=", - version = "v0.9.5", + sum = "h1:8w3edjRiSN6GCxT0uJoXr6Zo2XNYD+6TxPZa7uIIOaU=", + version = "v0.9.6", ) go_repository( name = "com_google_cloud_go_logging", @@ -7017,134 +7024,134 @@ def go_dependencies(): name = "com_google_cloud_go_longrunning", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/longrunning", - sum = "h1:GOE6pZFdSrTb4KAiKnXsJBtlE6mEyaW44oKyMILWnOg=", - version = "v0.5.5", + 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:+bpih1piZVLxla/XBqeSUzJBp8gv9plGHIMAI7DLpDM=", - version = "v1.6.5", + 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:EVCZAiDvog9So46460BGbCasPhi613exoaQbpilMVlk=", - version = "v1.6.4", + 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:c76KdIXljQHSCb/Cy47S8H4s05A4zbK3pAFGzwcczZo=", - version = "v0.8.5", + 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:yeDv5qxRedFosvpMSEswrqUsJM5OdWvssPHFliNFTc4=", - version = "v1.10.5", + 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:dR7vqWXlK6IYR8Wbu9mdFfwlVjodIBhd1JRrpZftTEg=", - version = "v1.13.4", + 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:NfkDLQDG2UR3WYZVQE8kwSbUIEyIqJUPl+aOQdFH1T4=", - version = "v1.18.0", + 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:GBfXFhLyPspnaBE3nI/BRjdhW8vcbpT9QjE/4kDCDdc=", - version = "v1.14.4", + 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:aLV5GcosBNmd6M8+a0ekB0XlLRexv4fvnJJrYnqeBcg=", - version = "v1.9.4", + 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:+caSxBTj0E8OYVh/5wElFdjEMO1S/rZtE1152Cepchc=", - version = "v0.9.5", + 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:FH48boYmrWVQ6k0Mx/WrnNafXncT5iSYxA8CNyWTgy0=", - version = "v1.11.3", + 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:63NZaWyN+5rZEKHPX4ACpw3BjgyeuY8+rCehiCMaGPY=", - version = "v1.6.3", + 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:YHgWMlrPttIVGItgGfuvO2KM7x+y9ivN/Yk92pMm1a4=", - version = "v1.8.5", + 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:2JbXigqBJVp8Dx5dONUttFqewu4fP0p3pgOdIZAhpYU=", - version = "v1.12.1", + 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:Mo5jGAxOMKH/PmDY7fgY19yFcVbvwREb5D5zMPQjFfo=", - version = "v1.12.5", + 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:1K4nOT5VEZNt7XkhaTXupBYos5HjzvJMfhvyD2wWdFs=", - version = "v1.13.1", + 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:DH3WFLzEoJdW/6xgsmoDqOwT1xddFi7gKu0QGZQhpGU=", - version = "v0.8.5", + 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:c0WOzC6hz964QWNBkyKfna8A2jOIx1zzZa43Gx/P09o=", - version = "v1.10.3", + 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:UZ0assTnATXSggoxUIh61RjTQ4P9zCMk/kEMbn0nMYA=", - version = "v0.9.5", + sum = "h1:bcIABOUmpnzQip83OVv+Ju/NxXjUTRLUSP+FVLFG6kk=", + version = "v0.9.6", ) go_repository( name = "com_google_cloud_go_profiler", @@ -7157,8 +7164,8 @@ def go_dependencies(): name = "com_google_cloud_go_pubsub", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/pubsub", - sum = "h1:0uEEfaB1VIJzabPpwpZf44zWAKAme3zwKKxHk7vJQxQ=", - version = "v1.37.0", + sum = "h1:J1OT7h51ifATIedjqk/uBNPh+1hkvUaH4VKbz4UuAsc=", + version = "v1.38.0", ) go_repository( name = "com_google_cloud_go_pubsublite", @@ -7171,225 +7178,225 @@ def go_dependencies(): name = "com_google_cloud_go_recaptchaenterprise_v2", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/recaptchaenterprise/v2", - sum = "h1:U3Wfq12X9cVMuTpsWDSURnXF0Z9hSPTHj+xsnXDRLsw=", - version = "v2.9.2", + 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:ineqLswaCSBY0csYv5/wuXJMBlxATK6Xc5jJkpiTEdM=", - version = "v0.8.5", + 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:LVLYS3r3u0MSCxQSDUtLSkporEGi9OAE6hGvayrZNPs=", - version = "v1.12.1", + 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:QF0maEdVv0Fj/2roU8sX3NpiDBzP9ICYTO+5F32gQNo=", - version = "v1.14.2", + 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:AZWr1vWVDKGwfLsVhcN+vcwOz3xqqYxtmMa0aABCMms=", - version = "v1.9.5", + 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:BTr5MVykJwClASci/7Og4Qfx70aQ4n3epsNLj94ZYgw=", - version = "v1.6.5", + 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:Fn1GuAua1c6crCGqfJ1qMxG1Xh10Tg/x5EUODEHMqkw=", - version = "v1.16.0", + 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:m9WDA7DzTpczhZggwYlZcBWgCRb+kgSIisWn1sbw2rQ=", - version = "v1.3.4", + 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:5U8iXLoQ03qOB+ZXlAecU7fiE33+u3QiM9nh4cd0eTE=", - version = "v1.10.6", + 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:82fpF5vBBvu9XW4qj0FU2C6qVMtj1RM/XHwKXUEAfYY=", - version = "v1.11.5", + 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:wTKJQ10j8EYgvE8Y+KhovxDRVDk2iv/OsxZ6GrLP3kE=", - version = "v1.15.5", + 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:/5jjkZ+uGe8hZ7pvd7pO30VW/a+pT2MrrdgOqjyucKQ=", - version = "v1.24.4", + sum = "h1:NpEJeFbm3ad3ibpbpIBKXJS7eQq1cZhtt9nrDTMO/QQ=", + version = "v1.28.0", ) go_repository( name = "com_google_cloud_go_servicedirectory", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/servicedirectory", - sum = "h1:da7HFI1229kyzIyuVEzHXip0cw0d+E0s8mjQby0WN+k=", - version = "v1.11.4", + sum = "h1:gkzx9Cd+OTOD+zY4u5vtbdvOx7vrvHYdeDiNdC6vKyw=", + version = "v1.11.5", ) go_repository( name = "com_google_cloud_go_shell", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/shell", - sum = "h1:3Fq2hzO0ZSyaqBboJrFkwwf/qMufDtqwwA6ep8EZxEI=", - version = "v1.7.5", + 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:o/Cv7/zZ1WgRXVCd5g3Nc23ZI39p/1pWFqFwvg6Wcu8=", - version = "v1.56.0", + 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:nuFc+Kj5B8de75nN4FdPyUbI2SiBoHZG6BLurXL56Q0=", - version = "v1.21.1", + 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:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg=", - version = "v1.38.0", + 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:dy4fL3wO0VABvzM05ycMUPFHxTPbJz9Em8ikAJVqSbI=", - version = "v1.10.4", + 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:JssV0CE3FNujuSWn7SkosOzg7qrMxVnt6txOfGcMSa4=", - version = "v1.6.6", + 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:dxY2Q5mHCbrGa3oPR2O3PCicdnvKa1JmwGQK36EFLOw=", - version = "v1.7.5", + 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:C8YyYda8WtNdBoCgFwwBzZd+S6+EScHOxM/z1h0NNp8=", - version = "v1.6.5", + 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:0pr4lIKJ5XZFYD9GtxXEWr0KkVeigc3wlGpZco0X1oA=", - version = "v1.10.5", + 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:upovZ0wRMdzZvXnu+RPam41B0mRJ+coRXFP2cYFJ7ew=", - version = "v1.10.1", + 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:TXwotxkShP1OqgKsbd+b8N5hrIHavSyLGvYnLGCZ7xc=", - version = "v1.20.4", + 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:mYaWH8uhUCXLJCN3gdXswKzRa2+lK0zN6/KsIubm6pE=", - version = "v1.11.5", + sum = "h1:P0Sa8+5KOEAVk/fazUNjVPzRCijCheZWJ8wL8xBn9Uk=", + version = "v1.11.6", ) go_repository( name = "com_google_cloud_go_vision_v2", build_file_proto_mode = "disable_global", importpath = "cloud.google.com/go/vision/v2", - sum = "h1:W52z1b6LdGI66MVhE70g/NFty9zCYYcjdKuycqmlhtg=", - version = "v2.8.0", + 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:5v9RT2vWyuw3pK2ox0HQpkoftO7Q7/8591dTxxQc79g=", - version = "v1.7.5", + 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:EGdDi9QbqThfZq3ILcDK5g+m9jTevc34AY5tACx5v7k=", - version = "v1.1.1", + 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:XyL6hTLtEM/eE4F1GEge8xUN9ZCkiVWn44K/YA7z1rQ=", - version = "v1.7.5", + 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:251MvGuC8wisNN7+jqu9DDDZAi38KiMXxOpA/EWy4dE=", - version = "v1.9.5", + 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:YqWZrZYabG88TZt7364XWRJGhxmxhony2ZUyZEYMF2k=", - version = "v1.6.5", + 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:uHNmUiatTbPQ4H1pabwfzpfEYD4BBnqDHqMm2IesOh4=", - version = "v1.12.4", + sum = "h1:hH511zmS93oE6j64m/eiGWnfgqailh/S8+f3MVNLcE8=", + version = "v1.12.5", ) go_repository( name = "com_layeh_gopher_luar", @@ -8328,8 +8335,8 @@ def go_dependencies(): name = "org_golang_google_api", build_file_proto_mode = "disable_global", importpath = "google.golang.org/api", - sum = "h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY=", - version = "v0.169.0", + sum = "h1:if5fPvudRQ78GeRx3RayIoiuV7modtErPIZC/T2bIvE=", + version = "v0.182.0", ) go_repository( name = "org_golang_google_appengine", @@ -8349,8 +8356,8 @@ def go_dependencies(): name = "org_golang_google_genproto", build_file_proto_mode = "disable_global", importpath = "google.golang.org/genproto", - sum = "h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y=", - version = "v0.0.0-20240213162025-012b6fc9bca9", + sum = "h1:wu/KJm9KJwpfHWhkkZGohVC6KRrc1oJNr4jwtQMOQXw=", + version = "v0.0.0-20240401170217-c3f982113cda", ) go_repository( name = "org_golang_google_genproto_googleapis_api", @@ -8363,8 +8370,8 @@ def go_dependencies(): name = "org_golang_google_genproto_googleapis_bytestream", build_file_proto_mode = "disable_global", importpath = "google.golang.org/genproto/googleapis/bytestream", - sum = "h1:YqFWYZXim8bG9v68xU8WjTZmYKb5M5dMeSOWIp6jogI=", - version = "v0.0.0-20240304161311-37d4d3c04a78", + sum = "h1:Px+x8PNp8izq1ORW6jI007V/fRZ3bWrgcWHImtBduXc=", + version = "v0.0.0-20240521202816-d264139d666e", ) go_repository( name = "org_golang_google_genproto_googleapis_rpc", @@ -8678,8 +8685,8 @@ def go_dependencies(): name = "tech_einride_go_aip", build_file_proto_mode = "disable_global", importpath = "go.einride.tech/aip", - sum = "h1:XfV+NQX6L7EOYK11yoHHFtndeaWh3KbD9/cN/6iWEt8=", - version = "v0.66.0", + sum = "h1:d/4TW92OxXBngkSOwWS2CH5rez869KpKMaN44mdxkFI=", + version = "v0.67.1", ) go_repository( name = "tools_gotest", diff --git a/dev/sg/BUILD.bazel b/dev/sg/BUILD.bazel index 10b49e20345..cb7b05e1629 100644 --- a/dev/sg/BUILD.bazel +++ b/dev/sg/BUILD.bazel @@ -54,6 +54,7 @@ go_library( "//dev/sg/buf", "//dev/sg/ci", "//dev/sg/dependencies", + "//dev/sg/enterprise", "//dev/sg/internal/analytics", "//dev/sg/internal/background", "//dev/sg/internal/backport", diff --git a/dev/sg/enterprise/BUILD.bazel b/dev/sg/enterprise/BUILD.bazel new file mode 100644 index 00000000000..aa6a7f3594d --- /dev/null +++ b/dev/sg/enterprise/BUILD.bazel @@ -0,0 +1,25 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "enterprise", + srcs = ["sg_enterprise.go"], + importpath = "github.com/sourcegraph/sourcegraph/dev/sg/enterprise", + visibility = ["//visibility:public"], + deps = [ + "//dev/sg/internal/category", + "//dev/sg/internal/std", + "//dev/sg/sams/samsflags", + "//lib/enterpriseportal/subscriptions/v1:subscriptions", + "//lib/enterpriseportal/subscriptions/v1/v1connect", + "//lib/errors", + "//lib/pointers", + "@com_connectrpc_connect//:connect", + "@com_github_sourcegraph_sourcegraph_accounts_sdk_go//:sourcegraph-accounts-sdk-go", + "@com_github_sourcegraph_sourcegraph_accounts_sdk_go//scopes", + "@com_github_urfave_cli_v2//:cli", + "@org_golang_google_protobuf//encoding/protojson", + "@org_golang_google_protobuf//types/known/fieldmaskpb", + "@org_golang_x_exp//maps", + "@org_golang_x_oauth2//:oauth2", + ], +) diff --git a/dev/sg/enterprise/sg_enterprise.go b/dev/sg/enterprise/sg_enterprise.go new file mode 100644 index 00000000000..dc661f23c99 --- /dev/null +++ b/dev/sg/enterprise/sg_enterprise.go @@ -0,0 +1,393 @@ +// Package enterprise exports 'sg enterprise' commands for interacting with the +// Sourcegraph Enterprise Portal service. +package enterprise + +import ( + "context" + "fmt" + "slices" + "strings" + + "connectrpc.com/connect" + "github.com/urfave/cli/v2" + "golang.org/x/exp/maps" + "golang.org/x/oauth2" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/types/known/fieldmaskpb" + + sams "github.com/sourcegraph/sourcegraph-accounts-sdk-go" + "github.com/sourcegraph/sourcegraph-accounts-sdk-go/scopes" + subscriptionsv1 "github.com/sourcegraph/sourcegraph/lib/enterpriseportal/subscriptions/v1" + subscriptionsv1connect "github.com/sourcegraph/sourcegraph/lib/enterpriseportal/subscriptions/v1/v1connect" + "github.com/sourcegraph/sourcegraph/lib/errors" + "github.com/sourcegraph/sourcegraph/lib/pointers" + + "github.com/sourcegraph/sourcegraph/dev/sg/internal/category" + "github.com/sourcegraph/sourcegraph/dev/sg/internal/std" + "github.com/sourcegraph/sourcegraph/dev/sg/sams/samsflags" +) + +const ( + enterprisePortalProdURL = "https://enterprise-portal.sourcegraph.com" + enterprisePortalDevURL = "https://enterprise-portal.sgdev.org" +) + +var ( + scopeWriteSubscriptions = scopes.ToScope(scopes.ServiceEnterprisePortal, "subscription", scopes.ActionWrite) + scopeReadSubscriptions = scopes.ToScope(scopes.ServiceEnterprisePortal, "subscription", scopes.ActionRead) + + scopeWriteSubscriptionsPermissions = scopes.ToScope(scopes.ServiceEnterprisePortal, "permission.subscription", scopes.ActionWrite) +) + +var clientFlags = append(samsflags.ClientCredentials(), &cli.StringFlag{ + Name: "enterprise-portal-server", + Usage: "The URL of the Enterprise Portal server to use (defaults to the appropriate one for SG_SAMS_SERVER_URL)", +}) + +func newSubscriptionsClient(c *cli.Context, ss ...scopes.Scope) subscriptionsv1connect.SubscriptionsServiceClient { + ctx := c.Context + samsServer := c.String("sams-server") + enterprisePortal := enterprisePortalDevURL + if epServer := c.String("enterprise-portal-server"); epServer != "" { + enterprisePortal = epServer + } else if samsServer == samsflags.SAMSProdURL { + enterprisePortal = enterprisePortalProdURL + } + + std.Out.WriteSuggestionf("Using %q and %q", + enterprisePortal, samsServer) + + return subscriptionsv1connect.NewSubscriptionsServiceClient( + oauth2.NewClient(ctx, samsflags.NewClientCredentialsFromFlags(c, ss).TokenSource(ctx)), + enterprisePortal) +} + +// resolveUserReference converts a 'user reference' provided as an argument or +// flag, into a SAMS account ID. The 'user reference' can either be a SAMS user +// ID, or an email address (determined by the presence of '@' which is also an +// illegal character in a SAMS user ID). +// +// Required scope: profile +func resolveUserReference(ctx context.Context, users *sams.UsersServiceV1, userReference string) (samsAccountID string, _ error) { + if strings.Contains(userReference, "@") { + user, err := users.GetUserByEmail(ctx, userReference) + if err != nil { + return "", errors.Wrapf(err, "get user by email %q", userReference) + } + samsAccountID = user.Id + } else { + user, err := users.GetUserByID(ctx, userReference) // check if it's a valid user ID + if err != nil { + return "", errors.Wrapf(err, "get user by ID %q", userReference) + } + samsAccountID = user.GetId() + } + + if samsAccountID != userReference { + std.Out.WriteSuggestionf("Resolved user %q to %q", userReference, samsAccountID) + } + + return samsAccountID, nil +} + +// Command is the 'sg sams' toolchain for the Sourcegraph Accounts Management System (SAMS). +var Command = &cli.Command{ + Name: "enterprise", + Category: category.Company, + Usage: "Manage Sourcegraph Enterprise subscriptions in Enterprise Portal", + Description: `TODO + +Please reach out to #discuss-core-services for assistance if you have any questions!`, + Subcommands: []*cli.Command{{ + Name: "subscription", + Usage: "Manage Sourcegraph Enterprise subscriptions in Enterprise Portal", + Subcommands: []*cli.Command{{ + Name: "list", + Usage: "List subscriptions", + ArgsUsage: "[subscription IDs...]", + Flags: append(clientFlags, + &cli.StringFlag{ + Name: "member.cody-analytics-viewer", + Usage: "Member with Cody Analytics viewer permission to filter for (email or SAMS user ID)", + }), + Action: func(c *cli.Context) error { + client := newSubscriptionsClient(c, scopeReadSubscriptions) + req := &subscriptionsv1.ListEnterpriseSubscriptionsRequest{ + Filters: []*subscriptionsv1.ListEnterpriseSubscriptionsFilter{{ + Filter: &subscriptionsv1.ListEnterpriseSubscriptionsFilter_IsArchived{ + IsArchived: false, + }, + }}, + } + for _, subscription := range c.Args().Slice() { + if !strings.HasPrefix(subscription, subscriptionsv1.EnterpriseSubscriptionIDPrefix) { + return errors.Newf("invalid subscription ID %q, expected prefix %q", + subscription, subscriptionsv1.EnterpriseSubscriptionIDPrefix) + } + req.Filters = append(req.Filters, &subscriptionsv1.ListEnterpriseSubscriptionsFilter{ + Filter: &subscriptionsv1.ListEnterpriseSubscriptionsFilter_SubscriptionId{ + SubscriptionId: subscription, + }, + }) + } + if member := c.String("member.cody-analytics-viewer"); member != "" { + samsClient, err := samsflags.NewClientFromFlags(c, scopes.Scopes{scopes.Profile}) + if err != nil { + return errors.Wrap(err, "get SAMS client") + } + samsUserID, err := resolveUserReference(c.Context, samsClient.Users(), member) + if err != nil { + return errors.Wrap(err, "resolve SAMS user ID") + } + req.Filters = append(req.Filters, &subscriptionsv1.ListEnterpriseSubscriptionsFilter{ + Filter: &subscriptionsv1.ListEnterpriseSubscriptionsFilter_Permission{ + Permission: &subscriptionsv1.Permission{ + Type: subscriptionsv1.PermissionType_PERMISSION_TYPE_SUBSCRIPTION_CODY_ANALYTICS, + Relation: subscriptionsv1.PermissionRelation_PERMISSION_RELATION_VIEW, + SamsAccountId: samsUserID, + }, + }, + }) + } + + resp, err := client.ListEnterpriseSubscriptions(c.Context, connect.NewRequest(req)) + if err != nil { + return errors.Wrap(err, "list subscriptions") + } + + for _, s := range resp.Msg.GetSubscriptions() { + data, err := protojson.MarshalOptions{ + Multiline: true, + }.Marshal(s) + if err != nil { + std.Out.WriteWarningf("Failed to marshal subscription %q: %s", + s.GetId(), err.Error()) + continue + } + _ = std.Out.WriteCode("json", string(data)) + } + std.Out.WriteSuccessf("Found %d subscriptions", len(resp.Msg.GetSubscriptions())) + return nil + }, + }, { + Name: "license", + Usage: "Manage Enterprise subscription licenses", + Subcommands: []*cli.Command{{ + Name: "list", + Usage: "List licenses for all or specified subscriptions", + ArgsUsage: "[subscription IDs...]", + Flags: clientFlags, + Action: func(c *cli.Context) error { + client := newSubscriptionsClient(c, scopeReadSubscriptions) + req := &subscriptionsv1.ListEnterpriseSubscriptionLicensesRequest{ + Filters: []*subscriptionsv1.ListEnterpriseSubscriptionLicensesFilter{{ + Filter: &subscriptionsv1.ListEnterpriseSubscriptionLicensesFilter_IsRevoked{ + IsRevoked: false, + }, + }}, + } + for _, subscription := range c.Args().Slice() { + if !strings.HasPrefix(subscription, subscriptionsv1.EnterpriseSubscriptionIDPrefix) { + continue + } + req.Filters = append(req.Filters, &subscriptionsv1.ListEnterpriseSubscriptionLicensesFilter{ + Filter: &subscriptionsv1.ListEnterpriseSubscriptionLicensesFilter_SubscriptionId{ + SubscriptionId: subscription, + }, + }) + } + resp, err := client.ListEnterpriseSubscriptionLicenses(c.Context, connect.NewRequest(req)) + if err != nil { + return errors.Wrap(err, "list subscriptions") + } + for _, s := range resp.Msg.GetLicenses() { + if k := s.GetKey(); k != nil { + k.LicenseKey = "" + } + data, err := protojson.MarshalOptions{ + Multiline: true, + }.Marshal(s) + if err != nil { + std.Out.WriteWarningf("Failed to marshal license %q: %s", + s.GetId(), err.Error()) + continue + } + _ = std.Out.WriteCode("json", string(data)) + } + std.Out.WriteSuccessf("Found %d licenses", len(resp.Msg.GetLicenses())) + return nil + }, + }}, + }, { + Name: "set-instance-domain", + Usage: "Assign an instance domain to a subscription", + ArgsUsage: " ", + Flags: clientFlags, + Action: func(c *cli.Context) error { + client := newSubscriptionsClient(c, scopeWriteSubscriptions) + s := &subscriptionsv1.EnterpriseSubscription{ + Id: c.Args().Get(0), + InstanceDomain: c.Args().Get(1), + } + if s.Id == "" { + return errors.New("subscription ID required") + } + if !strings.HasPrefix(s.Id, subscriptionsv1.EnterpriseSubscriptionIDPrefix) { + return errors.Newf("subscription ID must start with %q", subscriptionsv1.EnterpriseSubscriptionIDPrefix) + } + if s.InstanceDomain == "" { + var res string + ok, err := std.PromptAndScan(std.Out, "No instance domain provided; the assigned domain will be removed, are you sure? (y/N) ", &res) + if err != nil { + return err + } else if !ok { + return errors.New("response is required") + } + if res != "y" { + return errors.New("aborting") + } + } + var err error + s.InstanceDomain, err = subscriptionsv1.NormalizeInstanceDomain(s.InstanceDomain) + if err != nil { + return errors.Wrap(err, "normalize instance domain") + } + + std.Out.Writef("Assigning domain %q to subscription %q\n", + s.InstanceDomain, s.Id) + resp, err := client.UpdateEnterpriseSubscription(c.Context, connect.NewRequest(&subscriptionsv1.UpdateEnterpriseSubscriptionRequest{ + Subscription: s, + UpdateMask: &fieldmaskpb.FieldMask{ + Paths: []string{ + "instance_domain", + }, + }, + })) + if err != nil { + return errors.Wrap(err, "update enterprise subscription") + } + + updatedSub := resp.Msg.GetSubscription() + std.Out.WriteSuccessf("Updated subscription %q with instance domain %q\n", + pointers.Deref(pointers.NilIfZero(updatedSub.DisplayName), updatedSub.GetId()), + updatedSub.GetInstanceDomain()) + return nil + }, + }, { + Name: "update-membership", + Usage: "Update or assign membership to a subscription for one or more SAMS users", + Description: "Only one of --subscription-id or --subscription-instance-domain needs to be specified.", + ArgsUsage: "", + Flags: append(clientFlags, + &cli.StringFlag{ + Name: "subscription-id", + Usage: "ID of the subscription to assign membership to", + }, + &cli.StringFlag{ + Name: "subscription-instance-domain", + Usage: "Assigned instance domain of the subscription to assign membership to", + }, + &cli.StringSliceFlag{ + Name: "role", + Usage: fmt.Sprintf("Roles to assign to the member - any of: [%s]", + strings.Join(func() []string { + values := maps.Clone(subscriptionsv1.Role_value) + delete(values, "ROLE_UNSPECIFIED") + keys := maps.Keys(values) + slices.Sort(keys) + return keys + }(), ", ")), + }), + Action: func(c *cli.Context) error { + ctx := context.Background() + client := newSubscriptionsClient(c, + scopeWriteSubscriptions, + scopeWriteSubscriptionsPermissions) + + var ( + members = c.Args().Slice() // can be email or user ID + roles = c.StringSlice("role") + + subscriptionID = c.String("subscription-id") + subscriptionInstanceDomain = c.String("subscription-instance-domain") + ) + if len(members) == 0 { + return errors.New("at least one SAMS account email or ID is required") + } + if subscriptionID == "" && subscriptionInstanceDomain == "" { + return errors.New("-subscription-id or -subscription-instance-domain required") + } + if subscriptionID != "" { + if !strings.HasPrefix(subscriptionID, subscriptionsv1.EnterpriseSubscriptionIDPrefix) { + return errors.Newf("subscription ID must start with %q", subscriptionsv1.EnterpriseSubscriptionIDPrefix) + } + } + if subscriptionInstanceDomain != "" { + var err error + subscriptionInstanceDomain, err = subscriptionsv1.NormalizeInstanceDomain(subscriptionInstanceDomain) + if err != nil { + return errors.Wrap(err, "normalize instance domain") + } + } + if len(roles) == 0 { + var res string + ok, err := std.PromptAndScan(std.Out, "No roles provided; all roles will be removed, are you sure? (y/N) ", &res) + if err != nil { + return err + } else if !ok { + return errors.New("response is required") + } + if res != "y" { + return errors.New("aborting") + } + } + pbRoles := make([]subscriptionsv1.Role, len(roles)) + for i, r := range roles { + role, ok := subscriptionsv1.Role_value[r] + if !ok { + return errors.Newf("invalid role %q", r) + } + if role == 0 { + return errors.Newf("invalid role %q", r) + } + pbRoles[i] = subscriptionsv1.Role(role) + } + + samsClient, err := samsflags.NewClientFromFlags(c, scopes.Scopes{scopes.Profile}) + if err != nil { + return errors.Wrap(err, "get SAMS client") + } + + var subscriptionDebugText string + if subscriptionID != "" { + subscriptionDebugText = fmt.Sprintf("subscription %q", subscriptionID) + } else { + subscriptionDebugText = fmt.Sprintf("subscription with instance domain %q", subscriptionInstanceDomain) + } + std.Out.WriteSuggestionf("Assigning %d users roles [%s] to %s", + len(members), strings.Join(roles, ", "), subscriptionDebugText) + + for _, member := range members { + samsUserID, err := resolveUserReference(c.Context, samsClient.Users(), member) + if err != nil { + return errors.Wrap(err, "resolve SAMS user ID") + } + _, err = client.UpdateEnterpriseSubscriptionMembership(ctx, connect.NewRequest(&subscriptionsv1.UpdateEnterpriseSubscriptionMembershipRequest{ + Membership: &subscriptionsv1.EnterpriseSubscriptionMembership{ + SubscriptionId: subscriptionID, + InstanceDomain: subscriptionInstanceDomain, + MemberSamsAccountId: samsUserID, + MemberRoles: pbRoles, + }, + })) + if err != nil { + return errors.Wrapf(err, "assign membership to user %q", + samsUserID) + } + } + std.Out.WriteSuccessf("Done!") + return nil + }, + }}, + }}, +} diff --git a/dev/sg/main.go b/dev/sg/main.go index e53e7d5e6ae..225e84a21ff 100644 --- a/dev/sg/main.go +++ b/dev/sg/main.go @@ -13,6 +13,7 @@ import ( "github.com/urfave/cli/v2" "github.com/sourcegraph/sourcegraph/dev/sg/ci" + "github.com/sourcegraph/sourcegraph/dev/sg/enterprise" "github.com/sourcegraph/sourcegraph/dev/sg/internal/analytics" "github.com/sourcegraph/sourcegraph/dev/sg/internal/background" "github.com/sourcegraph/sourcegraph/dev/sg/internal/check" @@ -301,6 +302,7 @@ var sg = &cli.App{ msp.Command, securityCommand, sams.Command, + enterprise.Command, // Util analyticsCommand, diff --git a/dev/sg/sams/BUILD.bazel b/dev/sg/sams/BUILD.bazel index ead76e0de01..a0a43ff5009 100644 --- a/dev/sg/sams/BUILD.bazel +++ b/dev/sg/sams/BUILD.bazel @@ -8,9 +8,9 @@ go_library( deps = [ "//dev/sg/internal/category", "//dev/sg/internal/std", + "//dev/sg/sams/samsflags", "//lib/errors", - "@com_github_sourcegraph_sourcegraph_accounts_sdk_go//:sourcegraph-accounts-sdk-go", + "@com_github_sourcegraph_sourcegraph_accounts_sdk_go//scopes", "@com_github_urfave_cli_v2//:cli", - "@org_golang_x_oauth2//clientcredentials", ], ) diff --git a/dev/sg/sams/samsflags/BUILD.bazel b/dev/sg/sams/samsflags/BUILD.bazel new file mode 100644 index 00000000000..bf4d196e493 --- /dev/null +++ b/dev/sg/sams/samsflags/BUILD.bazel @@ -0,0 +1,14 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "samsflags", + srcs = ["clientcredentials.go"], + importpath = "github.com/sourcegraph/sourcegraph/dev/sg/sams/samsflags", + visibility = ["//visibility:public"], + deps = [ + "@com_github_sourcegraph_sourcegraph_accounts_sdk_go//:sourcegraph-accounts-sdk-go", + "@com_github_sourcegraph_sourcegraph_accounts_sdk_go//scopes", + "@com_github_urfave_cli_v2//:cli", + "@org_golang_x_oauth2//clientcredentials", + ], +) diff --git a/dev/sg/sams/samsflags/clientcredentials.go b/dev/sg/sams/samsflags/clientcredentials.go new file mode 100644 index 00000000000..f0b56412019 --- /dev/null +++ b/dev/sg/sams/samsflags/clientcredentials.go @@ -0,0 +1,61 @@ +package samsflags + +import ( + "fmt" + + "github.com/urfave/cli/v2" + "golang.org/x/oauth2/clientcredentials" + + sams "github.com/sourcegraph/sourcegraph-accounts-sdk-go" + "github.com/sourcegraph/sourcegraph-accounts-sdk-go/scopes" +) + +const ( + SAMSDevURL = "https://accounts.sgdev.org" + SAMSProdURL = "https://accounts.sourcegraph.com" +) + +func ClientCredentials() []cli.Flag { + return []cli.Flag{ + &cli.StringFlag{ + Name: "sams-server", + Aliases: []string{"sams"}, + EnvVars: []string{"SG_SAMS_SERVER_URL"}, + Value: SAMSDevURL, + Usage: fmt.Sprintf("URL of the Sourcegraph Accounts Management System (SAMS) server - one of %q or %q", + SAMSProdURL, SAMSDevURL), + }, + &cli.StringFlag{ + Name: "client-id", + EnvVars: []string{"SG_SAMS_CLIENT_ID"}, + Usage: "Client ID of the Sourcegraph Accounts Management System (SAMS) client", + Required: true, + }, + &cli.StringFlag{ + Name: "client-secret", + EnvVars: []string{"SG_SAMS_CLIENT_SECRET"}, + Usage: "Client secret for the Sourcegraph Accounts Management System (SAMS) client", + Required: true, + }, + } +} + +// NewClientCredentialsFromFlags returns a new client credentials config from +// clientCredentialsFlags. +func NewClientCredentialsFromFlags(c *cli.Context, ss scopes.Scopes) *clientcredentials.Config { + return &clientcredentials.Config{ + ClientID: c.String("client-id"), + ClientSecret: c.String("client-secret"), + TokenURL: c.String("sams-server") + "/oauth/token", + Scopes: scopes.ToStrings(ss), + } +} + +func NewClientFromFlags(c *cli.Context, ss scopes.Scopes) (*sams.ClientV1, error) { + return sams.NewClientV1(sams.ClientV1Config{ + ConnConfig: sams.ConnConfig{ + ExternalURL: c.String("sams-server"), + }, + TokenSource: NewClientCredentialsFromFlags(c, ss).TokenSource(c.Context), + }) +} diff --git a/dev/sg/sams/sg_sams.go b/dev/sg/sams/sg_sams.go index 6480e9f28e2..3fe1b13bf15 100644 --- a/dev/sg/sams/sg_sams.go +++ b/dev/sg/sams/sg_sams.go @@ -5,53 +5,23 @@ import ( "encoding/json" "github.com/urfave/cli/v2" - "golang.org/x/oauth2/clientcredentials" - - sams "github.com/sourcegraph/sourcegraph-accounts-sdk-go" + "github.com/sourcegraph/sourcegraph-accounts-sdk-go/scopes" "github.com/sourcegraph/sourcegraph/dev/sg/internal/category" "github.com/sourcegraph/sourcegraph/dev/sg/internal/std" "github.com/sourcegraph/sourcegraph/lib/errors" + + "github.com/sourcegraph/sourcegraph/dev/sg/sams/samsflags" ) -var clientCredentialsFlags = []cli.Flag{ - &cli.StringFlag{ - Name: "sams-server", - Aliases: []string{"sams"}, - EnvVars: []string{"SG_SAMS_SERVER_URL"}, - Value: "https://accounts.sgdev.org", - Usage: "URL of the Sourcegraph Accounts Management System (SAMS) server", - }, - &cli.StringFlag{ - Name: "client-id", - EnvVars: []string{"SG_SAMS_CLIENT_ID"}, - Usage: "Client ID of the Sourcegraph Accounts Management System (SAMS) client", - Required: true, - }, - &cli.StringFlag{ - Name: "client-secret", - EnvVars: []string{"SG_SAMS_CLIENT_SECRET"}, - Usage: "Client secret for the Sourcegraph Accounts Management System (SAMS) client", - Required: true, - }, +var clientCredentialsFlags = append(samsflags.ClientCredentials(), &cli.StringSliceFlag{ Name: "scopes", Aliases: []string{"s"}, Value: cli.NewStringSlice("openid", "profile", "email"), Usage: "OAuth scopes ('$SERVICE::$PERM::$ACTION') to request from the Sourcegraph Accounts Management System (SAMS) server", }, -} - -// newClientCredentialsFromFlags returns a new client credentials config from -// clientCredentialsFlags. -func newClientCredentialsFromFlags(c *cli.Context) *clientcredentials.Config { - return &clientcredentials.Config{ - ClientID: c.String("client-id"), - ClientSecret: c.String("client-secret"), - TokenURL: c.String("sams-server") + "/oauth/token", - Scopes: c.StringSlice("scopes"), - } -} +) // Command is the 'sg sams' toolchain for the Sourcegraph Accounts Management System (SAMS). var Command = &cli.Command{ @@ -67,22 +37,16 @@ Please reach out to #discuss-core-services for assistance if you have any questi Usage: "Generate a short-lived OAuth access token and introspect it from the Sourcegraph Accounts Management System (SAMS)", Flags: clientCredentialsFlags, Action: func(c *cli.Context) error { - tokenSource := newClientCredentialsFromFlags(c). - TokenSource(c.Context) + samsScopes := scopes.ToScopes(c.StringSlice("scopes")) - client, err := sams.NewClientV1( - sams.ClientV1Config{ - ConnConfig: sams.ConnConfig{ - ExternalURL: c.String("sams-server"), - }, - TokenSource: tokenSource, - }, - ) + client, err := samsflags.NewClientFromFlags(c, samsScopes) if err != nil { return errors.Wrap(err, "create client") } - token, err := tokenSource.Token() + token, err := samsflags.NewClientCredentialsFromFlags(c, samsScopes). + TokenSource(c.Context). + Token() if err != nil { return errors.Wrap(err, "generate token") } @@ -103,7 +67,8 @@ Please reach out to #discuss-core-services for assistance if you have any questi Usage: "Generate a short-lived OAuth access token for use as a bearer token to SAMS clients", Flags: clientCredentialsFlags, Action: func(c *cli.Context) error { - tokenSource := newClientCredentialsFromFlags(c). + samsScopes := scopes.ToScopes(c.StringSlice("scopes")) + tokenSource := samsflags.NewClientCredentialsFromFlags(c, samsScopes). TokenSource(c.Context) token, err := tokenSource.Token() if err != nil { diff --git a/go.mod b/go.mod index fc4fe9140b6..1fdfc488e4e 100644 --- a/go.mod +++ b/go.mod @@ -59,13 +59,13 @@ replace ( ) require ( - cloud.google.com/go/bigquery v1.59.1 - cloud.google.com/go/kms v1.15.7 - cloud.google.com/go/monitoring v1.18.0 + cloud.google.com/go/bigquery v1.60.0 + cloud.google.com/go/kms v1.15.8 + cloud.google.com/go/monitoring v1.18.1 cloud.google.com/go/profiler v0.4.0 - cloud.google.com/go/pubsub v1.37.0 - cloud.google.com/go/secretmanager v1.11.5 - cloud.google.com/go/storage v1.38.0 + cloud.google.com/go/pubsub v1.38.0 + cloud.google.com/go/secretmanager v1.12.0 + cloud.google.com/go/storage v1.40.0 github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.45.0 github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.21.0 github.com/Khan/genqlient v0.5.0 @@ -231,8 +231,8 @@ require ( golang.org/x/time v0.5.0 golang.org/x/tools v0.22.0 gonum.org/v1/gonum v0.15.0 - google.golang.org/api v0.169.0 - google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect + google.golang.org/api v0.182.0 + google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect google.golang.org/protobuf v1.34.2 gopkg.in/natefinch/lumberjack.v2 v2.2.1 gopkg.in/yaml.v2 v2.4.0 @@ -251,7 +251,7 @@ require ( chainguard.dev/apko v0.14.0 cloud.google.com/go/artifactregistry v1.14.8 cloud.google.com/go/auth v0.5.1 - connectrpc.com/connect v1.16.1 + connectrpc.com/connect v1.16.2 connectrpc.com/grpcreflect v1.2.0 connectrpc.com/otelconnect v0.7.0 github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai v0.5.0 @@ -308,7 +308,7 @@ require ( github.com/sourcegraph/managed-services-platform-cdktf/gen/tfe v0.0.0-20240513203650-e2b1273f1c1a github.com/sourcegraph/notionreposync v0.0.0-20240517090426-98b2d4b017d7 github.com/sourcegraph/scip v0.4.0 - github.com/sourcegraph/sourcegraph-accounts-sdk-go v0.0.0-20240531163352-fe74c17cf0d1 + github.com/sourcegraph/sourcegraph-accounts-sdk-go v0.0.0-20240620234947-0d3d4d90b75e github.com/sourcegraph/sourcegraph/lib v0.0.0-20240524140455-2589fef13ea8 github.com/sourcegraph/sourcegraph/lib/managedservicesplatform v0.0.0-00010101000000-000000000000 github.com/sourcegraph/sourcegraph/monitoring v0.0.0-00010101000000-000000000000 @@ -329,10 +329,11 @@ require ( ) require ( + cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect cloud.google.com/go/cloudsqlconn v1.5.1 // indirect cloud.google.com/go/compute/metadata v0.3.0 // indirect - cloud.google.com/go/longrunning v0.5.5 // indirect - cloud.google.com/go/trace v1.10.5 // indirect + cloud.google.com/go/longrunning v0.5.6 // indirect + cloud.google.com/go/trace v1.10.6 // indirect dario.cat/mergo v1.0.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect @@ -480,8 +481,8 @@ require ( require ( bitbucket.org/creachadair/shell v0.0.7 // indirect - cloud.google.com/go v0.112.1 // indirect - cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go v0.114.0 // indirect + cloud.google.com/go/iam v1.1.7 // indirect cuelang.org/go v0.4.3 github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Masterminds/goutils v1.1.1 // indirect @@ -566,7 +567,7 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08 // indirect - github.com/googleapis/gax-go/v2 v2.12.2 + github.com/googleapis/gax-go/v2 v2.12.4 github.com/gopherjs/gopherjs v1.17.2 // indirect github.com/gopherjs/gopherwasm v1.1.0 // indirect github.com/gorilla/css v1.0.0 // indirect diff --git a/go.sum b/go.sum index 90c1e2aeacf..4eecf3db8fc 100644 --- a/go.sum +++ b/go.sum @@ -25,60 +25,62 @@ cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmW cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= -cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= +cloud.google.com/go v0.114.0 h1:OIPFAdfrFDFO2ve2U7r/H5SwSbBzEdrBdE7xkgwc+kY= +cloud.google.com/go v0.114.0/go.mod h1:ZV9La5YYxctro1HTPug5lXH/GefROyW8PPD4T8n9J8E= cloud.google.com/go/artifactregistry v1.14.8 h1:icIyRzJ1Ag6EOafuDuFFJ/AdStcOFRVfSGURn27/7Pk= cloud.google.com/go/artifactregistry v1.14.8/go.mod h1:1UlSXh6sTXYrIT4kMO21AE1IDlMFemlZuX6QS+JXW7I= cloud.google.com/go/auth v0.5.1 h1:0QNO7VThG54LUzKiQxv8C6x1YX7lUrzlAa1nVLF8CIw= cloud.google.com/go/auth v0.5.1/go.mod h1:vbZT8GjzDf3AVqCcQmqeeM32U9HBFc32vVVAbwDsa6s= +cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= +cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigquery v1.59.1 h1:CpT+/njKuKT3CEmswm6IbhNu9u35zt5dO4yPDLW+nG4= -cloud.google.com/go/bigquery v1.59.1/go.mod h1:VP1UJYgevyTwsV7desjzNzDND5p6hZB+Z8gZJN1GQUc= +cloud.google.com/go/bigquery v1.60.0 h1:kA96WfgvCbkqfLnr7xI5uEfJ4h4FrnkdEb0yty0KSZo= +cloud.google.com/go/bigquery v1.60.0/go.mod h1:Clwk2OeC0ZU5G5LDg7mo+h8U7KlAa5v06z5rptKdM3g= cloud.google.com/go/cloudsqlconn v1.5.1 h1:rMtPv66pkuk2K1ciCicjZY8Ma1DSyOYSoqwPUw/Timo= cloud.google.com/go/cloudsqlconn v1.5.1/go.mod h1:DPWjhwD5Fhv43M0RP/+7J37xo4PByfNWCzMlKa9OBwE= cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/datacatalog v1.19.3 h1:A0vKYCQdxQuV4Pi0LL9p39Vwvg4jH5yYveMv50gU5Tw= -cloud.google.com/go/datacatalog v1.19.3/go.mod h1:ra8V3UAsciBpJKQ+z9Whkxzxv7jmQg1hfODr3N3YPJ4= +cloud.google.com/go/datacatalog v1.20.0 h1:BGDsEjqpAo0Ka+b9yDLXnE5k+jU3lXGMh//NsEeDMIg= +cloud.google.com/go/datacatalog v1.20.0/go.mod h1:fSHaKjIroFpmRrYlwz9XBB2gJBpXufpnxyAKaT4w6L0= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= -cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= -cloud.google.com/go/kms v1.15.7 h1:7caV9K3yIxvlQPAcaFffhlT7d1qpxjB1wHBtjWa13SM= -cloud.google.com/go/kms v1.15.7/go.mod h1:ub54lbsa6tDkUwnu4W7Yt1aAIFLnspgh0kPGToDukeI= +cloud.google.com/go/iam v1.1.7 h1:z4VHOhwKLF/+UYXAJDFwGtNF0b6gjsW1Pk9Ml0U/IoM= +cloud.google.com/go/iam v1.1.7/go.mod h1:J4PMPg8TtyurAUvSmPj8FF3EDgY1SPRZxcUGrn7WXGA= +cloud.google.com/go/kms v1.15.8 h1:szIeDCowID8th2i8XE4uRev5PMxQFqW+JjwYxL9h6xs= +cloud.google.com/go/kms v1.15.8/go.mod h1:WoUHcDjD9pluCg7pNds131awnH429QGvRM3N/4MyoVs= cloud.google.com/go/logging v1.9.0 h1:iEIOXFO9EmSiTjDmfpbRjOxECO7R8C7b8IXUGOj7xZw= cloud.google.com/go/logging v1.9.0/go.mod h1:1Io0vnZv4onoUnsVUQY3HZ3Igb1nBchky0A0y7BBBhE= -cloud.google.com/go/longrunning v0.5.5 h1:GOE6pZFdSrTb4KAiKnXsJBtlE6mEyaW44oKyMILWnOg= -cloud.google.com/go/longrunning v0.5.5/go.mod h1:WV2LAxD8/rg5Z1cNW6FJ/ZpX4E4VnDnoTk0yawPBB7s= -cloud.google.com/go/monitoring v1.18.0 h1:NfkDLQDG2UR3WYZVQE8kwSbUIEyIqJUPl+aOQdFH1T4= -cloud.google.com/go/monitoring v1.18.0/go.mod h1:c92vVBCeq/OB4Ioyo+NbN2U7tlg5ZH41PZcdvfc+Lcg= +cloud.google.com/go/longrunning v0.5.6 h1:xAe8+0YaWoCKr9t1+aWe+OeQgN/iJK1fEgZSXmjuEaE= +cloud.google.com/go/longrunning v0.5.6/go.mod h1:vUaDrWYOMKRuhiv6JBnn49YxCPz2Ayn9GqyjaBT8/mA= +cloud.google.com/go/monitoring v1.18.1 h1:0yvFXK+xQd95VKo6thndjwnJMno7c7Xw1CwMByg0B+8= +cloud.google.com/go/monitoring v1.18.1/go.mod h1:52hTzJ5XOUMRm7jYi7928aEdVxBEmGwA0EjNJXIBvt8= cloud.google.com/go/profiler v0.4.0 h1:ZeRDZbsOBDyRG0OiK0Op1/XWZ3xeLwJc9zjkzczUxyY= cloud.google.com/go/profiler v0.4.0/go.mod h1:RvPlm4dilIr3oJtAOeFQU9Lrt5RoySHSDj4pTd6TWeU= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.37.0 h1:0uEEfaB1VIJzabPpwpZf44zWAKAme3zwKKxHk7vJQxQ= -cloud.google.com/go/pubsub v1.37.0/go.mod h1:YQOQr1uiUM092EXwKs56OPT650nwnawc+8/IjoUeGzQ= -cloud.google.com/go/secretmanager v1.11.5 h1:82fpF5vBBvu9XW4qj0FU2C6qVMtj1RM/XHwKXUEAfYY= -cloud.google.com/go/secretmanager v1.11.5/go.mod h1:eAGv+DaCHkeVyQi0BeXgAHOU0RdrMeZIASKc+S7VqH4= +cloud.google.com/go/pubsub v1.38.0 h1:J1OT7h51ifATIedjqk/uBNPh+1hkvUaH4VKbz4UuAsc= +cloud.google.com/go/pubsub v1.38.0/go.mod h1:IPMJSWSus/cu57UyR01Jqa/bNOQA+XnPF6Z4dKW4fAA= +cloud.google.com/go/secretmanager v1.12.0 h1:e5pIo/QEgiFiHPVJPxM5jbtUr4O/u5h2zLHYtkFQr24= +cloud.google.com/go/secretmanager v1.12.0/go.mod h1:Y1Gne3Ag+fZ2TDTiJc8ZJCMFbi7k1rYT4Rw30GXfvlk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= -cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= -cloud.google.com/go/trace v1.10.5 h1:0pr4lIKJ5XZFYD9GtxXEWr0KkVeigc3wlGpZco0X1oA= -cloud.google.com/go/trace v1.10.5/go.mod h1:9hjCV1nGBCtXbAE4YK7OqJ8pmPYSxPA0I67JwRd5s3M= -connectrpc.com/connect v1.16.1 h1:rOdrK/RTI/7TVnn3JsVxt3n028MlTRwmK5Q4heSpjis= -connectrpc.com/connect v1.16.1/go.mod h1:XpZAduBQUySsb4/KO5JffORVkDI4B6/EYPi7N8xpNZw= +cloud.google.com/go/storage v1.40.0 h1:VEpDQV5CJxFmJ6ueWNsKxcr1QAYOXEgxDa+sBbJahPw= +cloud.google.com/go/storage v1.40.0/go.mod h1:Rrj7/hKlG87BLqDJYtwR0fbPld8uJPbQ2ucUMY7Ir0g= +cloud.google.com/go/trace v1.10.6 h1:XF0Ejdw0NpRfAvuZUeQe3ClAG4R/9w5JYICo7l2weaw= +cloud.google.com/go/trace v1.10.6/go.mod h1:EABXagUjxGuKcZMy4pXyz0fJpE5Ghog3jzTxcEsVJS4= +connectrpc.com/connect v1.16.2 h1:ybd6y+ls7GOlb7Bh5C8+ghA6SvCBajHwxssO2CGFjqE= +connectrpc.com/connect v1.16.2/go.mod h1:n2kgwskMHXC+lVqb18wngEpF95ldBHXjZYJussz5FRc= connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U= connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY= connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY= @@ -841,8 +843,8 @@ github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPg github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= +github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -870,8 +872,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksP github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= -github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= +github.com/googleapis/gax-go/v2 v2.12.4 h1:9gWcmF85Wvq4ryPFvGFaOgPIs1AQX0d0bcbGw4Z96qg= +github.com/googleapis/gax-go/v2 v2.12.4/go.mod h1:KYEYLorsnIGDi/rPC8b5TdlB9kbKoFubselGIoBMCwI= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -1672,8 +1674,8 @@ github.com/sourcegraph/run v0.12.0 h1:3A8w5e8HIYPfafHekvmdmmh42RHKGVhmiTZAPJclg7 github.com/sourcegraph/run v0.12.0/go.mod h1:PwaP936BTnAJC1cqR5rSbG5kOs/EWStTK3lqvMX5GUA= github.com/sourcegraph/scip v0.4.0 h1:Tqf5ThVlPu8fV+WeTkJEbW34fPOfDUpbxQWU4iLvaQI= github.com/sourcegraph/scip v0.4.0/go.mod h1:bmBqGJCl3nJw55jt8WXXqx4+TXR5WPO80qw7KoCvXZU= -github.com/sourcegraph/sourcegraph-accounts-sdk-go v0.0.0-20240531163352-fe74c17cf0d1 h1:+7J5NMA9FJDaf0IhNpIcTEg+Gzu/GN5dRT40wdFU10I= -github.com/sourcegraph/sourcegraph-accounts-sdk-go v0.0.0-20240531163352-fe74c17cf0d1/go.mod h1:/MWl0sFvn6w26Y067CkEJgklfxx8gCzbEJ3q6cBzDro= +github.com/sourcegraph/sourcegraph-accounts-sdk-go v0.0.0-20240620234947-0d3d4d90b75e h1:m6ljyXK3Dp/5iWgfqtkKsTD8Ksyjwl0BSZgEpdgoG48= +github.com/sourcegraph/sourcegraph-accounts-sdk-go v0.0.0-20240620234947-0d3d4d90b75e/go.mod h1:0bD4781hPFlS2tTcoUERY8aSu/UTA6YQV7Iv2TJvtm8= github.com/sourcegraph/yaml v1.0.1-0.20200714132230-56936252f152 h1:z/MpntplPaW6QW95pzcAR/72Z5TWDyDnSo0EOcyij9o= github.com/sourcegraph/yaml v1.0.1-0.20200714132230-56936252f152/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I= github.com/sourcegraph/zoekt v0.0.0-20240620084526-5ac92b1a7d4a h1:9g+6UUpAfhShhYCSPvU8YUTOexLPk45TV/dNEU6qZLw= @@ -1848,8 +1850,8 @@ github.com/zenazn/goji v1.0.1 h1:4lbD8Mx2h7IvloP7r2C0D6ltZP6Ufip8Hn0wmSK5LR8= github.com/zenazn/goji v1.0.1/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.bobheadxi.dev/streamline v1.3.2 h1:EwbDggkws9Qo/fl4Zo801Z8mgf4xZBOX7/bbfTthsy4= go.bobheadxi.dev/streamline v1.3.2/go.mod h1:QSS0MlQm+3ABEr0uMYrkAGYiILwJvTIGFygVARxDFdg= -go.einride.tech/aip v0.66.0 h1:XfV+NQX6L7EOYK11yoHHFtndeaWh3KbD9/cN/6iWEt8= -go.einride.tech/aip v0.66.0/go.mod h1:qAhMsfT7plxBX+Oy7Huol6YUvZ0ZzdUz26yZsQwfl1M= +go.einride.tech/aip v0.67.1 h1:d/4TW92OxXBngkSOwWS2CH5rez869KpKMaN44mdxkFI= +go.einride.tech/aip v0.67.1/go.mod h1:ZGX4/zKw8dcgzdLsrvpOOGxfxI2QSk12SlP7d6c0/XI= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= @@ -2409,8 +2411,8 @@ google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjR google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/api v0.169.0 h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY= -google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= +google.golang.org/api v0.182.0 h1:if5fPvudRQ78GeRx3RayIoiuV7modtErPIZC/T2bIvE= +google.golang.org/api v0.182.0/go.mod h1:cGhjy4caqA5yXRzEhkHI8Y9mfyC2VLTlER2l08xaqtM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2464,8 +2466,8 @@ google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda h1:wu/KJm9KJwpfHWhkkZGohVC6KRrc1oJNr4jwtQMOQXw= +google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda/go.mod h1:g2LLCvCeCSir/JJSWosk19BR4NVxGqHUC6rxIRsd7Aw= google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= diff --git a/lib/pointers/ptr.go b/lib/pointers/ptr.go index d104434b515..ce4f9c32001 100644 --- a/lib/pointers/ptr.go +++ b/lib/pointers/ptr.go @@ -63,3 +63,13 @@ func Slice[S []V, V any](s S) []*V { } return slice } + +// NilIfZero returns nil if the provided value is zero, otherwise returns pointer +// to the value. +func NilIfZero[T comparable](val T) *T { + var zero T + if val == zero { + return nil + } + return &val +}