Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

gomod: update zoekt to include ngram sort optimization#54999

Merged
keegancsmith merged 10 commits into
mainfrom
k/update
Jul 17, 2023
Merged

gomod: update zoekt to include ngram sort optimization#54999
keegancsmith merged 10 commits into
mainfrom
k/update

Conversation

@keegancsmith

Copy link
Copy Markdown
Member

Main motivation is to see the effect on performance for attribution search.

Note that this included a bump in the otel version used since zoekt is using a new version. This had a bit of a cascading effect on our third party deps since they removed a package. So this bumps most 3rd party packages that directly interacted with otel.

The changed commits are
sourcegraph/zoekt@7643f3b...45f608f

Test Plan: tested in the zoekt repo. Our CI will handle the dep updates. I eyeballed them and they all look low risk.

Main motivation is to see the effect on performance for attribution
search.

Note that this included a bump in the otel version used since zoekt is
using a new version. This had a bit of a cascading effect on our third
party deps since they removed a package. So this bumps most 3rd party
packages that directly interacted with otel.

The changed commits are
sourcegraph/zoekt@7643f3b...45f608f

- a176bde1a3 go get -u -t ./...
- e2e8aede00 Fix template documentation comments
- 25c1ea5177 all: observe missing Stats RegexpsConsidered and FlushReason
- 9abbb8b0d3 zoekt-indexserver: Prevent invalid config from causing an NPE
- 008a775ba8 zoekt-indexserver: use value format directive for bad conf warning
- f9d3a0e2e4 zoekt: add fgprof for full profiling
- 3d0bdd5c9c remove ngram offset code
- 45f608ff95 sort ngrams before looking them up

Test Plan: tested in the zoekt repo. Our CI will handle the dep updates.
I eyeballed them and they all look low risk.
@keegancsmith keegancsmith requested a review from stefanhengl July 17, 2023 08:46
@cla-bot cla-bot Bot added the cla-signed label Jul 17, 2023
@sourcegraph-bot

sourcegraph-bot commented Jul 17, 2023

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff f3e9e40...467ad1a.

Notify File(s)
@bobheadxi docker-images/prometheus/cmd/prom-wrapper/mocks/BUILD.bazel
docker-images/prometheus/cmd/prom-wrapper/mocks/mocks_temp.go

@sourcegraph-bot

sourcegraph-bot commented Jul 17, 2023

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in OWNERS files for diff f3e9e40...467ad1a.

Notify File(s)
@mrnugget dev/sg/sg_start_test.go
@sourcegraph/dev-experience dev/sg/sg_start_test.go

Comment thread dev/sg/sg_start_test.go
Comment on lines -85 to +86
"Failed to build test-cmd-1: 'bash -c echo 'booting up horsegraph' && exit 1' failed: booting up horsegraph: exit status 1:",
"Failed to build test-cmd-1: 'bash -c echo 'booting up horsegraph' && exit 1' failed: booting up horsegraph",
": exit status 1:",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know why I needed to update this test, I imagine some sort of tty dependency changed how it detects our test terminal and now newlines happen in a different place? Either way I assume this is a safe update, but cc @mrnugget who likely has context here.

@keegancsmith

Copy link
Copy Markdown
Member Author

FYI I have been blocked since zoekt updated some dependencies... which meant sourcegraph updated some dependencies... which suddenly meant there is some bazel darkarts going on.

@keegancsmith keegancsmith merged commit 766a8e1 into main Jul 17, 2023
@keegancsmith keegancsmith deleted the k/update branch July 17, 2023 13:34
Comment thread go.mod
go.etcd.io/bbolt v1.3.6
go.opentelemetry.io/collector v0.75.0
go.opentelemetry.io/collector/component v0.75.0
go.opentelemetry.io/collector v0.81.0 // indirect

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beat me to the upgrade 😁

Note that this requires an upgrade in the service as well: https://github.com/sourcegraph/sourcegraph/pull/54969/files#diff-c4b85f9a40207f45cc97a051e50a08352bbe2302c44b65911deec373410c4ad1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! Is there a test or something we can add to point out that these need to happen in sync?

@github-actions

Copy link
Copy Markdown
Contributor

The backport to 5.1 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-5.1 5.1
# Navigate to the new working tree
cd .worktrees/backport-5.1
# Create a new branch
git switch --create backport-54999-to-5.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 766a8e13cb499144580f0ec44efbd4fb31399d33
# Push it to GitHub
git push --set-upstream origin backport-54999-to-5.1
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-5.1

Then, create a pull request where the base branch is 5.1 and the compare/head branch is backport-54999-to-5.1.

@github-actions github-actions Bot added backports failed-backport-to-5.1 release-blocker Prevents us from releasing: https://about.sourcegraph.com/handbook/engineering/releases labels Aug 15, 2023
ggilmore pushed a commit that referenced this pull request Aug 15, 2023
Main motivation is to see the effect on performance for attribution
search.

Note that this included a bump in the otel version used since zoekt is
using a new version. This had a bit of a cascading effect on our third
party deps since they removed a package. So this bumps most 3rd party
packages that directly interacted with otel.

The changed commits are
sourcegraph/zoekt@7643f3b...45f608f

- a176bde1a3 go get -u -t ./...
- e2e8aede00 Fix template documentation comments
- 25c1ea5177 all: observe missing Stats RegexpsConsidered and FlushReason
- 9abbb8b0d3 zoekt-indexserver: Prevent invalid config from causing an NPE
- 008a775ba8 zoekt-indexserver: use value format directive for bad conf warning
- f9d3a0e2e4 zoekt: add fgprof for full profiling
- 3d0bdd5c9c remove ngram offset code
- 45f608ff95 sort ngrams before looking them up

