Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from sourcegraph:main #1

Open
wants to merge 10,000 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
60c7e9b
gomod: update Zoekt (#64238)
stefanhengl Aug 2, 2024
ad4d717
Reapply "soap: Fix auto-redirect to IdP when SOAP is enabled" (#64234…
eseliger Aug 2, 2024
f7d62a3
gitserver: RawDiff checks if commits exist (#64245)
keegancsmith Aug 2, 2024
4a565a8
fix(batches): show warning instead of error when the changeset status…
bahrmichael Aug 2, 2024
7fc92a5
codeintel: make usage-range non-optional (#64236)
kritzcreek Aug 2, 2024
1a834fd
fix: block URLs without a hostname (#64248)
evict Aug 2, 2024
e652c7e
Styling updates throughout (#64221)
taiyab Aug 2, 2024
8f89c27
security: Auto-update package lockfiles for Sourcegraph base images (…
sourcegraph-buildkite Aug 2, 2024
b4566aa
Svelte: fix welcome banner flashing on reload (#64251)
camdencheek Aug 2, 2024
a148d8a
Web: fix git blame for files that have `/stream/` in their path (#64230)
camdencheek Aug 2, 2024
c643c22
Chore: remove non-null assertions (#64249)
camdencheek Aug 2, 2024
4caad25
Cody Web: Update Cody Web to 0.3.6 [React version] (#64254)
vovakulikov Aug 2, 2024
b0702f3
[Svelte]: UI Updates for Perforce Depots and Git Repos (#64014)
jasonhawkharris Aug 3, 2024
ef77a1e
fix: Handle sub-repo permissions in CodeGraphData API (#64241)
varungandhi-src Aug 5, 2024
7595615
fix: Don't propagate un-translated source ranges (#64263)
varungandhi-src Aug 5, 2024
e332124
servicecatalog: remove searcher dep on database (#64247)
keegancsmith Aug 5, 2024
c8c8f32
fix: Handle potential nil reference properly (#64265)
varungandhi-src Aug 5, 2024
a0b2a1d
chore: Remove incorrectly logged warning (#64267)
varungandhi-src Aug 5, 2024
199cab4
gomod: update zoekt for shard scanning improvement (#64264)
keegancsmith Aug 5, 2024
d19aa10
feat(cody): add circuit breaker to handle timed-out requests and rate…
taras-yemets Aug 5, 2024
e5fdb5c
fix: Fixes incorrect highlighting for comments at the start of a file…
varungandhi-src Aug 5, 2024
f411669
Update p4-fusion-sg wolfi-package (#64266)
pjlast Aug 5, 2024
3fd5abc
frontend: Remove global conf server variable (#64155)
eseliger Aug 5, 2024
d8fb5ae
frontend: Consolidate remaining registry packages (#64156)
eseliger Aug 5, 2024
765a8cd
chore: Move cmd/frontend/webhooks to cmd/frontend/internal (#64157)
eseliger Aug 5, 2024
44d8512
Svelte: make closing the welcome overlay more obvious (#64256)
camdencheek Aug 5, 2024
4e5ea2a
refactor(svelte): Reduce logo complexity (#64274)
fkling Aug 5, 2024
e5178a6
Revert "[Svelte]: UI Updates for Perforce Depots and Git Repos" (#64275)
jasonhawkharris Aug 5, 2024
b9823cc
Svelte: remove site admin gate on code intel preview (#64277)
camdencheek Aug 5, 2024
44869b9
appliance(chore): Remove legacy maintenance API (#64282)
jdpleiness Aug 6, 2024
e0991a6
Improving Azure errors for customer containers (#64278)
arafatkatze Aug 6, 2024
a310035
Return 'sourcegraph' as the CodyLLMConfigurationResolver.Provider (#6…
chrsmith Aug 6, 2024
737e460
chore(search): update logging of search durations (#64269)
stefanhengl Aug 6, 2024
e48368d
Enable SCIP based APIs by default (#64285)
kritzcreek Aug 6, 2024
224e236
chore: Reduce frequency of COUNT(*) on lsif_indexes (#64288)
varungandhi-src Aug 6, 2024
38633da
chore: Consolidate mocks for uploads's Store type (#64286)
varungandhi-src Aug 6, 2024
1559752
fix(search_jobs): progress reporting (#64287)
stefanhengl Aug 6, 2024
c09552e
searcher: fix benchmarks (#64292)
keegancsmith Aug 6, 2024
4ebb805
fix: uses the same base64 for decoding we use for encoding the UsageC…
kritzcreek Aug 6, 2024
e4a8ce5
fix(svelte): Update top-level route list (#64272)
fkling Aug 6, 2024
8f05883
chore: Consolidate mocks for dbworker/store.Store type (#64294)
varungandhi-src Aug 6, 2024
f19af57
Search: re-add support for 'lucky' patterntype (#64293)
jtibshirani Aug 6, 2024
6b98c25
chore: Frontend does not need disk (#64273)
eseliger Aug 6, 2024
ff52b14
chore: Remove unnecessary _ imports (#64158)
eseliger Aug 6, 2024
958afb0
Search: boost matches on quoted terms (#64298)
jtibshirani Aug 6, 2024
0959fbd
fix(svelte): Make /cody/dashboard work with the new web app (#64295)
fkling Aug 6, 2024
1cac35b
Update wolfi hashes (#64289)
pjlast Aug 6, 2024
99f7d97
chore: Switch over to fake RepoStore in codenav tests (#64284)
varungandhi-src Aug 6, 2024
bf4eb26
fix: Add Exists method to dbworker Store to avoid COUNT(*) (#64297)
varungandhi-src Aug 6, 2024
ee93777
fix(search_jobs): fail validation for repo searches (#64300)
stefanhengl Aug 6, 2024
b0bb67b
Update the default Sourcegraph-supplied LLM models (#64281)
chrsmith Aug 6, 2024
c414477
fix(svelte): Center file tree loading indicator (#64309)
fkling Aug 6, 2024
582022d
Return model IDs from GraphQL, not model Names (#64307)
chrsmith Aug 6, 2024
b6a25c8
fix(own): Prevent infinite UI update loop in own pages (#64312)
fkling Aug 6, 2024
02fb199
chore(svelte): Add manual entries for repo sub pages to development p…
fkling Aug 6, 2024
4a5e1e4
feat(sg): report user os information via analytics (#64280)
BolajiOlajide Aug 6, 2024
2e642bc
fix(bazel): surface error message when gazelle cant process glob expr…
BolajiOlajide Aug 6, 2024
3680503
Update Cody Web to 0.3.7 (#64296)
thenamankumar Aug 7, 2024
f1d5d77
refactor: handles Cursor uniformly over all usage provenances (#64319)
kritzcreek Aug 7, 2024
6ee4446
Fix Cody Web Svelte Sidebar (#64320)
thenamankumar Aug 7, 2024
930033c
chore: Replace QueuedCount -> CountByState with bitset parameter (#64…
varungandhi-src Aug 7, 2024
780b5db
chore: Move and clean up test code for syntactic usages (#64318)
kritzcreek Aug 7, 2024
3efa77a
Center align Cody logo in Cody Web Sidebar (#64324)
thenamankumar Aug 7, 2024
81fa144
refactor: steps the usage cursor provenance state in a single place (…
kritzcreek Aug 7, 2024
4d6e894
fix(batches): don't request unnecessary info that's likely to cause G…
bahrmichael Aug 7, 2024
93818e0
fix: Try workaround for bad index choice when updating execution logs…
varungandhi-src Aug 7, 2024
ebaab12
feat(svelte): Add support for creating search jobs from search result…
fkling Aug 7, 2024
f7d4517
upgrade Cody Web, always create a new chat (#64334)
sqs Aug 7, 2024
2e0a3ee
fix(svelte): Better preloading in file tree (#64327)
fkling Aug 7, 2024
e4e1f55
fix(svelte): Properly redirect to cody marketing page (#64331)
fkling Aug 7, 2024
e1e7898
chore: Add docs for RepoStore methods (#64283)
varungandhi-src Aug 7, 2024
61b4181
fix(sg): provide suggestions we fail to get local gcp account email a…
burmudar Aug 7, 2024
3ff0f07
Svelte: more welcome banner behavior updates (#64311)
camdencheek Aug 7, 2024
9f0e1e0
chore(local): improve runnable cmds preambles in sg start (#64339)
jhchabran Aug 7, 2024
993e732
Svelte: enable toggle by default (#64340)
camdencheek Aug 7, 2024
4591d98
chore(local): clear ambiguity in between sg version|live (#64122)
jhchabran Aug 7, 2024
0fd6235
chore(rel): prepare stitch graph for 5.6 (#64343)
jhchabran Aug 7, 2024
5c9b715
refactor(svelte): Optimize welcome overlay screenshot assets (#64344)
fkling Aug 7, 2024
eedc12e
feat/enterpriseportal: import data from dotcom (#63858)
bobheadxi Aug 7, 2024
72f88ad
fix/enterpriseportal/importer: make generated display name more uniqu…
bobheadxi Aug 7, 2024
24ab529
fix/enterpriseportal/importer: import all subscriptions (#64348)
bobheadxi Aug 7, 2024
bcc816a
feat(svelte): Support 'got to defintion' for multiple definitions and…
fkling Aug 7, 2024
be015c5
refactor: upgrade to rules_oci 2.0 (2nd attempt) (#63829)
gregmagolan Aug 7, 2024
3b16059
Changing azureUseDeprecatedCompletionsAPIForOldModels to default to t…
arafatkatze Aug 7, 2024
addba96
Revert "refactor: upgrade to rules_oci 2.0 (2nd attempt)" (#64351)
Strum355 Aug 7, 2024
05e96ba
fix/enterpriseportal/importer: disable query tracing when importing (…
bobheadxi Aug 7, 2024
889ed1d
oidc: Don't require to run refresh on provider init (#64159)
eseliger Aug 8, 2024
8de09dd
chore: Cleanup more cross-cmd imports (#64259)
eseliger Aug 8, 2024
384959a
fix(build): forward runfiles in custom oci_image_cross rule (#64353)
gregmagolan Aug 8, 2024
db550f9
auth: Remove redirects to session package (#64260)
eseliger Aug 8, 2024
b9c4e2a
Revert "Revert "refactor: upgrade to rules_oci 2.0 (2nd attempt)"" (#…
Strum355 Aug 8, 2024
5a39f81
chore: Move cmd/frontend/backend to internal (#64261)
eseliger Aug 8, 2024
a3f23a5
searcher: Consolidate FetchTar and FetchTarPaths (#64268)
eseliger Aug 8, 2024
cf54671
fix(svelte): Improve hovercard UI for search based info (#64350)
fkling Aug 8, 2024
1c72982
refactor(svelte): Improve integration with `sg` (#64333)
fkling Aug 8, 2024
f61ce6e
tenant: Introduce first version of tenant package (#64271)
eseliger Aug 8, 2024
1819daa
tenant: Introduce tenant table to frontend database (#64322)
eseliger Aug 8, 2024
975b14f
fix(svelte): Don't animate menu icon (#64358)
fkling Aug 8, 2024
2c73f72
chore(local): rename experiment single-program commandset (#64341)
jhchabran Aug 8, 2024
55cdb49
graphqlbackend: Move utils to internal/ (#64117)
eseliger Aug 8, 2024
c071a71
chore(backend): enable diskcache for multi-tenant (#64335)
stefanhengl Aug 8, 2024
221b7f0
tenant: Ensure tenant table also exists in codeintel and codeinsights…
eseliger Aug 8, 2024
cacc01b
ci: provide a more descriptive error when pipegen fails (#64362)
burmudar Aug 8, 2024
97ef93d
fix(svelte): Always close navigation sidebar when navigating to a dif…
fkling Aug 8, 2024
e0702be
build(svelte): Build Svelte app with enterprise runset (#64355)
fkling Aug 8, 2024
ea55d76
database: optional pprof for tenantless_queries (#64337)
keegancsmith Aug 8, 2024
34a7914
tenant: update FromContext to return error (#64363)
stefanhengl Aug 8, 2024
05ca108
feat/enterpriseportal: use database for reading Cody Gateway access (…
bobheadxi Aug 8, 2024
2dd38b3
Fix Cody Web CSS (#64370)
thenamankumar Aug 8, 2024
b625bea
Doc and README update: Replace all usages of GH discussions with the …
peterguy Aug 8, 2024
076498f
feat/enterpriseportal: implement UpdateCodyGatewayAccess (#63926)
bobheadxi Aug 8, 2024
4475706
fix/enterpriseportal/codyaccess: allow removing rate limit overrides …
bobheadxi Aug 8, 2024
7c2d978
feat/dotcom: UI tracks Cody Gateway access directly in Enterprise Por…
bobheadxi Aug 8, 2024
119f175
build(bazel): upgrade to latest aspect bazel-lib and rules_js rules (…
gregmagolan Aug 8, 2024
d0b8853
Remove old Cody Web completely (#64345)
thenamankumar Aug 9, 2024
786a475
Search: avoid phrase boost for non-text searches (#64369)
jtibshirani Aug 9, 2024
7402cd7
Search: update Zoekt for telemetry improvement (#64380)
jtibshirani Aug 9, 2024
f175436
tenant: update test to enforce tenant (#64379)
stefanhengl Aug 9, 2024
7ad393b
db: Don't lose context when marking savepoints as done (#64361)
eseliger Aug 9, 2024
43e06ce
tenant: Introduce tenant_id to every table (#64323)
eseliger Aug 9, 2024
ba85ea6
feat/API: add publicly available `/api/v1/chat/completions` REST endp…
olafurpg Aug 9, 2024
883604b
chore(local): fix outdated frontend target being used (#64382)
jhchabran Aug 9, 2024
db87eb6
Use correct DSN for schema validation in syntactic worker (#64383)
antonsviridov-src Aug 9, 2024
0960775
Redis: always use pointer receiver in keyvalue (#64385)
jtibshirani Aug 9, 2024
c60ae9c
build(bazel): upgrade to rules_oci 2.0.0-beta2 (#64364)
gregmagolan Aug 9, 2024
c4fefc1
chore(local): dont buffer sg updatecheck commencement notice (#64329)
Strum355 Aug 9, 2024
c4ea4b6
chore(web): Upgrade playwright (#64384)
fkling Aug 9, 2024
ba9fe24
Revert "tenant: Introduce tenant_id to every table (#64323)" (#64386)
eseliger Aug 9, 2024
2df3a40
chore(ci): bump the tag on which backcompat operates (#64387)
jhchabran Aug 9, 2024
43184a3
feat/enterpriseportal: license expiry checker (#64317)
bobheadxi Aug 9, 2024
3e9fe3a
chore/enterpriseportal: make sf_opp_id license-level (#64087)
bobheadxi Aug 9, 2024
8537000
feat/enterpriseportal: existing subscriptions read APIs use enterpris…
bobheadxi Aug 9, 2024
14a4d7c
fix(cody): filter out deprecated models (#64381)
taras-yemets Aug 9, 2024
0de249d
feat/enterpriseportal: more list options for subscriptions and licens…
bobheadxi Aug 9, 2024
3df76cb
Explore panel: more granular file tree (#64372)
camdencheek Aug 9, 2024
f1060ec
Svelte: add support for navigating search results with the keyboard (…
camdencheek Aug 9, 2024
8296e98
feat(svelte): Migrate dotcom community search pages to Svelte (#64388)
fkling Aug 9, 2024
e2c646a
feat/enterpriseportal: all subscriptions APIs use enterprise portal D…
bobheadxi Aug 10, 2024
0825358
feat/enterpriseportal: add instance category (#64253)
bobheadxi Aug 10, 2024
02ac021
chore/enterpriseportal: manual E2E test suite (#64057)
bobheadxi Aug 10, 2024
fae95fd
Search: boost phrases in hybrid search (#64367)
jtibshirani Aug 12, 2024
e65e736
Redis: simplify DeleteAllKeysWithPrefix (#64407)
jtibshirani Aug 12, 2024
f517373
tenant: pprof for missing tenant in FromContext (#64405)
keegancsmith Aug 12, 2024
4d21a3e
chore(ci): shard //internal/repos:repos_test (#64412)
jhchabran Aug 12, 2024
991355b
chore(ci): shard authz test (#64413)
jhchabran Aug 12, 2024
72e1838
fix(appliance): bypass `setupenv-test` for local testing if not insta…
jdpleiness Aug 12, 2024
59ad280
feat(appliance): nodeexporter service definition (#64399)
jdpleiness Aug 12, 2024
1e3b643
Search blitz: updates for 3rd-party users (#64375)
camdencheek Aug 12, 2024
5bc97d9
migration: fix stitch test cases (#64409)
keegancsmith Aug 12, 2024
3edfaa8
migration: make stitch tests run in 7s (#64417)
keegancsmith Aug 12, 2024
cec288d
fix/enterpriseportal, fix/codygateway: zero-value durations and missi…
bobheadxi Aug 12, 2024
520444e
linters: update go-critic to latest (#64419)
keegancsmith Aug 12, 2024
6a28eb8
tenant: set pprof label for tenant (#64338)
keegancsmith Aug 12, 2024
74f4831
chore: Replace gitserver.Client -> minimalGitserver in codenav (#64416)
varungandhi-src Aug 12, 2024
a9b536c
Chore: fix default value for clientSearchResultRanking (#64420)
camdencheek Aug 12, 2024
b5d7a4f
fix(release): add `minor` step to internal release create command (#6…
jdpleiness Aug 12, 2024
20f22d2
sg/cloud: fix eph cmd typo (#64427)
michaellzc Aug 13, 2024
cbd1260
database: run tenant_id migration outside of a transaction (#64410)
keegancsmith Aug 13, 2024
2bbd84f
Redis: refactor key prefixing (#64411)
jtibshirani Aug 13, 2024
70aa690
fix/API: make requests to `/api/console` work again (#64429)
olafurpg Aug 13, 2024
a80ad93
fix: return all search-based results if no syntactic provenance is re…
kritzcreek Aug 13, 2024
6914068
migrationtests: Actually run in a transaction when in test mode (#64434)
eseliger Aug 13, 2024
47b6639
feat/API: move from `/api/v1` to `/.api/llm` (#64435)
olafurpg Aug 13, 2024
67f30a9
chore(ci): rework build-tracker to use redis instead of in-memory sto…
Strum355 Aug 13, 2024
4d57eb1
fix(sg): make `sg gen` output more readable (#64406)
BolajiOlajide Aug 13, 2024
d4fa539
Revert "chore(ci): rework build-tracker to use redis instead of in-me…
Strum355 Aug 13, 2024
7b1bc10
chore/API: speed up edit/test feedback loop for llmapi module (#64437)
olafurpg Aug 13, 2024
e93b69b
migrations: use COMMIT AND CHAIN for tenant_id (#64431)
keegancsmith Aug 13, 2024
9667975
fix(svelte): Show focus style when tabbing through search query examp…
fkling Aug 13, 2024
df91f98
fix(svelte): Show tools section in top navigation sidebar mode (#64438)
fkling Aug 13, 2024
3e73454
fix(svelte): Fix tooltip in hovercards (#64443)
fkling Aug 13, 2024
9890086
fix(web): Show 'Find implementation' button for languages that suppor…
fkling Aug 13, 2024
3cb7ab8
Support SAST Scanning with both GHAS and Custom post processing scrip…
shivasurya Aug 13, 2024
9d2220e
migration: specify column for soft delete triggers (#64446)
keegancsmith Aug 13, 2024
26f14c0
ci: set go mod tidy step timeout (#64449)
burmudar Aug 13, 2024
f2fa76a
migrations: remove support for NoTransaction (#64432)
keegancsmith Aug 13, 2024
adce59b
fix/enterpriseportal: adjust job check frequency, tweak messaging (#6…
bobheadxi Aug 13, 2024
27d0615
dotcom: request write scopes for EP prod proxy (#64450)
bobheadxi Aug 13, 2024
3522dcf
Svelte: fix file tree guide lines (#64425)
camdencheek Aug 13, 2024
2649987
fix/enterpriseportal: [MUST REVERT LATER] relax scopes for write oper…
bobheadxi Aug 13, 2024
043e780
feat/enterpriseportal: add license creation webhook (#64422)
bobheadxi Aug 13, 2024
f9f3cd8
Add verbiage to direct Cody feedback to VSC/JB repos (#64454)
kalanchan Aug 13, 2024
34ff925
feat(svelte): Add cody chat page (#64448)
fkling Aug 13, 2024
ca6e72f
Redis: remove RedisKeyValue constructor (#64442)
jtibshirani Aug 14, 2024
bcb2e16
feat(appliance): optionally load pinned releases file (#64441)
craigfurman Aug 14, 2024
3b85035
chore: download - ensure dir exists when writing to dst (#64460)
burmudar Aug 14, 2024
56e1f11
fix(svelte): Remove unnecessary console.log statement (#64463)
fkling Aug 14, 2024
d3a3d72
Add support for Bitbucket Server OAuth2 (#64179)
pjlast Aug 14, 2024
c222523
Redis: remove some direct pool usages (#64447)
jtibshirani Aug 14, 2024
1b1229c
feat/API: implement `/models` and `/models/{modelId}` using TypeSpec …
olafurpg Aug 14, 2024
0aeb6fd
tenant: Add test to verify that we don't regress on tables without te…
eseliger Aug 14, 2024
44f07c3
Invalidate sessions on user deletion (#64445)
qaisjp Aug 14, 2024
3268ade
migrations: commit between table locks and use when condition for tri…
keegancsmith Aug 14, 2024
70e98db
Redis: expose KeyValue.WithPrefix (#64466)
jtibshirani Aug 14, 2024
9981c14
migrations: avoid duplicate foreign key constraints when tenant_id re…
keegancsmith Aug 14, 2024
fef7af9
Revert "chore(local): dont buffer sg updatecheck commencement notice …
bobheadxi Aug 14, 2024
6e828b0
feat/dotcom: use Enterprise Portal for all subscriptions UI (#64115)
bobheadxi Aug 14, 2024
1c3ba6e
chore(ci): lower concurrent jobs when pushing to dockerhub (#64469)
jhchabran Aug 14, 2024
f403bfc
chore: Bump autoindexing image SHAs (#64472)
varungandhi-src Aug 14, 2024
cff1669
Svelte: Perforce UI elements refactor (#64279)
jasonhawkharris Aug 14, 2024
420905c
Update src-cli (#64255)
Chickensoupwithrice Aug 14, 2024
badd28e
chore: Downgrade auto-indexing scip-go SHA and pin version in CI (#64…
varungandhi-src Aug 14, 2024
424a021
migrations: give new ids to rewritten migrations (#64480)
keegancsmith Aug 15, 2024
3046a33
github: remove lighthouse workflow (#64483)
burmudar Aug 15, 2024
5594a7c
chore: improve docs for playwright upgrades (#64394)
bahrmichael Aug 15, 2024
96cf68a
github: remove update embeddings workflow (#64484)
burmudar Aug 15, 2024
71fa23f
fix/enterpriseportal: add license creation message to Slack webhook (…
bobheadxi Aug 15, 2024
d208f52
sec: Add extra admin checks (#64485)
evict Aug 15, 2024
48a5c70
chore(msp): use us.gcr.io/sourcegraph-dev for pings and telemetry-gat…
Strum355 Aug 15, 2024
f105b67
chore: Remove unused parameter (#64491)
varungandhi-src Aug 15, 2024
a39ce3e
lib/process: use context.AfterFunc (#64494)
keegancsmith Aug 15, 2024
ebc97cb
[Sveltekit]: perforce - replace 'commits' with 'changelists' on contr…
jasonhawkharris Aug 15, 2024
fe310cc
feat/dotcom: UX tweaks for subscription management (#64478)
bobheadxi Aug 15, 2024
d083ea7
[Sveltekit]: Perforce - redirect from `commits` to `changelists` url …
jasonhawkharris Aug 15, 2024
46ed099
fix(batches): add experimental label to GitHub apps integration (#64496)
bahrmichael Aug 15, 2024
3594d6c
Update `SiteAdminPingsPage.tsx` to include collection of ip address (…
akalia25 Aug 15, 2024
54c3e0b
fix/enterpriseportal: fix invalid argument errors (#64498)
bobheadxi Aug 15, 2024
c93c377
Revert "fix/enterpriseportal: relax scopes for write operations" (#64…
bobheadxi Aug 15, 2024
8f59ef4
fix/msp/jobs: do not provision job absence alert for crons over 23h30…
bobheadxi Aug 15, 2024
62351da
lib/msp: new clients library with recommended dial options (#64500)
bobheadxi Aug 15, 2024
6540e8e
fix(search): choose query examples based on default pattern type (#64…
stefanhengl Aug 16, 2024
19b7c03
bitbucket: Fix UserPermissions not returning anything (#64482)
eseliger Aug 16, 2024
ab2e8e3
feat(appliance): deploy otel-collector (#64486)
craigfurman Aug 16, 2024
5b09c8d
chore(precommit): update precommit and remove trailing whitespace hoo…
burmudar Aug 16, 2024
c0c210d
chore(docs): port how-tos to Notion (#64509)
jhchabran Aug 16, 2024
9cdd181
enable chat intent on enterprise instances (#64507)
hitesh-1997 Aug 16, 2024
d6660b9
chore(docs): update git-combine README (#64513)
jhchabran Aug 16, 2024
79bfaf9
Update p4-fusion wolfi image (#64514)
pjlast Aug 16, 2024
08a1055
Cody: add file pattern filter to context resolver (#64492)
camdencheek Aug 16, 2024
b3e86a6
fix/msp/runtime: fix sentry checkin (#64503)
bobheadxi Aug 16, 2024
8ad337e
feat/enterpriseportal: define SubscriptionLicenseChecksService (#64396)
bobheadxi Aug 16, 2024
e4ee9b9
add `otherCompletionProviders` to `privateMetadata` allowlist (#64508)
akalia25 Aug 16, 2024
f129d66
feat/enterpriseportal: implement SubscriptionLicenseChecksService (#6…
bobheadxi Aug 16, 2024
29d156b
feat/enterpiseportal: add checks bypass toggle as escape hatch (#64517)
bobheadxi Aug 16, 2024
9d45fc6
fix/dotcom: do not require Salesforce subscription ID (#64518)
bobheadxi Aug 16, 2024
cd14dd8
Gather additional statistics at index time (#64426)
beyang Aug 18, 2024
d61c054
all: use context.AfterFunc (#64510)
keegancsmith Aug 19, 2024
85c8314
feat(sg): update appliance images (#64512)
craigfurman Aug 19, 2024
cb1ce4f
Update licenses-update.yml (#64524)
BolajiOlajide Aug 19, 2024
09b886e
sg: add migrate alias for migration subcommand (#64528)
keegancsmith Aug 19, 2024
585d49b
sg: add migration enforce-tenant-id command (#64511)
keegancsmith Aug 19, 2024
5a3366e
Add bazel config for syntactic codeintel worker (#63802)
keynmol Aug 19, 2024
68e0fb0
fix/openai: non-streaming LLM response (#64473)
olafurpg Aug 19, 2024
7485a9c
fix/LLM API: return helpful error message on missing model (#64474)
olafurpg Aug 19, 2024
671305d
sg: do not warn about dev build if flags are configured (#64529)
keegancsmith Aug 19, 2024
d89d803
fix: use `logtest.Scoped(t)` for tests (#64530)
olafurpg Aug 19, 2024
c1a0756
chore(security): added better GHAS check (#64537)
shivasurya Aug 19, 2024
32e63dd
dev: remove old files (#64538)
keegancsmith Aug 19, 2024
3643746
update changelog links (#64541)
BolajiOlajide Aug 22, 2024
c864f15
Add a visible notice in the README (#64542)
jhchabran Aug 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore(search): update search API call sites to set the version explic…
…itly (sourcegraph#63782)

I went through all call sites of the 3 search APIs (Stream API, GQL API,
SearchClient (internal)) and made sure that the query syntax version is
set to "V3".

Why?

Without this change, a new default search syntax version might have
caused a change in behavior for some of the call sites.

## Test plan
- No functional change, so relying mostly on CI
- The codeintel GQL queries set the patternType explicitly, so this
change is a NOP.

I tested manually
- search based code intel sends GQL requests with version "V3"
- repo badge still works
- compute GQL returns results
  • Loading branch information
stefanhengl authored Jul 12, 2024
commit b77809cf9a4c512edad7832bc482e35988c25a99
10 changes: 6 additions & 4 deletions client/shared/src/codeintel/legacy-extensions/util/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import gql from 'tagged-template-noop'

import { isErrorLike } from '@sourcegraph/common'

import { SearchVersion } from '../../../graphql-operations'
import type * as sourcegraph from '../api'
import { cache } from '../util'

Expand Down Expand Up @@ -251,6 +252,7 @@ export class API {

const data = await queryGraphQL<Response>(buildSearchQuery(fileLocal), {
query,
version: SearchVersion.V3,
})
return data.search.results.results.filter(isDefined)
}
Expand Down Expand Up @@ -322,8 +324,8 @@ function buildSearchQuery(fileLocal: boolean): string {

if (fileLocal) {
return gql`
query LegacyCodeIntelSearch2($query: String!) {
search(query: $query) {
query LegacyCodeIntelSearch2($query: String!, $version: SearchVersion!) {
search(query: $query, version: $version) {
...SearchResults
...FileLocal
}
Expand All @@ -334,8 +336,8 @@ function buildSearchQuery(fileLocal: boolean): string {
}

return gql`
query LegacyCodeIntelSearch3($query: String!) {
search(query: $query) {
query LegacyCodeIntelSearch3($query: String!, $version: SearchVersion!) {
search(query: $query, version: $version) {
...SearchResults
}
}
Expand Down
4 changes: 2 additions & 2 deletions client/web/src/codeintel/ReferencesPanelQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ export const FETCH_HIGHLIGHTED_BLOB = gql`
`

export const CODE_INTEL_SEARCH_QUERY = gql`
query CodeIntelSearch2($query: String!) {
search(query: $query) {
query CodeIntelSearch2($query: String!, $version: SearchVersion!) {
search(query: $query, version: $version) {
__typename
results {
__typename
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { CODE_INTEL_SEARCH_QUERY, LOCAL_CODE_INTEL_QUERY } from '../../codeintel
import type { SettingsGetter } from '../../codeintel/settings'
import { isDefined } from '../../codeintel/util/helpers'
import type { CodeIntelSearch2Variables } from '../../graphql-operations'
import { SearchVersion } from '../../graphql-operations'
import { syntaxHighlight } from '../../repo/blob/codemirror/highlight'
import { getBlobEditView } from '../../repo/blob/use-blob-store'

Expand Down Expand Up @@ -367,6 +368,7 @@ async function executeSearchQuery(terms: string[]): Promise<SearchResult[]> {
query: getDocumentNode(CODE_INTEL_SEARCH_QUERY),
variables: {
query: terms.join(' '),
version: SearchVersion.V3,
},
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
type LangStatsInsightContentResult,
type LangStatsInsightContentVariables,
SearchPatternType,
SearchVersion,
} from '../../../../../graphql-operations'
import type { CategoricalChartContent } from '../../backend/code-insights-backend-types'

Expand Down Expand Up @@ -162,8 +163,8 @@ function quoteIfNeeded(value: string): string {
}

export const GET_LANG_STATS_GQL = gql`
query LangStatsInsightContent($query: String!) {
search(query: $query) {
query LangStatsInsightContent($query: String!, $version: SearchVersion!) {
search(query: $query, version: $version) {
results {
limitHit
}
Expand All @@ -180,6 +181,7 @@ export const GET_LANG_STATS_GQL = gql`
function fetchLangStatsInsight(query: string): Observable<LangStatsInsightContentResult> {
return requestGraphQL<LangStatsInsightContentResult, LangStatsInsightContentVariables>(GET_LANG_STATS_GQL, {
query,
version: SearchVersion.V3,
}).pipe(map(dataOrThrowErrors))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { MockedTestProvider } from '@sourcegraph/shared/src/testing/apollo'

import { WebStory } from '../../../../../../components/WebStory'
import type { LangStatsInsightContentResult } from '../../../../../../graphql-operations'
import { SearchVersion } from '../../../../../../graphql-operations'
import { GET_LANG_STATS_GQL } from '../../../../core/hooks/live-preview-insight'
import { useCodeInsightsLicenseState } from '../../../../stores'

Expand All @@ -31,7 +32,7 @@ export default defaultStory
const LANG_STATS_MOCK: MockedResponse<LangStatsInsightContentResult> = {
request: {
query: getDocumentNode(GET_LANG_STATS_GQL),
variables: {},
variables: { version: SearchVersion.V3 },
},
result: {
data: {
Expand Down
27 changes: 0 additions & 27 deletions client/web/src/search/backend.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { type Observable, of } from 'rxjs'
import { map } from 'rxjs/operators'

import { createAggregateError } from '@sourcegraph/common'
import { dataOrThrowErrors, gql } from '@sourcegraph/http-client'

import { queryGraphQL, requestGraphQL } from '../backend/graphql'
Expand All @@ -16,35 +15,9 @@ import type {
UpdateSavedSearchVariables,
Scalars,
SavedSearchFields,
ReposByQueryResult,
SavedSearchResult,
} from '../graphql-operations'

export function fetchReposByQuery(query: string): Observable<{ name: string; url: string }[]> {
return queryGraphQL<ReposByQueryResult>(
gql`
query ReposByQuery($query: String!) {
search(query: $query) {
results {
repositories {
name
url
}
}
}
}
`,
{ query }
).pipe(
map(({ data, errors }) => {
if (!data?.search?.results?.repositories) {
throw createAggregateError(errors)
}
return data.search.results.repositories
})
)
}

const savedSearchFragment = gql`
fragment SavedSearchFields on SavedSearch {
id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'
import { GitRefType, SearchPatternType } from '@sourcegraph/shared/src/graphql-operations'
import { SearchMode, SearchQueryStateStoreProvider } from '@sourcegraph/shared/src/search'
import type { AggregateStreamingSearchResults, Skipped } from '@sourcegraph/shared/src/search/stream'
import { LATEST_VERSION } from '@sourcegraph/shared/src/search/stream'
import { noOpTelemetryRecorder } from '@sourcegraph/shared/src/telemetry'
import { NOOP_TELEMETRY_SERVICE } from '@sourcegraph/shared/src/telemetry/telemetryService'
import { MockedTestProvider } from '@sourcegraph/shared/src/testing/apollo'
Expand Down Expand Up @@ -109,7 +110,7 @@ describe('StreamingSearchResults', () => {

expect(receivedQuery).toEqual('r:golang/oauth2 test f:travis')
expect(receivedOptions).toEqual({
version: 'V3',
version: LATEST_VERSION,
patternType: SearchPatternType.regexp,
caseSensitive: true,
searchMode: SearchMode.SmartSearch,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { noop } from 'lodash'
import { describe, expect, test } from 'vitest'

import { LATEST_VERSION } from '@sourcegraph/shared/src/search/stream'
import { noOpTelemetryRecorder } from '@sourcegraph/shared/src/telemetry'
import { NOOP_TELEMETRY_SERVICE } from '@sourcegraph/shared/src/telemetry/telemetryService'
import { MockedTestProvider } from '@sourcegraph/shared/src/testing/apollo'
Expand Down Expand Up @@ -32,7 +33,7 @@ const COMMON_PROPS: Omit<SearchResultsInfoBarProps, 'enableCodeMonitoring'> = {
sidebarCollapsed: false,
isSourcegraphDotCom: true,
options: {
version: 'V3',
version: LATEST_VERSION,
patternType: SearchPatternType.standard,
caseSensitive: false,
trace: undefined,
Expand Down
7 changes: 4 additions & 3 deletions cmd/frontend/backend/go_importers.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ func CountGoImporters(ctx context.Context, cli httpcli.Doer, repo api.RepoName)

q.Query = countGoImportersGraphQLQuery
q.Variables = map[string]any{
"query": countGoImportersSearchQuery(repo),
"query": countGoImportersSearchQuery(repo),
"version": "V3",
}

body, err := json.Marshal(q)
Expand Down Expand Up @@ -144,6 +145,6 @@ func countGoImportersSearchQuery(repo api.RepoName) string {
}

const countGoImportersGraphQLQuery = `
query CountGoImporters($query: String!) {
search(query: $query) { results { matchCount } }
query CountGoImporters($query: String!, $version: SearchVersion!) {
search(query: $query, version: $version) { results { matchCount } }
}`
2 changes: 1 addition & 1 deletion cmd/frontend/internal/compute/resolvers/resolvers.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func NewBatchComputeImplementer(ctx context.Context, logger log.Logger, db datab
log15.Debug("compute", "search", searchQuery)

patternType := "regexp"
job, err := gql.NewBatchSearchImplementer(ctx, logger, db, &gql.SearchArgs{Query: searchQuery, PatternType: &patternType})
job, err := gql.NewBatchSearchImplementer(ctx, logger, db, &gql.SearchArgs{Query: searchQuery, PatternType: &patternType, Version: "V3"})
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/frontend/internal/compute/streaming/compute.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func NewComputeStream(ctx context.Context, logger log.Logger, db database.DB, se
searchClient := client.New(logger, db, gitserver.NewClient("http.compute.search"))
inputs, err := searchClient.Plan(
ctx,
"",
"V3",
&patternType,
searchQuery,
search.Precise,
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/search-blitz/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (s *client) search(ctx context.Context, query, queryName string) (*metrics,
return s.doGraphQL(ctx, graphQLRequest{
QueryName: queryName,
GraphQLQuery: graphQLSearchQuery,
GraphQLVariables: map[string]string{"query": query},
GraphQLVariables: map[string]string{"query": query, "version": "V3"},
MetricsFromBody: func(body io.Reader) (*metrics, error) {
var respDec struct {
Data struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/cmd/search-blitz/search.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ fragment SearchResultsAlertFields on SearchResults {
}
}

query ($query: String!) {
search(query: $query) {
query ($query: String!, $version: SearchVersion!) {
search(query: $query, version: $version) {
results {
results {
__typename
Expand Down
2 changes: 1 addition & 1 deletion internal/insights/query/streaming/search_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type insightsSearchClient struct {
func (r *insightsSearchClient) Search(ctx context.Context, query string, patternType *string, sender streaming.Sender) (*search.Alert, error) {
inputs, err := r.searchClient.Plan(
ctx,
"",
"V3",
patternType,
query,
search.Precise,
Expand Down
10 changes: 4 additions & 6 deletions internal/search/streaming/http/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ import (

const maxPayloadSize = 10 * 1024 * 1024 // 10mb

// TODO(stefan): Remove NewRequest in favor of NewRequestWithVersion.

// NewRequest returns an http.Request against the streaming API for query.
// NewRequest returns an http.Request against the Stream API. Use
// NewRequestWithVersion if you want to specify the version of the search syntax
// or the default patternType.
func NewRequest(baseURL string, query string) (*http.Request, error) {
// We don't set version or pattern type and rely on the defaults of the route
// handler.
return NewRequestWithVersion(baseURL, query, "", nil)
return NewRequestWithVersion(baseURL, query, "V3", nil)
}

// NewRequestWithVersion returns an http.Request against the streaming API for
Expand Down
Loading