Commit Graph

21460 Commits

Author SHA1 Message Date
Jean-Hadrien Chabran
c495cde4e9
Update docsite to v1.8.7 (#36237) 2022-05-30 13:47:04 +00:00
Andre Eleuterio
709793f1fb
Upgrading dependencies (#36185)
* upgrade golang dependencies

* go mod tidy

* go mod tidy

* bump eventsource

* bump goland tools

Co-authored-by: Dave Try <davetry@gmail.com>
2022-05-30 10:43:58 -03:00
Leo Lara
ace6c96746
dbcache: unexport cachedRepos.Repos (#36221) 2022-05-30 15:30:58 +02:00
David Veszelovszki
dd6e3e4d87
JetBrains: Handle symbol search results (#36189) 2022-05-30 12:24:57 +00:00
Bolaji Olajide
b64376204d
batches: fix TestGetBatchChangesUsageStatistics flakiness (#36228)
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2022-05-30 13:16:06 +01:00
David Veszelovszki
0dfc42d691
JetBrains: Handle path search results (#36165)
Not displaying repo headers for now, this was quicker to implement and it might be a good enough design. We can refine later, but for now, it gives value that we can see this type of hits.
2022-05-30 13:59:20 +02:00
Philipp Spiess
f522e752ca
JetBrains: Move title into web view and add loading indicator (#36023)
* JetBrains: Move title into web view and add loading indicator

* Move progress status underneath search box and bring back popover title

* Fix height jumping

* Update icons to higher fidelity version
2022-05-30 13:39:16 +02:00
Keegan Carruthers-Smith
0bd49c4540
searcher: prefix all prometheus variables with metric (#36161)
This is a pattern we started using a while ago, but the code in searcher
predates that. This was done via gopls doing renames.

Test Plan: go test

Accidently squashed merged into this commit, for convenience just combinging:

* searcher: prometheus gauge for SEARCHER_CACHE_SIZE_MB (#36162)

This is to allow us to create a dashboard which includes the configured
maximum size of the cache or make a percentage of cache used. This will
make it easier to check admin configurations, since we don't need to
check the configuration we can just check the dashboard.

Test Plan: started locally and checked the value of
searcher_store_max_cache_size_bytes in the metrics page for searcher.
2022-05-30 11:36:14 +00:00
Keegan Carruthers-Smith
c79e380ca0
trace: Logger helper (#36139)
I don't see many uses of log.WithTrace, but I think this is because it
is clunky to use since Span or Context may be nil on a context. This
introduces a helper so we can start logging against a span more easily.
Here is an example of using it I want:

  logger := trace.Logger(ctx, s.Log).Scoped("...", "...").With(...

This seems like the best place to add the logger, since we need to use
internal functions in the trace pkg (ie won't work in lib/log).

I updated the documentation to include an example of it. Right now the
documentation has one other place it calls WithTrace, but it needs to be
reworked to be more realistic. I think calling log.Scoped on something
that is traced seems surprising to me.

Test Plan: unused, so just that CI is happy.

Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2022-05-30 11:35:52 +00:00
Ryan Slade
7aaa5d8f17
gitserver: Upgrade p4-fusion to 1.9 (#36156) 2022-05-30 12:52:35 +02:00
Jean-Hadrien Chabran
1815e69d16
ci: disable TestGetBatchChanges... in backcompat. (#36220) 2022-05-30 12:08:58 +02:00
Thorsten Ball
e4b30928de
Diable flaky TestGetBatchChangesUsageStatistics (#36216) 2022-05-30 11:31:45 +02:00
Stefan Hengl
eba7dee029
changelog: zoekt's new /debug landing page (#36067) 2022-05-30 11:05:06 +02:00
Joe Chen
3e58f208cc
release: update release config for 3.40.1 (#36209) 2022-05-30 16:53:28 +08:00
Noah S-C
a7cd8a2c74
gitserver: pass PATH down in git command tests (#36168)
pass PATH down in git command tests
2022-05-30 08:56:04 +01:00
GitStart-SourceGraph
45683a4650
Wildcard <Icon /> accessibility. client/web/src/enterprise (#35841)
Co-authored-by: gitstart-sourcegraph <gitstart@users.noreply.github.com>
2022-05-28 08:07:28 +01:00
GitStart-SourceGraph
723dff2769
Accessibility: Search contexts management screen reader issues (#35781)
Co-authored-by: gitstart-sourcegraph <gitstart@users.noreply.github.com>
2022-05-28 07:09:05 +01:00
Robert Lin
5d7844518b
dev: remove dev/generate.sh entirely (#36190) 2022-05-27 15:00:41 -07:00
Beatrix
e2845a12fa
vsce patch release 2.2.3 (#36141)
* vsce: fix build and add workspace recommendations
* Fix broken components due to recent search ui update
* patch release for 2.2.3 and update changelog
* remove unreleased feature for 2.2.3 release
2022-05-27 14:24:11 -07:00
Camden Cheek
6626ec8ce6
Search backend: add comments to HunkMatch and MatchedContent (#36179)
This adds a bunch of comments to HunkMatch since I think I'm happy with
where this design landed. Additionally, it adds MatchedContent, which
returns the exact set of strings matched by the query. It's not used
except in tests yet, but I wanted to add that now to pin that behavior
since that's critical to the design of what we store in HunkMatch.
2022-05-27 20:07:58 +00:00
Camden Cheek
1967e89f69
SearchBackend: refine HunkMatch to include PreviewStart (#36176)
This refines the new HunkMatch type to include PreviewStart so that
we have both the line number and the byte offset of Preview available
for further processing. PreviewEnd can always be calculated from
Preview, so I felt it was best to just provide a start location rather
than a range that is represented by Preview.
2022-05-27 19:06:34 +00:00
Camden Cheek
ad0515e736
Search backend: a better multiline type (#36124)
This replaces MultilineMatch with a slightly more general HunkMatch.

One of the design limitations of MultilineMatch is that it requires duplicating the content of the full line for every matched range. One of the things that is nice about LineMatch is that it can match the same line many times, but only send the content once. When we implemented MultilineMatch, this was known, but I naively thought it would be fine since we don't send that many results with a bunch of matches per line.

I was wrong. The thing is, for very large lines, there are often also very many matches. This means as the line gets longer and there are more likely matches, we also send the larger line more times. This bad

behavior causes us to hit our max payload size limit for very long lines because they are sent very many times.

So, instead, we get HunkMatch. A HunkMatch is like a MultilineMatch, except it can contain any number of matched ranges (which are allowed to cross line boundaries) within that hunk.
2022-05-27 12:52:18 -06:00
coury-clark
ee8be4e046
insights: propagate traces on streaming searches from insights (#36182) 2022-05-27 11:23:20 -07:00
Thomas Liu
481495ccef
Search results UI: Fix search result match range highlighting after a Unicode character (#35965)
* fix search result match range highlighting after a unicode character
Change `highlightNode.ts` to highlight ranges based on code point index instead of byte index.

In `highlightNode.ts`, string indexing is used to highlight match ranges in search results. However, the range indexes coming from the search backend are counted in terms of runes, whereas string indexing is based on bytes.
JavaScript uses UTF-16 string encoding, which encodes Unicode code points as either one or two hex characters. This was causing highlight ranges to be offset by one when the range came after a two-hex-character-encoded Unicode code point, such as certain emojis. Unpacking a string into an array of code points before slicing the range to be highlighted fixes this issue.

* run prettier
2022-05-27 12:44:31 -05:00
Robert Lin
3715865497
dev/sg: add mechanism for testing linters that operate on repo.State (#35819) 2022-05-27 17:42:29 +00:00
Cristina Birkel
b2eb68e0da
insights: Add sorting metadata for insights (#34611)
* Add sorting metadata for capture group insights

Co-authored-by: Justin Boyson <justin.boyson@sourcegraph.com>
2022-05-27 17:27:52 +00:00
Robert Lin
fee4328cab
internal/metrics: migrate to lib/log (#36180) 2022-05-27 17:03:27 +00:00
GitStart-SourceGraph
c11344fac1
[SG-35212] Wildcard <Icon /> accessibility: client/web/src/repo, site-admin, user (#35617)
Co-authored-by: gitstart-sourcegraph <gitstart@users.noreply.github.com>
2022-05-27 17:52:21 +01:00
Thorsten Ball
5d2aa30232
sg hacking hour: better error output in migration commands (#36175) 2022-05-27 16:00:46 +00:00
Thorsten Ball
b69a723a36
Fix colors for code in new reference panel (#36170)
This fixes the colors in the dark theme.
2022-05-27 15:01:24 +00:00
Tom Ross
aab7a4f89f
Site config: Ensure notices don't support additional properties (#36172) 2022-05-27 14:58:26 +00:00
Laura Hacker
2447191f3d
[Bug] Fix dismissable Typos (#36171)
Ensure all use of 'dismissible' in the repo uses the same spelling
2022-05-27 14:49:11 +00:00
Vova Kulikov
d17c0ab1e2
Code Insights: Fix zeroYaxisMin setting for code insight charts (#36149)
Fix zeroYaxis min setting for code insight chart
2022-05-27 22:29:37 +08:00
Vova Kulikov
61ab2f5728
Add collapse visual state to the drill-down panel for the independent insight page (#35851)
* Add collapse visual state to the drill-down panel for the independent insight page

* Fix forward ref problem around drill down search context filter

* Add mobile layout for the drill-down filters panel

* Fix bad layout for the collapse filters section

* Show search based suggestions only on input focus event

* Support context prefix for the search context pill preview
2022-05-27 22:28:57 +08:00
Cesar Jimenez
dc2068fac6
RFC 619: Move upload commitgraph background job into the new job skeleton (#36112) 2022-05-27 10:27:11 -04:00
GitStart-SourceGraph
1385aaa591
Wildcard V2: Apply <Input /> Codemod on client/web/enterprise (#35414)
Co-authored-by: gitstart-sourcegraph <gitstart@users.noreply.github.com>
2022-05-27 14:56:00 +01:00
Keegan Carruthers-Smith
7924bb80e2
diskcache: ignore files that go missing during filepath.Walk (#36163)
For example this can happen when searcher renames a file. We shouldn't
bail out early, but rather lets work on best effort information.

Test Plan: this is tough to reproduce, so instead I am relying on tests
to catch any possible regressions.
2022-05-27 13:53:40 +00:00
Noah S-C
cf96227903
codeintel: expose tags associated with upload's commit (#35147) 2022-05-27 13:46:22 +00:00
David Veszelovszki
fc507c08e7
JetBrains search box small fixes (#36150)
* Add missing type import
* Change subscription useState to useRef
* Move constant to module scope
* Rename file to match our code style recommendation (https://docs.sourcegraph.com/dev/background-information/web/web_app#naming-files)
* Do auth before loading <App>
* Remove error codes, add Java stack trace to errors
* Add comment to clarify CommitMatch interface
2022-05-27 12:54:31 +00:00
David Veszelovszki
581aa8bc9a
JetBrains: commit search result display (#36079)
* Clear up the terminology for search results:
    - Made a very clear distinction between “match” (what Sourcegraph returned) and “result” (a selectable item that we display)
    - Renamed “idForLine” to “resultId”
    - Renamed “idForMatch” to “matchId”
    - Made naming specific to content search where the logic is specific to content search (in preparation for handling other search types)
    - Changed the interface of `getSiblingResult()`
* Add “commit” search result display
* Fix Windows-style line breaks
* Add “repo” search result display
2022-05-27 12:16:47 +00:00
Bolaji Olajide
02e8af2f0a
batches: fix incorrect filter for draft batch changes (#36129) 2022-05-27 14:02:33 +02:00
Noah S-C
c98803daa3
codeintel: add sequence number and optype to audit logs (#36038) 2022-05-27 11:40:07 +00:00
Noah S-C
71a7923ce9
generate: fix PGDATASOURCE for internal/database/gen.sh with nix (#36099) 2022-05-27 12:18:48 +01:00
Vova Kulikov
45e07e9e40
Code Insights: Remove legacy insight card (view package) (#35991)
* Move the view grid to the insight directory

* Move all core components to the chart directory

* Implement code insight example card with new InsightCard UI API
2022-05-27 18:24:44 +08:00
Erzhan Torokulov
a7d2e70a89
Fix "QuickStart => TourInfo" empty space when no info present (#36108) 2022-05-27 10:33:58 +01:00
Thorsten Ball
d5be751be0
Reference panel: fix design tweaks in dark mode by using semantic colors (#36145)
These now change when switching between light/dark theme.
2022-05-27 09:16:10 +00:00
Milan Freml
1c37dda074
[cloud] Show update button on gitlab connection when token is expired (#36133)
With gitlab now enforcing token expiry in 2 hours, this is an easier
way for the customer to renew their oauth token. Without this functionality
the customer needs to remove the code host connection and re-add it.
However removal of code host connection also removes any repos attached
to it. Which would lead to customer needing to re-add all of the repos again
as well.

Instead this PR shows an Update button when the token is expired, allowing
the customer to go over the oauth flow to get a new token without
forcing them to remove the code host connection (and repos).

Related: https://github.com/sourcegraph/customer/issues/968
2022-05-27 08:01:56 +00:00
Ryan Slade
8d240c6ea2
repo-updater: Rename log for consistency (#36090) 2022-05-27 08:48:19 +02:00
Keegan Carruthers-Smith
ab3aa098d8
searcher: add ObservationContext to diskcache (#36096)
ObservationContext on diskcache was introduced in 5ac235a5f. This means
for about 5 months we haven't had metrics for it on searcher. This
commit is the most minimal introduction for it. We don't yet integrate
ObservationContext into searcher.

I considered just constructing an ObservationContext in Start, but then
the prometheus registry would panic in tests due to multiple
constructions of it.

Test Plan: go test and running an unindexed search locally.
2022-05-27 08:18:31 +02:00
GitStart-SourceGraph
2abe73cfca
[SG-35217] Wildcard V2: <Typography /> Manual migration Text (#35232)
Co-authored-by: gitstart-sourcegraph <gitstart@users.noreply.github.com>
2022-05-27 06:51:43 +01:00