Test Plan: tested in the zoekt repo. Our CI will handle the dep updates.
I eyeballed them and they all look low risk.

Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
ggilmore pushed a commit that referenced this pull request Aug 21, 2023
Main motivation is to see the effect on performance for attribution
search.

Note that this included a bump in the otel version used since zoekt is
using a new version. This had a bit of a cascading effect on our third
party deps since they removed a package. So this bumps most 3rd party
packages that directly interacted with otel.

The changed commits are
sourcegraph/zoekt@7643f3b...45f608f

- a176bde1a3 go get -u -t ./...
- e2e8aede00 Fix template documentation comments
- 25c1ea5177 all: observe missing Stats RegexpsConsidered and FlushReason
- 9abbb8b0d3 zoekt-indexserver: Prevent invalid config from causing an NPE
- 008a775ba8 zoekt-indexserver: use value format directive for bad conf warning
- f9d3a0e2e4 zoekt: add fgprof for full profiling
- 3d0bdd5c9c remove ngram offset code
- 45f608ff95 sort ngrams before looking them up

Test Plan: tested in the zoekt repo. Our CI will handle the dep updates.
I eyeballed them and they all look low risk.

Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
ggilmore pushed a commit that referenced this pull request Aug 21, 2023
Main motivation is to see the effect on performance for attribution
search.

Note that this included a bump in the otel version used since zoekt is
using a new version. This had a bit of a cascading effect on our third
party deps since they removed a package. So this bumps most 3rd party
packages that directly interacted with otel.

The changed commits are
sourcegraph/zoekt@7643f3b...45f608f

- a176bde1a3 go get -u -t ./...
- e2e8aede00 Fix template documentation comments
- 25c1ea5177 all: observe missing Stats RegexpsConsidered and FlushReason
- 9abbb8b0d3 zoekt-indexserver: Prevent invalid config from causing an NPE
- 008a775ba8 zoekt-indexserver: use value format directive for bad conf warning
- f9d3a0e2e4 zoekt: add fgprof for full profiling
- 3d0bdd5c9c remove ngram offset code
- 45f608ff95 sort ngrams before looking them up

Test Plan: tested in the zoekt repo. Our CI will handle the dep updates.
I eyeballed them and they all look low risk.

Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
(cherry picked from commit 766a8e1)
burmudar pushed a commit that referenced this pull request Aug 24, 2023
Main motivation is to see the effect on performance for attribution
search.

Note that this included a bump in the otel version used since zoekt is
using a new version. This had a bit of a cascading effect on our third
party deps since they removed a package. So this bumps most 3rd party
packages that directly interacted with otel.

The changed commits are
sourcegraph/zoekt@7643f3b...45f608f

- a176bde1a3 go get -u -t ./...
- e2e8aede00 Fix template documentation comments
- 25c1ea5177 all: observe missing Stats RegexpsConsidered and FlushReason
- 9abbb8b0d3 zoekt-indexserver: Prevent invalid config from causing an NPE
- 008a775ba8 zoekt-indexserver: use value format directive for bad conf warning
- f9d3a0e2e4 zoekt: add fgprof for full profiling
- 3d0bdd5c9c remove ngram offset code
- 45f608ff95 sort ngrams before looking them up

Test Plan: tested in the zoekt repo. Our CI will handle the dep updates.
I eyeballed them and they all look low risk.

Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
jdpleiness pushed a commit that referenced this pull request Aug 24, 2023
…e ngram sort optimization (#56200)

* gomod: update zoekt to include ngram sort optimization (#54999)

Main motivation is to see the effect on performance for attribution
search.

Note that this included a bump in the otel version used since zoekt is
using a new version. This had a bit of a cascading effect on our third
party deps since they removed a package. So this bumps most 3rd party
packages that directly interacted with otel.

The changed commits are
sourcegraph/zoekt@7643f3b...45f608f

- a176bde1a3 go get -u -t ./...
- e2e8aede00 Fix template documentation comments
- 25c1ea5177 all: observe missing Stats RegexpsConsidered and FlushReason
- 9abbb8b0d3 zoekt-indexserver: Prevent invalid config from causing an NPE
- 008a775ba8 zoekt-indexserver: use value format directive for bad conf warning
- f9d3a0e2e4 zoekt: add fgprof for full profiling
- 3d0bdd5c9c remove ngram offset code
- 45f608ff95 sort ngrams before looking them up

Test Plan: tested in the zoekt repo. Our CI will handle the dep updates.
I eyeballed them and they all look low risk.

Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>

* search: update zoekt with removal of RepositoryRankRequest (#54394)

This endpoint was unused which was why it was removed in Zoekt. The
changes from Zoekt included in this dep bump:

- 1686b50d50 indexserver: remove unused GetRepoRank
- 7078a585a9 shards: populate RepoList.Stats.Repos
- b9e6d9433e zoekt-indexserver: Check stderr for git fetch
- 93f7b0c983 matchtree: capture Stats before pruning
- 7643f3b313 matchiter: capture metric NgramLookups

Test Plan: CI

* fix bazel deps and patches

* fix bad merge and update backcompat zoekt

* update go.sum for github.com/jackc/pgproto3/v2

* fix go.sum dependency

* restore backcompat throttled repo

* Revert "restore backcompat throttled repo"

This reverts commit e5f66b3.

* Fix backcompat by porting #54748

* allow mozilla 2.0 license for retryablehttp

---------

Co-authored-by: Keegan Carruthers-Smith <keegan.csmith@gmail.com>
Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
Co-authored-by: ggilmore <geoffrey@sourcegraph.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backports cla-signed release-blocker Prevents us from releasing: https://about.sourcegraph.com/handbook/engineering/releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants