Commit Graph

18336 Commits

Author SHA1 Message Date
Varun Gandhi
0ca5d336e1
Add missing .gitattributes files for various generated files (#30092)
* Mark protoc generated files with .gitattributes files.
* Mark generated documentation with .gitattributes.
2022-01-25 16:36:21 +05:30
Tom Ross
14ca0d7f7d
web: remove duplicate as props in Wildcard (#30164) 2022-01-25 11:03:10 +00:00
Rafał Gajdulewicz
78aa6b5765
Add GraphQL-based Org metrics (#30025)
* Add templating

* Instrument other org metrics

* go generate
2022-01-25 11:29:45 +01:00
Rafał Gajdulewicz
1f3e7f4230
Instrument external service mutations (#29983)
* Works

* Refactor to use enums

* Remove logs

* Refactor to make less calls

* Move vars closer to usage + fix typo

* Apply suggestions from code review

Co-authored-by: Milan Freml <kopancek@users.noreply.github.com>

* Change init

Co-authored-by: Milan Freml <kopancek@users.noreply.github.com>
2022-01-25 11:29:33 +01:00
Erzhan Torokulov
f2e0379639
Fix browser extension dropdown to start suggesting after 1st URL change instead of 2nd (#30120) 2022-01-25 16:25:32 +06:00
Indradhanush Gupta
669f0646c8
repo-updater: Add feature flag to enable / disable repo update jitter (#30154) 2022-01-25 14:00:38 +05:30
Dax McDonald
dfef6209aa
Update docsite comment (#30152) 2022-01-25 00:20:00 -07:00
Indradhanush Gupta
a2051b6483
internal/repos: Add debug log to investigate update queue growth rate (#30103)
We've seen this alert get triggered over the last few days even though
the metrics seem to indicate otherwise. Adding a log to understand
when we are resetting the update queue.
2022-01-25 10:55:18 +05:30
Camden Cheek
3e72636872
disable test that is flaking with off-by-one (#30153) 2022-01-25 02:34:53 +00:00
Camden Cheek
233e960800
Search jobs: Remove limiters on child jobs (#30142)
Now that we have a top-level limiter, there is no reason for each of the
child jobs to have their own limiters since they all use the same
context, so the limits are effectively duplicated logic.
2022-01-24 18:31:01 -07:00
TJ Kandala
29fd56ea3b
vsce: implement access token sidebar view (#30079) 2022-01-24 20:06:20 -05:00
Camden Cheek
2ccaf35b16
Search Jobs: add LimitJob (#30122)
This adds a new LimitJob, which runs a child job until the child sends
results hitting the limit, then cancels the child job.
2022-01-24 23:22:15 +00:00
Camden Cheek
0be7438437
remove implements comments (#30129) 2022-01-24 16:05:15 -07:00
Kelli Rockwell
f92fb23568
batches: SSBC animated library pane collapse (#30069) 2022-01-24 15:02:54 -08:00
coury-clark
ceaaed7a16
docsite: remove code insights documents from the search engine indexer (#30139) 2022-01-24 15:15:40 -07:00
Camden Cheek
ab74de3374
Make LimitStream stop sending results when the limit is hit (#30121)
Previously, when the limit was hit, we would cancel any jobs depending
on the context returned when creating the LimitStream, but we would
still send any events that those jobs sent after the context was
cancelled. This meant that, even though we were "limiting" the stream,
it was only a soft limit.

This makes it difficult to make guarantees for upstream consumers of a
limited stream. For example, with AND searches, we want strictly no more
than n results, but limit stream might return an unboundedly large
number of results. This causes errors when I try to depend on
LimitStream for AND searches.
2022-01-24 22:04:47 +00:00
Noah S-C
2e90e61b42
vcs: fix #2 RefDescriptions output for tag refs to print commit objname rather than tag objname (#30136) 2022-01-24 21:34:25 +00:00
Eric Fritz
3686db68fa
migrator: Only construct DSNs for databases actually used (#30034) 2022-01-24 15:23:35 -06:00
Cristina Birkel
ab1c80df01
insights: Backend ping docs updates (#30117) 2022-01-24 16:22:50 -05:00
Robert Lin
fabaa6135c
monitoring: improve documentation about RawVariables (#30081) 2022-01-24 13:16:35 -08:00
Robert Lin
03e86c0522
Revert 8804332 and 1d15648 (#30131)
- Revert 880433282b
- Revert 1d15648033

Puppeteer check that was failing now passes: https://buildkite.com/sourcegraph/sourcegraph/builds/127024#3178b2c1-02bf-4b6a-9ab1-7e4e4f9efe37
2022-01-24 12:43:39 -08:00
Noah S-C
9b2ad3166d
Revert "vcs: fix RefDescriptions output for tag refs to print commit objname rather than tag objname (#30119)" (#30128) 2022-01-24 12:10:43 -08:00
Camden Cheek
ab7fbebcf3
Add helpers to the Matches type (#30118)
We have a type for a collection of matches, and we have a few spots that contain inline logic for things that can be operations on this slice type. This adds Matches.Limit() and Matches.ResultCount() which better encapsulates the logic and simplifies the callsites.
2022-01-24 12:50:40 -07:00
Robert Lin
c8be3e7f25
client: fix linter issue (#30127) 2022-01-24 11:50:22 -08:00
Stephen Gutekanst
6ebf32f2a7
user invites: make it easier to test the /welcome page (#29996)
It's quite annoying today for designers, reviewers, etc. to navigate to the
`/welcome` page because you need to:

1. Add the `enablePostSignupFlow` to your site config file in the `dev-private` repo.
2. Restart your dev server, ensuring you are running `sg start dotcom` mode.
3. Clear your browser local storage (because you may have completed the welcome flow
   already and that apollo state is cached in local storage)
4. Run a GraphQL query to edit your "temporary settings" which are stored on the server
   to enable this user flow:

```
mutation {
  editTemporarySettings(settingsToEdit:"{\"signup.finishedWelcomeFlow\": false}") {
    alwaysNil
  }
}
```

Finally, you can navigate to `/welcome` to test the flow / check designs. That's insane.

So I've added a debug parameter, so all you need now is `sg start dotcom` and navigate to
`/welcome?debug=1` to get there. None of that stuff above.

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
2022-01-24 12:32:46 -07:00
coury-clark
5057b49f34
Revert "docsite: remove code insights documents from the search engine indexer" (#30126)
This reverts commit b8caa3df5d.
2022-01-24 12:12:28 -07:00
Jean-Hadrien Chabran
4790724360
Fix trace command that swallowed errors (#30125) 2022-01-24 20:11:53 +01:00
coury-clark
b8caa3df5d
docsite: remove code insights documents from the search engine indexer (#30061) 2022-01-24 11:21:14 -07:00
Warren Gifford
04bcaf6ecb
add user documentation for updateUser (#29735)
* add user documentation for updateUser

* json -> graphql
2022-01-24 18:07:48 +00:00
Noah S-C
c52cd3d4f5
vcs: fix RefDescriptions output for tag refs to print commit objname rather than tag objname (#30119) 2022-01-24 17:47:23 +00:00
Robert Lin
882075ba71
doc/dev: document when soft failures are used for soc2/gn-106 (#30018)
Also see: https://sourcegraph.com/notebooks/Tm90ZWJvb2s6NTc=

Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
2022-01-24 08:59:11 -08:00
Camden Cheek
5ecca992f4
replace run.Routine with run.Job (#30076)
With timeout as a simple job wrapper, `run.Routine` can be fully
represented as a job. This makes `run.Routine` unnecessary, and we can
get rid of it.
2022-01-24 16:45:19 +00:00
Giselle Northy
78a2284b77
Add note about external db reqs (#30065) 2022-01-24 08:30:37 -08:00
Camden Cheek
157154348c
add TimeoutJob (#30074)
This adds a new `TimeoutJob`, which represents a job that is
time-limited.
2022-01-24 16:17:40 +00:00
Camden Cheek
b4dc41d684
Search jobs: pass db to job (#30111)
This modifies the `Run` signature on jobs to take a `db` handle instead
of a repo pager. The repo pager can be constructed from a db handle and
a set of repo options, and many of the jobs already store the repo
options on their struct.

By passing in a db handle to `Run()`, we remove all (I think) "runtime"
fields from the job structs. As a cool side effect, this means we could
theoretically fully serialize and deserialize a job tree. I don't have
any specific use cases for this in mind, but I can see some potentially
very cool things we could do there.
2022-01-24 09:11:26 -07:00
Robert Lin
b8d741b911
dev/sg: add -view flag to show secrets (#30036) 2022-01-24 07:37:59 -08:00
Robert Lin
f5bb39eb3d
dev/sg: refactor how checks are defined to reduce repetition (#30035) 2022-01-24 07:37:23 -08:00
Erzhan Torokulov
3ea77064b0
Fix browser extension after-install page (#30100) 2022-01-24 21:33:12 +06:00
Camden Cheek
e7bf39ff5e
convert repo exclusion to job (#30067)
This converts repo exclusion to a job. This pulls the execution out of
doResults, and adds it to the list of jobs to be executed in
toSearchRoutine. This allows us to slim down doResults and to
describe the operation in our routine tree like we do our other jobs.
2022-01-24 15:26:59 +00:00
Camden Cheek
6a9530ce0a
Search jobs: spike out some search combinator jobs (#30063)
Now that jobs are statically defined within the scope of a basic query, we can make combinator jobs that control the runtime behavior of a set of jobs.

This creates two new combinator jobs; JobWithOptional and ParallelJob.

JobWithOptional now encapsulates our logic for optional and required searches, allowing us to remove the Required method from the Job interface.

ParallelJob encapsulates the process of running a set of jobs in parallel.
2022-01-24 08:16:03 -07:00
Tom Ross
880433282b
Wildcard: <Alert /> migration (#29862) 2022-01-24 14:48:41 +00:00
Ólafur Páll Geirsson
30424e6e83
Customize colors for JSON syntax highlighting (#30105) 2022-01-24 14:36:55 +00:00
Tom Ross
1d15648033
Wildcard: <Card /> migration (#29989) 2022-01-24 13:48:17 +00:00
Jean-Hadrien Chabran
918b14b901
sg: warn the user if running start outside repo (#30102) 2022-01-24 13:59:40 +01:00
Tomás Senart
9e815ed41e
repos: Prevent individual cloud default external service syncing (#30032)
This commit makes it so we don't enqueue external service sync jobs for
cloud default external services also when there are no rows in the
external_service_sync_jobs table.

This case was unfortunately missed in #24412, which was a follow up from
a very similar incident to the one we are now handling, so it did not
prevent it from happening again :sadpanda:

Additionally, we prevent any cloud default service from syncing in the
Syncer.SyncExternalService method by early exiting with an error
(defense in depth).
2022-01-24 12:23:13 +00:00
Jean-Hadrien Chabran
e136905669
ci: avoid spawning a subshell when tracing cmds (#30094) 2022-01-24 11:25:03 +01:00
Thorsten Ball
f2a5d3e2dd
sg: Show progress bar when waiting for commands to install (#30039) 2022-01-24 10:41:39 +01:00
Ben Venker
e04eea71de
Small typo fix (#30055) 2022-01-24 09:39:37 +01:00
Indradhanush Gupta
4d865af3aa
internal/repos: Do not log errors as warning (#30090) 2022-01-24 13:54:37 +05:30
Vova Kulikov
210f581116
CodeInsights: Use wildcard Popover in the code insights components (#29794)
* Update drill-down filters styles and copy

* Update badge and description styles

* Fix max width/height calculation when space isn't enough to fit tooltip

* Improve popover props interface for controlled isOpen prop

Co-authored-by: Valery Bugakov <skymk1@gmail.com>
2022-01-22 17:00:20 +03:00