This repository was archived by the owner on Sep 30, 2024. It is now read-only.
feat/enterpriseportal: use database for reading Cody Gateway access#63925
Merged
bobheadxi merged 7 commits intoAug 8, 2024
Conversation
This was referenced Jul 18, 2024
Member
Author
f580d6f to
c5fa0e9
Compare
19581d3 to
d7e4757
Compare
c5fa0e9 to
0ef23af
Compare
d7e4757 to
6529733
Compare
0ef23af to
ba7fdc4
Compare
3ce5453 to
0b64444
Compare
0b64444 to
5a5d757
Compare
ba7fdc4 to
c27c900
Compare
ab95895 to
f9f0fa8
Compare
c27c900 to
4a93310
Compare
f9f0fa8 to
ad3dc7b
Compare
3 tasks
4a93310 to
5916b1f
Compare
ad3dc7b to
b125b3e
Compare
5916b1f to
4475d86
Compare
03e16dd to
484eb77
Compare
c13d484 to
42619a4
Compare
d4645f9 to
696e51e
Compare
783afdd to
2a6279d
Compare
696e51e to
e7c7186
Compare
2a6279d to
8586fee
Compare
76d65be to
6403831
Compare
2 tasks
47163fe to
f27525f
Compare
Base automatically changed from
07-16-feat_enterpriseportal_import_data_from_dotcom
to
main
August 7, 2024 18:44
3bf020e to
c8dd5d0
Compare
c8dd5d0 to
6211943
Compare
bobheadxi
referenced
this pull request
Aug 8, 2024
…tal (#64090) Upgrades the self-contained Cody Gateway modal to only depend on Enterprise Portal to read/write Cody Gateway access. I also made some minor tweaks to parsing empty form inputs, and also made the "Cody Gateway access token" collapsed by default, with warnings to discourage its use (opted not to remove entirely since it may be useful for dev/debugging) Depends on: - https://github.com/sourcegraph/sourcegraph/pull/63926 - https://github.com/sourcegraph/sourcegraph/pull/63925 - https://github.com/sourcegraph/sourcegraph/pull/63858 Closes https://linear.app/sourcegraph/issue/CORE-218 ## Test plan ``` sg start dotcom ``` Edit the Cody Gateway access stuff, toggling it up and down. Cross-reference with the `enterprise_portal_cody_gateway_access` table.
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.

This change follows https://github.com/sourcegraph/sourcegraph/pull/63858 by making the Cody Access APIs read from the Enterprise Portal database, instead of dotcomdb, using the data that we sync from dotcomdb into Enterprise Portal.
As part of this, I also expanded the existing "compatibility" test suite that compares the result of our dotcomdb queries against the existing GraphQL resolvers in dotcom to also compare the results of our new Cody Access APIs, to validate that they return the same access.
Warning
There is one behavioural change, which is that hashes of expired licenses will no longer be valid as access tokens. This shouldn't be an issue if customers use zero-config (implied access token from their license key) - I will do some outreach before rolling this out.
Subsequent PRs will implement write APIs.
Part of https://linear.app/sourcegraph/issue/CORE-218
Part of https://linear.app/sourcegraph/issue/CORE-160
Test plan
Integration and unit tests at various layers