Commit Graph

46 Commits

Author SHA1 Message Date
Christoph Hegemann
4abbc07621
Uses src code-intel over the deprecated src lsif (#59577)
uses `src code-intel` over the deprecated `src lsif`
2024-01-15 11:45:56 +01:00
Thorsten Ball
75cc2d1141
syntax-highlighter: add cargo clippy to bazel builds and fix warnings (#58096)
Co-authored-by: Jean-Hadrien Chabran <jean-hadrien.chabran@sourcegraph.com>
2023-11-07 11:54:03 +01:00
Varun Gandhi
87e35d71af
chore: Delete commented out code (#57395) 2023-10-05 14:25:05 -07:00
Eric Fritz
e04d225bf7
codenotify: dr. fritz is kil (#57313) 2023-10-03 16:19:55 +00:00
Jean-Hadrien Chabran
54005e461f
Allow to run e2e tests locally (#55998)
Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch>
Co-authored-by: William Bezuidenhout <william.bezuidenhout@sourcegraph.com>
2023-08-29 11:08:47 -05:00
Eric Fritz
0889c891db
codeintel: Make codenav results more consistent (#54410) 2023-08-09 00:30:07 +00:00
Jean-Hadrien Chabran
58da6780d7
Switch to OCI/Wolfi based image (#52693)
This PR ships our freshly rewritten container images built with
rules_oci and Wolfi, which for now will only be used on S2.

*What is this about*

This work is the conjunction of [hardening container
images](https://github.com/orgs/sourcegraph/projects/302?pane=issue&itemId=25019223)
and fully building our container images with Bazel.

* All base images are now distroless, based on Wolfi, meaning we fully
control every little package version and we won't be subject anymore to
Alpine maintainers dropping a postgres version for example.

* Container images are now built with `rules_oci`, meaning we don't have
Dockerfile anymore, but instead created through [Bazel
rules](https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph@bzl/oci_wolfi/-/blob/enterprise/cmd/gitserver/BUILD.bazel).
Don't be scared, while this will look a bit strange to you at first,
it's much saner and simpler to do than our Dockerfiles and their muddy
shell scripts calling themselves in cascade.


:spiral_note_pad:  *Plan*:

*1/ (NOW) We merge our branch on `main` today, here is what it does
change for you 👇:skin-tone-3::*

* On `main`: 
* It will introduce a new job on `main` _Bazel Push_, which will push
those new images on our registries with all tags prefixed by `bazel-`.
    * These new images will be picked up by S2 and S2 only. 
* The existing jobs building docker images and pushing them will stay in
place until we have QA'ed them enough and are confident to roll them out
on Dotcom.
* Because we'll be building both images, there will be more jobs running
on `main`, but this should not affect the wall clock time.
* On all branches (so your PRs and `main`)
* The _Bazel Test_ job will now run: Backend Integration Tests, E2E
Tests and CodeIntel QA
* This will increase the duration of your test jobs in PRs, but as we
haven't removed yet the `sg lint` step, it should not affect too much
the wall clock time of your PRs.
* But it will also increase your confidence toward your changes, as the
coverage will vastly increased compared to before.
* If you have ongoing branches which are affecting the docker images
(like adding a new binary, like the recent `scip-tags`, reach us out on
#job-fair-bazel so we can help you to port your changes. It's much much
simpler than before, but it's going to be unfamiliar to you).

* If something goes awfully wrong, we'll rollback and update this
thread.

*2/ (EOW / Early next week) Once we're confident enough with what we saw
on S2, we'll roll the new images on Dotcom.*

* After the first successful deploy and a few sanity checks, we will
drop the old images building jobs.
* At this point, we'll reach out to all TLs asking for their help to
exercise all features of our product to ensure we catch any potential
breakage.



## Test plan

<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->


* We tested our new images on `scale-testing` and it worked.
* The new container building rules comes with _container tests_ which
ensures that produced images are containing and configured with what
should be in there:
[example](https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph@bzl/oci_wolfi/-/blob/enterprise/cmd/gitserver/image_test.yaml)
.

---------

Co-authored-by: Dave Try <davetry@gmail.com>
Co-authored-by: Will Dollman <will.dollman@sourcegraph.com>
2023-06-02 12:12:52 +02:00
Cesar Jimenez
10951c31ac
[language platform] Updates failing QA tests (#51669)
This PR updates some missed QA tests.

## Test plan
Manually tested as well as updated QA tests.
<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->
2023-05-11 09:15:31 -06:00
Stephen Gutekanst
61f8b78c9c
codeintel-qa: pass $HOME / $USER through to src-cli (#50209)
If using a binary release of src-cli, it is not possible to run the
codeintel-qa test suite because `src` is not built with CGO and `$HOME`
and `$USER` are not passed through in the environment, leading to a
`user.Current` error.

This fixes the issue.

Helps #49865

## Test plan

Ran `go run ./cmd/upload`

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
2023-03-30 23:57:38 +00:00
Eric Fritz
e05576d12d
codeintel: Remove unused GraphQL resolvers (#49481) 2023-03-16 15:30:01 -05:00
Eric Fritz
988a8569ac
codeintel: Remove oobmigration step from codeintel-qa (#47714) 2023-02-17 13:45:00 -06:00
Eric Fritz
a528304b51
codeintel: Register SCIP oobmigration (#45106) 2023-01-23 14:24:44 +00:00
Jean-Hadrien Chabran
bc5490c4bb
bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
Eric Fritz
8a2ee34ae5
codeintel: Revert codeintel-qa bucket until SCIP tests are relevant (#46578) 2023-01-17 15:54:04 +00:00
Eric Fritz
a9fdbf3181
codeintel-qa: Remove bash (#46300) 2023-01-11 13:47:50 +00:00
Eric Fritz
ba779e9b26
codeintel-qa: Fix working directory in scripts (#45093) 2022-12-02 13:12:26 -06:00
Keegan Carruthers-Smith
27569d1fc7
all: run gofmt -s -w from 1.19 (#41629)
gofmt in go1.19 does a lot of reformating of godoc strings, mostly to
make them more consistent around lists.

Test Plan: CI
2022-09-13 07:44:06 +00:00
Noah S-C
84264dc162
dump lsif_configuration_policies (#39486) 2022-07-27 08:23:31 -05:00
Noah S-C
fc570afc99
codeintel: qa - sort monitored uploads, not just IDs (#38935) 2022-07-18 12:32:48 +00:00
Eric Fritz
64ca7ba975
codeintel-qa: Clean up debugging output (#38895) 2022-07-15 17:40:15 +00:00
Noah S-C
424ef05b1a
gqltest: allow writing of request and response bodies to a sink (#38841) 2022-07-14 22:33:04 +01:00
Eric Fritz
55e56dd5f7
codeintel-qa: Run pg_dump inside server image (#38821) 2022-07-14 18:40:11 +01:00
Noah S-C
76342deaed
[debug] codeintel: print stderr of pg_dump (#38803) 2022-07-14 12:27:39 +00:00
Eric Fritz
1ff13c4f9c
codeintel-qa: Add pg_dump to output (#38775) 2022-07-14 00:01:37 +00:00
Noah S-C
eb58e18c0e
[debug] codeintel: print uploads IDs where possible (#38748) 2022-07-13 15:00:57 +00:00
Noah S-C
da45fb3618
[debug] codeintel: dump raw uploads state in codeintel-qa (#38723) 2022-07-13 13:25:01 +01:00
Ryan
a810cccb2b
Update language for manage repos to manage code hosts (#38704) 2022-07-13 09:29:28 +02:00
Noah S-C
979148a999
codeintel: re-enable qa with audit logs dumping (#38554) 2022-07-11 17:44:16 -07:00
Varun Gandhi
9577d0736a
ci(flake): Disable test properly. (#37738) 2022-06-27 11:28:52 +02:00
Varun Gandhi
ecd29b4503
ci(flake): Skip codeintel QA upload test. (#37672) 2022-06-24 10:41:25 +02:00
Varun Gandhi
7b33210353
docs: Replace src lsif with src code-intel. (#37389) 2022-06-17 17:32:43 +00:00
Keegan Carruthers-Smith
18f487ccaa
all: use any instead of interface{} (#35102)
Now that we require go1.18, we can use a builtin type alias for
"interface{}": "any". I've updated all code except lib, which can be
imported by external modules. That is currently pinned at go1.16.
Additionally I had to rerun generate since rewriting generated go code
will fail CI.

  find -name '*.go' | xargs gofmt -s -r 'interface{} -> any' -w
  git checkout lib
  go generate ./...

Test Plan: CI will exercise that the code still compiles. Otherwise this
is a noop.
2022-05-09 10:59:39 +02:00
Eric Fritz
fc9c2816d3
codeintel: Add -allow-dirty-instance to codeintel-qa test (#35024) 2022-05-05 22:25:30 +00:00
Eric Fritz
72fc8aac75
codeintel-qa: Add clear command (#34936) 2022-05-05 19:13:59 +01:00
Eric Fritz
2fe31486ab
codeintel: Add instance state check on query failures in codeintel-qa (#34874) 2022-05-04 04:49:26 -05:00
Thorsten Ball
8d3e231322
golangci-lint: enable unparam linter (#31856)
Team work makes the linter dream work.

Co-authored-by: Varun Gandhi <varun.gandhi@sourcegraph.com>
2022-02-28 15:31:44 +01:00
Keegan Carruthers-Smith
039b26201f
all: replace regexp with grafana/regexp (#30948)
grafana/regexp's speedup branch contains the stdlib regexp with multiple
patches applied to speed up regexp. The benchmark improvements are quite
impressive across the board. The series of patches are being considered
for inclusion in golang. I took a look over them, and they look legit
enough for us to start using it.

This commit replaces all uses of regexp with grafana/regexp. This
replacement was done via a simple string replace on

  ^\s*"regexp"

Followed by goimports -w across the repository. I then manually
inspected each result to ensure it was on an import.
2022-02-14 09:08:21 +00:00
Eric Fritz
33c71b3fba
codeintel: Fix race condition in upload expirer (#30546) 2022-02-10 19:43:50 +00:00
Eric Fritz
7148009913
errors: Introduce internal package (#30558) 2022-02-07 15:03:45 +00:00
Eric Fritz
4d2a39d303
lint: Fix fmt.Errorf guard (#30604) 2022-02-03 14:56:55 +00:00
Eric Fritz
1be560d16d
migrations: Small refactor to runner package (#30428) 2022-01-31 14:47:48 -07:00
Eric Fritz
67482d8f13
codeintel-qa: Fix concurrent map read/write (take 2) (#26604) 2021-10-25 14:31:32 -05:00
Eric Fritz
1a6fe87eba
codeintel-qa: Fix concurrent map read/write (#26597) 2021-10-25 17:57:55 +00:00
Chris Wendt
9169054db9
codeintel-qa: print stats by repo on failure (#25818) 2021-10-08 19:15:15 -06:00
Chris Wendt
a993190368
codeintel-qa: more descriptive failure message (#25806) 2021-10-07 14:00:26 -06:00
Eric Fritz
95cbf3c85a
codeintel-qa: Rewrite precise-code-intel-tester (#25412) 2021-10-04 09:46:24 -05:00