This repository was archived by the owner on Sep 30, 2024. It is now read-only.
feat/enterpriseportal: implement GetCodyGatewayUsage RPC#63555
Merged
feat/enterpriseportal: implement GetCodyGatewayUsage RPC#63555
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @bobheadxi and the rest of your teammates on |
eseliger
approved these changes
Jul 1, 2024
Member
There was a problem hiding this comment.
Q: Should this be a panic case? 🤔
Member
Author
There was a problem hiding this comment.
I'd prefer it not to be, as if anything goes terribly borked I'd like to retain the option to just disable it
Member
There was a problem hiding this comment.
could we have a constant for "codyaccess" too? That way I could hover over it and see a docstring to understand what this does :D
Member
Author
There was a problem hiding this comment.
Good call, I opened a PR upstream: sourcegraph/sourcegraph-accounts-sdk-go#49
I'll circle back and update the existing callsites in a follow-up :)
3dfb7af to
9ef8c09
Compare
367babb to
2b96db1
Compare
Co-authored-by: Erik Seliger <erikseliger@me.com>
2b96db1 to
9a9cf36
Compare
Member
Author
Merge activity
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Uses the refactors from #63528 and the new RPC proposed in #63531 to implement the existing GraphQL query for getting Cody Gateway usage stats using Enterprise Portal. Also adds some basic instrumentation on
codygatewayevents.Service.Closes https://linear.app/sourcegraph/issue/CORE-201
Requires https://github.com/sourcegraph/managed-services/pull/1685
Test plan
Without setting any new vars:
$ sg run enterprise-portal # ... [enterprise-...l] WARN service.codygatewayevents service/codygatewayevents.go:11 CodyGatewayEvents service is not configuredAdd to
sg.config.overwrite.yaml:The client auths by default credentials, so if you have access to the dataset everything will "just work". Request S2 data by subscription ID at
:6081/debug/grpcui/: