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] master from sourcegraph:master #22

Open
wants to merge 6,466 commits into
base: master
Choose a base branch
from
Open

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 24, 2020

See Commits and Changes for more details.


Created by pull[bot]. Want to support this open source service? Please star it : )

@pull pull bot added the ⤵️ pull label Jun 24, 2020
@keegancsmith keegancsmith deleted the master branch August 14, 2020 10:43
daxmc99 and others added 28 commits July 16, 2021 01:21
Warn if the average database block time is over 5ms, alert if it exceeds 10ms
…lity (#22886)

* Extract common settings persist logic to the separate react hook

* Update use delete handler according to how dashboards settings system works
* Add documentation on repo table row-level security.

The repo table is currently protected by a row-level security policy,
which is associated with the sg_service role[0]. This change introduces
admin documentation for understanding the basics of RLS, how we use it
and how to bypass it if necessary.

[0] #22303
- remove `PanelType.Valid()` in favour of `PanelType.validate()` (consistency of naming, users of the monitoring package should not perform validation themselves - the generator handles validation internally)
- move `PanelType` to `panel.go`
- update docs to account for many `PanelType`s
- attempt to update `ObservablePanelOption`s to support Heatmaps, or indicate that they do not support heatmaps
Include CHANGELOG in the docsite, so as to surface changelog items while searching. Seems useful for figuring out when something was added/removed/fixed, as well as find things that might not really be documented anywhere else.
…22947)

Cancelling that context eagerly means all follow up operations that use
it will fail with context: canceled

This also fixes the tests to actually catch this bug.
…#22157)

- web: move typography styles out from the `.theme-redesign`
- web: update bootstrap form-control SCSS variable
- web: move button styles out from the `.theme-redesign`
- web: remove `nav-link` class to keep search-button padding consistent
This makes sure we have RepoOptions available in
indexed_search.zoektSearchGlobal via TextParameters.

The goal is to avoid repository resolution on the
critical path for global searches. So far resolved
repositories where used as filter. For example: if fork:no
was specified, Zoekt still returned results from forks,
but since the resolved respositores didn't contain forks,
results from forks were filtered out.

We have already enabled Zoekt to consume the flags "public",
"fork", "archived" and we will soon be able to query Zoekt with
these flags. This means, once zoektSearchGlobal has access to
these flags we can skip repository resolution for public repositories.

To avoid circular imports I had to move Options from
the repos package to the search package. I think
types.go is a good fit.

The first commit is the actual change.
Commit two and three are mechanical refactors.
- web: upgrade `Webpack` to v5 for the web app
- web: upgrade `Webpack` to v5 for Storybook
- web: upgrade `Webpack` to v5 for the browser extension
- web: enable filesystem cache only in the development environment
- web: disable node.js polyfills
- web: disable `webpack.IgnorePlugin` for the web app
- web: switch to `react-refresh-webpack-plugin` from `react-hot-loader`
- web: use `cache` only in development mode
- web: remove redundant polyfill dependencies
- web: do not use `Webpack` cache on CI
- web: use runtime bundle in development mode by `frontend` server
* executor: pass HOME/PATH to src-cli if Firecracker is disabled

This implements the solution discussed in [this comment][comment].

What problem this solves: when the `executor` is executed on a developer
machine then Firecracker is very likely disabled (and can't even be
enabled on macOS). When that's the case the `CliSteps` of an executor
job are executed on the host machine directly.

But that won't work with `src batch [...]` commands since those need
`HOME` and `PATH` to be set, which they are not, because when executing
on the host the environment of `src` consists only of the env vars
set in the `CliStep.Env` field. (That's how Go's `exec.Command.Env`
field works: once values are set, nothing else is inherited from the
parent process).

What this change here does is to fix that special case by checking
whether Firecracker is enabled and if not setting the env vars.

[comment]: #22726 (comment)

* Fix tests by not using os.TempDir()
* repos: Make streaming syncer the default

This commit makes the streaming syncer the default mode, while giving
admins the option to disable it by setting the env var to false.

We've been running this in production for about a week without any
major problems apart from a small bug that only affected sourcegraph.com
in practice (that was fixed in #22947).

Making it the default will benefit large customers already and allow us
to start deleting old code paths.

* fixup! Update CHANGELOG
tjkandala and others added 30 commits July 26, 2021 18:43
describe current search limit
Log when a private repo is accessed directly.

Also, instrument when a private repo is listed before deciding whether
we should log it.
)

- Use `coursier resolve` instead of `coursier complete` to determine the
  existence of a dependency. The complete method is only intended to
  power tab completions, it can still have false positives/negatives
  when determining whether a dependency exists.
- Don't fail fast if a single version fails to resolve. Now, the repo
  gets created as long as at least one version resolves successfully.
  Versions that fail to resolve get logged as warnings instead (unless
  all versions fail to resolve, which is a hard error).
- Use the `--quit` flag when resolving dependencies to reduce logs noise.
I ran into this while working in src-cli. The new code I'm writing is actually (surprise) correct and made this broken behaviour visible.
Selecting a namespace for execution can now be done through the API and UI.

Co-authored-by: Kelli Rockwell <[email protected]>
This PR moves all the executor queue code into the frontend service. The service no longer needs to run as a singleton and we save one proxy layer while talking from the executor to the queue.
I think this is a typo? I am not confident, but it makes more sense to me with the new fix.
* Attempting full explanation of select feature

Per https://sourcegraph.slack.com/archives/CU93UDUBV/p1627335004461700?thread_ts=1627315672.453300&cid=CU93UDUBV — open to pushback if this seems gnarly.

* Italicizing symbol-type
It seems we were using the 2.x branch before, which isn't being
developed. v1.14.8 was released 12 days ago. Additionally it removes
some compiler warnings I get since I am on GCC 10. (fixed upstream in
sqlite).
This way we handle an error if the file is already gone. Noticed it
because we are not setting PATH in cmd test wrapper, so depending on
your environment it might not find "rm". An example is nix where
rm (coreutils) is in a separate bin to sh (bash). We could just specify
PATH, but I thought it's better to just use os.Remove anyways.
This adds a check to handle context errors during repo resolution.

For a very fast global search, it can happen that the context is
canceled before repo resolution is complete, in which case
resolveRepositories returns a wrapped `Context.Canceled`. So far we
returned context errors from repo resolution directly to the user.
…etc. (#33766)

* Made clear that contributing to `enterprise/` code is 100% fine as long as you've signed the CLA.
* Fixed URL to Code of Conduct.
* Make it more clear that the big-scary-wording section about talking to us first is regarding contributing large changes (this is more contributor friendly.)
Fixes the `getPageInfo` throwing a `Unable to determine project name` error when the new navigation is enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet