Commit Graph

1616 Commits

Author SHA1 Message Date
Tomás Senart
b90715a2e7
reposource: Fix Maven dependency parsing (#34692)
This commit fixes Maven dependency parsing. Yesterday's fix was
incomplete, in that it kept using a reposource.ParseMavenModule that
needed to be changed to parse dependencies from the DB with the
canonical `:` separator.

We add a backend integration test that exercises this code path to
prevent future regressions.
2022-04-29 12:47:23 +02:00
Valery Bugakov
35d47fea57
web: drop ts-morph package (#34685) 2022-04-29 05:37:16 +00:00
Jean-Hadrien Chabran
84789af7bb
ci: Report deployment metrics to OkayHQ (#34037) 2022-04-27 20:47:51 +02:00
Crystal Augustus
6b810e89ab
Update helm chart references, release tooling command (#34572) 2022-04-27 14:00:31 -04:00
Jean-Hadrien Chabran
db390c7771
sg: fix db add-user incorrect flags (#34581) 2022-04-27 10:36:18 -07:00
Ryan Slade
dd4c805e5b
Replace os.MkdirTemp in tests with t.TempDir() (#34590)
That way we don't need to worry about cleaning up the temp directory ourselves.
2022-04-27 16:08:29 +00:00
Noah S-C
b071fb8103
nix: postgres listen on localhost (#34464) 2022-04-27 15:34:18 +01:00
coury-clark
75d8242994
3.39.1 release config (#34544) 2022-04-26 23:12:43 +00:00
Jean-Hadrien Chabran
2ce358cfb1
sg: make firewall flag default depends on OS (#34517) 2022-04-26 15:49:55 +00:00
Jean-Hadrien Chabran
2855f327c7
sg: finer grained .bin/ detection for FW (#34501) 2022-04-26 14:15:08 +02:00
Robert Lin
0a74ce93bc
dev/sg: fix macos firewall exceptions (#34475) 2022-04-26 08:35:54 +02:00
Varun Gandhi
49e1b5e9dc
sg: Fix missing propagation for debug log level. (#34487) 2022-04-25 23:22:19 -07:00
Crystal Augustus
ec488f0d5f
Update helm chart reference to latest version (#34441)
* Reference latest helm chart version in docs

* Update release tooling
2022-04-25 09:22:19 -06:00
Thorsten Ball
8b07d12cdb
sg: disable oh-my-zsh auto-updates when reloading shell env (#34364)
This caused problems before for oh-my-zsh users in the form of `sg
start` being stuck, because the checks it runs restarted ZSH under the
hood and oh-my-zsh was waiting for user input ("Do you want to update
oh-my-zsh?").

This fixes #33431.
2022-04-22 15:40:16 +00:00
Philipp Spiess
55f02b78de Ignore gradle files for shellcheck 2022-04-22 14:39:14 +02:00
Tom Ross
ba62261f2c
Integration tests: Suppress Chromium install log (and other Percy noise that isn't errors) (#34343) 2022-04-22 11:46:19 +01:00
Keegan Carruthers-Smith
72c2c55748
dev: go-test only looks for go.mod files (#34326)
I missed this in the previous commit. We also need to do this for
go-test.

Test Plan: ran the find incantation on both linux and mac. Both agreed
and found all go.mod files.
2022-04-22 06:51:48 +00:00
Keegan Carruthers-Smith
e1bb4b1808
dev: go-lint only looks for go.mod files (#34325)
We had "-type file" which broke since this doesn't work on linux. This
was removed, but now we get a test directory called go.mod matching
which is incorrect. This adds back the find condition, but correctly
works on both mac and linux.

  $ diff <(find . -name go.mod -type f) <(find . -name go.mod)
  1a2
  > ./internal/codeintel/dependencies/internal/lockfiles/testdata/parse/go.mod

Test Plan: ran the find incantation on both linux and mac. Both agreed
and found all go.mod files.
2022-04-22 08:38:35 +02:00
Crystal Augustus
c3b2f8a89c
MI upgrades are handled by devops team now (#34272) 2022-04-21 17:06:16 -04:00
Cristina Birkel
79b849c616
insights: Add integration tests for dashboards (#34196) 2022-04-21 15:46:04 -04:00
Robert Lin
74ebfb7b6a
dev: fix golangci-lint, re-enable depguard, disable nolintlint (#34298)
Co-authored-by: Eric Fritz <eric@eric-fritz.com>
2022-04-21 19:37:04 +00:00
Thorsten Ball
699d559a8a
sg: improve welcome screen of 'sg setup' drastically (#34281) 2022-04-21 17:24:34 +02:00
Thorsten Ball
470f505d2e
sg: run "chmod +x" if executable has been updated (#34269) 2022-04-21 15:16:43 +02:00
Tom Ross
ceb72ab5bf
CI: Reduce log spam in CI to fix errors with Buildkite reporting (#34262) 2022-04-21 13:02:23 +01:00
GitStart-SourceGraph
857625aa9b
[SG-33416] Improve discoverability of the storybook preview link (#34031)
* Shell script to get Storybook preview url from Chromatic publish output and add it into App Preview section in PR description
2022-04-21 15:29:22 +07:00
Keegan Carruthers-Smith
c11d987eba
dev/release: update config for v3.40.0 (#34244) 2022-04-21 10:17:29 +02:00
Keegan Carruthers-Smith
5a32d03e28
sg: fix panic when docker.GetCredentialsFromStore errors (#34225)
Previously we always set dockerCredentials from the store. However, if
that failed, that means dockerCredentials would become nil. We then
wrote to it. This commit instead uses an intermediate variable.

Note: this may have worked in the past and regressed due to the docker
dependency being updated.

Test Plan: I don't get a panic when releasing 3.39
2022-04-20 23:17:49 +02:00
Keegan Carruthers-Smith
948ede656b
dev/release: update version in all tsx files in about repo (#34224)
My last commit failed because I forgot to remove get-started.tsx. Lets
just make this run on all tsx files rather than what seems to be a
fragile allow list.

Test Plan: I will actually test this before landing as described in the
previous commit. I landed due to the main check.
2022-04-20 20:07:39 +00:00
Keegan Carruthers-Smith
4a15ef3a55
dev/release: stage updates Install component in about (#34223)
The about repository had a change which moved the version string from
website/src/components/GetStarted.tsx to
website/src/components/Install/index.tsx in b08d333. Without this update
the stage command fails (and is currently failing while I am doing this
release).

Test Plan: running stage command with this commit and it works.
2022-04-20 19:50:30 +00:00
Keegan Carruthers-Smith
8909160892
dev/release: support reference clones for other repos (#34222)
The recent commit which added --reference-if-able assumed we always
cloned sourcegraph/sourcegraph. However, commands such as "yarn release
release:stage" clone the about repo. We didn't fail in those cases, but
by adjusting how we pick the reference we will often get the same
benefits.

Test Plan: dry run without main branch check then ran the release
command.
2022-04-20 21:45:17 +02:00
Keegan Carruthers-Smith
a9b30a88f4
dev/release: reference local clone when cloning (#34168)
This drastically speeds up operations for me. Cloning the Sourcegraph
repo takes a minute or two for me thanks to Cape Town being a bit too
far from GitHub's data centers.

Reference will avoid fetching objects that are already in the local
clone. We use the -if-able variant just in case things go wrong, then we
still proceed with the normal clone (if not a little slower).

Test Plan: dry run without main branch check then ran the release
command. Total time was 28s instead of 1m38s.
2022-04-20 19:44:34 +02:00
Keegan Carruthers-Smith
3d4738b04a
dev/release: specify clone with depth 1 instead of 10 (#34166)
10 seems like a weird magic number copy pasted from somewhere. The
operations we do on the repo don't seem like they need more than the
latest commit.

Test Plan: dry run for tags and commented out main branch check.
Then ran "yarn release release:create-candidate 3"
2022-04-20 19:06:01 +02:00
GitStart-SourceGraph
403ef1afbd
[SG-33486] Periodically clean up old preview services (#33859)
* feat: prepare github action and script to clean up render.com pr preview

Co-authored-by: gitstart-sourcegraph <gitstart@users.noreply.github.com>
2022-04-20 21:44:57 +07:00
Tomás Senart
a2cc80c112
search: Remove NPM specific alerts and warnings (#34046)
This commit removes NPM specific warnings from dependencies
search snippets and modifies the respective search alerts to work for Go
dependency repos too.
2022-04-19 14:11:24 +00:00
Thorsten Ball
b70728ba06
sg: update binary correctly instead of renaming file (#33957)
Linux users on Slack reported that `sg update` produces this error:

    >  sg update
    error: rename /tmp/sg1226370089/sg /home/fkling/.local/bin/sg: invalid cross-device link

As Geoffrey pointed out:

> rename only works within the same filesystem. I think the implementation should just copy / delete the file instead.

And the [man page for rename](https://linux.die.net/man/2/rename) says:

> oldpath and newpath are not on the same mounted file system. (Linux permits a file system to be mounted at multiple points, but rename() does not work across different mount points, even if the same file system is mounted on both.)

So what this here does is to use code from `gitserver` that does an
in-place update of a file safele. I extracted the code into an
`internal/fileutil` package (couldn't think of a better name).

The code avoids the across-filesystem problem by creating a temp file
next to the destination file. And it also does more things, like making
sure the changes are synced to the filesystem.
2022-04-15 08:52:07 +02:00
Robert Lin
d8176d40f3
dev/sg: levenshtein suggestions when subcommand not found (#33943)
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2022-04-15 05:44:43 +00:00
Andre Eleuterio
d7f2d1dce0
Update base alpine images (#33938)
* Upgrade base alpine

* Upgrade base alpine 3.14
2022-04-14 17:37:12 -03:00
Robert Lin
685e4b6555
dev/sg: remove global secrets store (#33917) 2022-04-14 09:41:56 -07:00
Robert Lin
49668a24b5
dev/sg: remove globalConf, extract Config into sgconf (#33882) 2022-04-14 09:01:54 -07:00
Robert Lin
71f56507ac
dev/sg: detect completion mode and omit setup (#33874) 2022-04-14 09:46:38 +02:00
Valery Bugakov
868472f43e
ci: run client linters on changed files (#33701) 2022-04-14 00:37:25 -07:00
Robert Lin
d1a0fd7ad1
dev/ci: fetch before update/changelog check, remove debug print (#33868) 2022-04-13 17:55:29 +00:00
Robert Lin
bae8ecd70b
dev/sg: fix sg ci logs --build (#33867) 2022-04-13 11:50:09 -06:00
Robert Lin
fc1e1b36e0
dev/sg: improve update clarity, fix changelog (#33860) 2022-04-13 17:23:17 +00:00
Jean-Hadrien Chabran
19c23673b3
ci: remove codeinsights db vestigial from script (#33852) 2022-04-13 17:11:19 +00:00
Robert Lin
3fce7bcde6
dev/sg: command, flag, and argument autocompletions (#33817)
Adds a new dependency in `sg setup` that writes the appropriate completion script for your shell into `~/.sourcegraph` and adds a line to your shell config to use the completion script. Completions are generated by `sg` itself, so there is no need to be able to update this script (and if we do need to update it, we can consider a migration path then)

`urfave/cli` completions work by providing command suggestions by default, and if you use `-` <tab><tab> you can get flag completions as well.

Also adds:

1. Custom completions based on config for `sg start`, `sg run`, `sg test`
2. Custom completions based on valid values for`sg live`, `sg ci build`
2022-04-13 09:55:09 -07:00
Robert Lin
a8f4c52f1b
dev/sg: make 'sg install' nicer to use for local dev (#33822) 2022-04-13 09:54:11 -07:00
Robert Lin
1dd80520db
dev/ci: only asdf install go in pipeline gen (#33853)
Cuts the pipeline generation step from ~60s to ~25s - doing a fresh asdf install golang seems significantly faster than using the asdf tools cache.

Together with #33821 , this significantly reduces the time it takes for builds to get to an "actually running" state (~120s -> ~50s)
2022-04-13 09:53:10 -07:00
Eric Fritz
846786f057
migration: Fix flaky TestIndexStatus (#33843) 2022-04-13 10:16:52 -05:00
Robert Lin
66062653ce
dev/sg: migrate to urfave/cli (#33758)
This enables better flag handlers, a nicer way to build commands, aliases for commands and flags, and more!
2022-04-13 14:57:29 +00:00