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

Remove dependency search #39742

Merged
merged 10 commits into from Aug 1, 2022
Merged

Remove dependency search #39742

merged 10 commits into from Aug 1, 2022

Conversation

mrnugget
Copy link
Contributor

@mrnugget mrnugget commented Aug 1, 2022

Short version

We currently don't have the time and resources to properly invest in dependency enough to make it both a feature that's useful for customers and one that meets our technical bar.

We use version control. There's no advantage to keeping code around "in case we need it again" (we can always restore using git), but multiple disadvantages (people stumble on this code and wonder whether/how it's used, it needs to be maintained, its tests take up runtime, ...).

So that's why we're removing it.

Longer version

As @sqs announced, dep search is one of the "things we are saying NO to as we look to 4.0".

It might come because, because we're saying No "(until it can be done solidly, which is not now)".

I myself wrote on Slack:

I’ve had multiple conversations with @sqs about this in the past week
and we came to the conclusion that in order to make dependency search a
useful feature we’re proud of, we’d need to invest a lot more time and
resources. But now is not a good time to do that. We have other problems
to solve right now that are higher-priority than adding a new feature
we’re unsure about.

Even if I were to continue working on Dependency Search for the next,
say, 6 months, it’s unclear whether Dependency Search in its current
“architecture” (in the product and in the technical sense) is what would
solve some important customer problems. We would maybe need to rethink
it from the ground up. For example: focus on reverse-dependency search
from the beginning, or focus more on “search dependency relationships”
instead of “search inside dependencies”. Or, in the words of @eric
Fritz: “the lego bricks don’t seem to line up”.

So, here we go, let's remove the code :)

Technicalities

  • It drops all of the database tables used by dependency search It keeps the tables around until the next release, to be backwards-compatible.
  • It removes all of the code used for dependency search: backend,
    frontend, ...
  • It removes docs
  • It removes the feature/site-config flag
  • It does NOT remove the code in ./internal/codeintel/dependencies
    that's used for packages.

Test plan

@cla-bot cla-bot bot added the cla-signed label Aug 1, 2022
@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented Aug 1, 2022

Codenotify: Notifying subscribers in CODENOTIFY files for diff 480ecee...1a8bc57.

Notify File(s)
@Strum355 internal/codeintel/dependencies/background/indexer/config.go
internal/codeintel/dependencies/background/indexer/iface.go
internal/codeintel/dependencies/background/indexer/indexer.go
internal/codeintel/dependencies/background/indexer/init.go
internal/codeintel/dependencies/background/resolver/config.go
internal/codeintel/dependencies/background/resolver/iface.go
internal/codeintel/dependencies/background/resolver/init.go
internal/codeintel/dependencies/background/resolver/resolver.go
internal/codeintel/dependencies/iface.go
internal/codeintel/dependencies/init.go
internal/codeintel/dependencies/internal/lockfiles/dependency_graph.go
internal/codeintel/dependencies/internal/lockfiles/dependency_graph_test.go
internal/codeintel/dependencies/internal/lockfiles/errors.go
internal/codeintel/dependencies/internal/lockfiles/go.go
internal/codeintel/dependencies/internal/lockfiles/go_test.go
internal/codeintel/dependencies/internal/lockfiles/iface.go
internal/codeintel/dependencies/internal/lockfiles/init.go
internal/codeintel/dependencies/internal/lockfiles/mocks_test.go
internal/codeintel/dependencies/internal/lockfiles/npm.go
internal/codeintel/dependencies/internal/lockfiles/observability.go
internal/codeintel/dependencies/internal/lockfiles/parser.go
internal/codeintel/dependencies/internal/lockfiles/parser_test.go
internal/codeintel/dependencies/internal/lockfiles/pipfile.go
internal/codeintel/dependencies/internal/lockfiles/poetry.go
internal/codeintel/dependencies/internal/lockfiles/service.go
internal/codeintel/dependencies/internal/lockfiles/service_test.go
internal/codeintel/dependencies/internal/lockfiles/testdata/dependencygraph/circular-root.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/dependencygraph/circular.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/dependencygraph/normal.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/Pipfile.lock/Pipfile_duplicates.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/Pipfile.lock/Pipfile_duplicates.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/Pipfile.lock/Pipfile_pypa_pypenv.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/Pipfile.lock/Pipfile_pypa_pypenv.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/Pipfile.lock/Pipfile_pypa_pypenv_example.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/Pipfile.lock/Pipfile_pypa_pypenv_example.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/go.mod/go_real_world.mod
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/go.mod/go_real_world.mod.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/go.mod/go_real_world_with_replace_and_exclude.mod
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/go.mod/go_real_world_with_replace_and_exclude.mod.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/poetry.lock/textualize_rich.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/poetry.lock/textualize_rich.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_graph.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_graph.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_many.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_many.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_multiple_versions.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_multiple_versions.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_normal.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_normal.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_react.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_react.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_realworld.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_realworld.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_many.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_many.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_normal.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_normal.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_react.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_react.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_with_dev.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_with_dev.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_with_dev.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_with_dev.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_with_npm.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_with_npm.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/svc/TestListDependencies/go.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/svc/TestListDependencies/npm.golden
internal/codeintel/dependencies/internal/lockfiles/yarn.go
internal/codeintel/dependencies/internal/lockfiles/yarn_test.go
internal/codeintel/dependencies/internal/store/scan.go
internal/codeintel/dependencies/internal/store/store.go
internal/codeintel/dependencies/internal/store/store_test.go
internal/codeintel/dependencies/live/git.go
internal/codeintel/dependencies/live/init.go
internal/codeintel/dependencies/live/syncer.go
internal/codeintel/dependencies/mocks_test.go
internal/codeintel/dependencies/observability.go
internal/codeintel/dependencies/service.go
internal/codeintel/dependencies/service_test.go
internal/codeintel/dependencies/shared/types.go
internal/codeintel/dependencies/transport/graphql/lockfile_index_connection_resolver.go
internal/codeintel/dependencies/transport/graphql/lockfile_index_resolver.go
internal/codeintel/dependencies/transport/graphql/resolver.go
internal/codeintel/policies/internal/store/store_configuration.go
internal/codeintel/policies/internal/store/store_configuration_test.go
internal/codeintel/policies/shared/types.go
internal/codeintel/stores/dbstore/configuration_policies.go
internal/codeintel/stores/dbstore/configuration_policies_test.go
internal/codeintel/stores/dbstore/uploads.go
internal/codeintel/stores/dbstore/uploads_test.go
internal/codeintel/uploads/background/expiration/upload_expirer.go
@beyang internal/search/alert/observer.go
internal/search/job/jobutil/job.go
internal/search/query/predicate.go
internal/search/query/predicate_test.go
internal/search/query/types.go
internal/search/repos/repos.go
internal/search/types.go
@camdencheek internal/search/alert/observer.go
internal/search/job/jobutil/job.go
internal/search/query/predicate.go
internal/search/query/predicate_test.go
internal/search/query/types.go
internal/search/repos/repos.go
internal/search/types.go
@efritz client/web/src/enterprise/codeintel/configuration/components/LockfileIndexSettings.tsx
client/web/src/enterprise/codeintel/configuration/components/LockfileIndexingPolicyDescription.tsx
client/web/src/enterprise/codeintel/configuration/hooks/types.tsx
client/web/src/enterprise/codeintel/configuration/hooks/usePolicyConfigurationById.tsx
client/web/src/enterprise/codeintel/configuration/hooks/useSavePolicyConfiguration.tsx
client/web/src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPage.story.tsx
client/web/src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPage.tsx
client/web/src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPolicyPage.story.tsx
client/web/src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPolicyPage.tsx
client/web/src/enterprise/codeintel/lockfiles/components/CodeIntelLockfileIndexNode.module.scss
client/web/src/enterprise/codeintel/lockfiles/components/CodeIntelLockfileIndexNode.tsx
client/web/src/enterprise/codeintel/lockfiles/components/EmptyLockfiles.tsx
client/web/src/enterprise/codeintel/lockfiles/pages/CodeIntelLockfilePage.tsx
client/web/src/enterprise/codeintel/lockfiles/pages/CodeIntelLockfilesPage.module.scss
client/web/src/enterprise/codeintel/lockfiles/pages/CodeIntelLockfilesPage.tsx
client/web/src/enterprise/codeintel/lockfiles/pages/queries.ts
cmd/frontend/graphqlbackend/codeintel.go
cmd/worker/internal/codeintel/dependencies_job.go
cmd/worker/shared/main.go
enterprise/cmd/frontend/internal/codeintel/resolvers/graphql/configuration_policy.go
enterprise/cmd/frontend/internal/codeintel/resolvers/graphql/resolver.go
internal/codeintel/dependencies/background/indexer/config.go
internal/codeintel/dependencies/background/indexer/iface.go
internal/codeintel/dependencies/background/indexer/indexer.go
internal/codeintel/dependencies/background/indexer/init.go
internal/codeintel/dependencies/background/resolver/config.go
internal/codeintel/dependencies/background/resolver/iface.go
internal/codeintel/dependencies/background/resolver/init.go
internal/codeintel/dependencies/background/resolver/resolver.go
internal/codeintel/dependencies/iface.go
internal/codeintel/dependencies/init.go
internal/codeintel/dependencies/internal/lockfiles/dependency_graph.go
internal/codeintel/dependencies/internal/lockfiles/dependency_graph_test.go
internal/codeintel/dependencies/internal/lockfiles/errors.go
internal/codeintel/dependencies/internal/lockfiles/go.go
internal/codeintel/dependencies/internal/lockfiles/go_test.go
internal/codeintel/dependencies/internal/lockfiles/iface.go
internal/codeintel/dependencies/internal/lockfiles/init.go
internal/codeintel/dependencies/internal/lockfiles/mocks_test.go
internal/codeintel/dependencies/internal/lockfiles/npm.go
internal/codeintel/dependencies/internal/lockfiles/observability.go
internal/codeintel/dependencies/internal/lockfiles/parser.go
internal/codeintel/dependencies/internal/lockfiles/parser_test.go
internal/codeintel/dependencies/internal/lockfiles/pipfile.go
internal/codeintel/dependencies/internal/lockfiles/poetry.go
internal/codeintel/dependencies/internal/lockfiles/service.go
internal/codeintel/dependencies/internal/lockfiles/service_test.go
internal/codeintel/dependencies/internal/lockfiles/testdata/dependencygraph/circular-root.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/dependencygraph/circular.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/dependencygraph/normal.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/Pipfile.lock/Pipfile_duplicates.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/Pipfile.lock/Pipfile_duplicates.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/Pipfile.lock/Pipfile_pypa_pypenv.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/Pipfile.lock/Pipfile_pypa_pypenv.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/Pipfile.lock/Pipfile_pypa_pypenv_example.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/Pipfile.lock/Pipfile_pypa_pypenv_example.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/go.mod/go_real_world.mod
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/go.mod/go_real_world.mod.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/go.mod/go_real_world_with_replace_and_exclude.mod
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/go.mod/go_real_world_with_replace_and_exclude.mod.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/poetry.lock/textualize_rich.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/poetry.lock/textualize_rich.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_graph.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_graph.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_many.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_many.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_multiple_versions.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_multiple_versions.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_normal.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_normal.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_react.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_react.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_realworld.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_realworld.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_many.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_many.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_normal.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_normal.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_react.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_react.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_with_dev.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_v2_with_dev.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_with_dev.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_with_dev.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_with_npm.lock
internal/codeintel/dependencies/internal/lockfiles/testdata/parse/yarn.lock/yarn_with_npm.lock.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/svc/TestListDependencies/go.golden
internal/codeintel/dependencies/internal/lockfiles/testdata/svc/TestListDependencies/npm.golden
internal/codeintel/dependencies/internal/lockfiles/yarn.go
internal/codeintel/dependencies/internal/lockfiles/yarn_test.go
internal/codeintel/dependencies/internal/store/scan.go
internal/codeintel/dependencies/internal/store/store.go
internal/codeintel/dependencies/internal/store/store_test.go
internal/codeintel/dependencies/live/git.go
internal/codeintel/dependencies/live/init.go
internal/codeintel/dependencies/live/syncer.go
internal/codeintel/dependencies/mocks_test.go
internal/codeintel/dependencies/observability.go
internal/codeintel/dependencies/service.go
internal/codeintel/dependencies/service_test.go
internal/codeintel/dependencies/shared/types.go
internal/codeintel/dependencies/transport/graphql/lockfile_index_connection_resolver.go
internal/codeintel/dependencies/transport/graphql/lockfile_index_resolver.go
internal/codeintel/dependencies/transport/graphql/resolver.go
internal/codeintel/policies/internal/store/store_configuration.go
internal/codeintel/policies/internal/store/store_configuration_test.go
internal/codeintel/policies/shared/types.go
internal/codeintel/stores/dbstore/configuration_policies.go
internal/codeintel/stores/dbstore/configuration_policies_test.go
internal/codeintel/stores/dbstore/uploads.go
internal/codeintel/stores/dbstore/uploads_test.go
internal/codeintel/uploads/background/expiration/upload_expirer.go
@fkling client/search-ui/src/input/extensions/completion.test.ts
client/search-ui/src/results/sidebar/SearchReference.tsx
client/shared/src/search/query/completion.test.ts
client/shared/src/search/query/providers.test.ts
@indradhanush cmd/gitserver/server/vcs_syncer_jvm_packages_test.go
cmd/gitserver/server/vcs_syncer_npm_packages_test.go
internal/repos/npm_packages_test.go
@keegancsmith internal/search/alert/observer.go
internal/search/job/jobutil/job.go
internal/search/query/predicate.go
internal/search/query/predicate_test.go
internal/search/query/types.go
internal/search/repos/repos.go
internal/search/types.go
@limitedmage client/search-ui/src/input/extensions/completion.test.ts
client/search-ui/src/results/sidebar/SearchReference.tsx
@rvantonder client/shared/src/search/query/completion.test.ts
client/shared/src/search/query/providers.test.ts
doc/code_search/how-to/dependencies_search.md
doc/code_search/index.md
doc/code_search/reference/queries.md
doc/code_search/tutorials/examples.md
internal/search/query/predicate.go
internal/search/query/predicate_test.go
internal/search/query/types.go
@ryanslade cmd/gitserver/server/vcs_syncer_jvm_packages_test.go
cmd/gitserver/server/vcs_syncer_npm_packages_test.go
internal/repos/npm_packages_test.go
@sashaostrikov internal/repos/npm_packages_test.go
@sourcegraph/delivery doc/admin/external_service/go.md
doc/admin/external_service/npm.md
doc/admin/external_service/python.md
@tsenart internal/repos/npm_packages_test.go
@unknwon dev/gqltest/search_test.go
enterprise/cmd/frontend/internal/authz/resolvers/resolver_test.go
enterprise/cmd/frontend/internal/licensing/resolvers/resolvers_test.go
internal/gqltestutil/policies.go

@@ -654,13 +654,6 @@
"group": "Code intelligence",
"default": false
},
"codeIntelLockfileIndexing.enabled": {
Copy link
Member

Choose a reason for hiding this comment

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

can we remove this or do we have to deprecate it? every config that has this key will no longer validate and thus cannot be updated anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I considered that, but I highly doubt someone has ever turned this on except for me. It wasn't mentioned in any blog post or changelog entry. But yeah, can deprecate it instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. But I removed the experimentalFeatures.DependenciesSearch flag. I think experimentalFeatures flags should be removable.

Copy link
Member

@eseliger eseliger left a comment

Choose a reason for hiding this comment

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

Appreciated that we remove things we don't maintain.

@mrnugget mrnugget requested review from stefanhengl and a team August 1, 2022 11:27
Short version: we currently don't have the time and resources to
properly invest in dependency enough to make it both a feature that's
useful for customers and one that meets our technical bar.

We use version control. There's no advantage to keeping code around "in
case we need it again" (we can always restore using `git`), but multiple
disadvantages (people stumble on this code and wonder whether/how it's
used, it needs to be maintained, its tests take up runtime, ...).

So that's why we're removing it.

Longer version:

As [@sqs announced](https://sourcegraph.slack.com/archives/C03L2R35ENL/p1659142618246179),
dep search is one of the "things we are saying NO to as we look to 4.0".

It might come because, because we're saying No "(until it can be done solidly, which is not now)".

I myself wrote on Slack:

> I’ve had multiple conversations with @sqs about this in the past week
> and we came to the conclusion that in order to make dependency search a
> useful feature we’re proud of, we’d need to invest a lot more time and
> resources. But now is not a good time to do that. We have other problems
> to solve right now that are higher-priority than adding a new feature
> we’re unsure about.

> Even if I were to continue working on Dependency Search for the next,
> say, 6 months, it’s unclear whether Dependency Search in its current
> “architecture” (in the product and in the technical sense) is what would
> solve some important customer problems. We would maybe need to rethink
> it from the ground up. For example: focus on reverse-dependency search
> from the beginning, or focus more on “search dependency relationships”
> instead of “search inside dependencies”. Or, in the words of @eric
> Fritz: “the lego bricks don’t seem to line up”.

So, here we go, let's remove the code :)

Technicalities:

* It drops all of the database tables used by dependency search
* It removes all of the code used for dependency search: backend,
  frontend, ...
* It removes docs
* It removes the feature/site-config flag
* It does **NOT** remove the code in `./internal/codeintel/dependencies`
  that's used for packages.
@efritz
Copy link
Contributor

efritz commented Aug 1, 2022

Why are you deleting so much of the dependency indexing stuff? Can't we leave some of the background stuff in place? I'd like to use what we were building for code intel as well...

@mrnugget
Copy link
Contributor Author

mrnugget commented Aug 1, 2022

Why are you deleting so much of the dependency indexing stuff? Can't we leave some of the background stuff in place? I'd like to use what we were building for code intel as well...

See PR description:

There's no advantage to keeping code around "in case we need it again" (we can always restore using git), but multiple disadvantages (people stumble on this code and wonder whether/how it's used, it needs to be maintained, its tests take up runtime, ...).

The dependency indexing stuff was built for dependency search. It's then completely unused. When would you use it? And can't you restore then?

@efritz
Copy link
Contributor

efritz commented Aug 1, 2022

And can't you restore then?

Yes, that's actually fine.

@mrnugget
Copy link
Contributor Author

mrnugget commented Aug 1, 2022

(Give me a sec, I need to remove more mentions of repo:deps - in sidebar reference, for example)

@mrnugget mrnugget merged commit 495cd5e into main Aug 1, 2022
@mrnugget mrnugget deleted the mrn/remove-dep-search branch August 1, 2022 14:29
@rvantonder
Copy link
Contributor

rvantonder commented Aug 1, 2022

I was thinking of using the dependency primitive in search (not the aspirational "full on dependency search for realsies" feature we were planning) for some exploratory things, but I guess I'll branch and restore if it amounts to anything 😆.

My impression is that repo:deps sorta kinda worked right? Like, if we left repo:deps() in that would still remain fairly (technically) operational, not to speak of the ownership/maintenance cost. Is that accurate? repo:revdeps seemed like it had more technical limitations. Just trying to get a grasp on what the technical limitations were of the current state that didn't "meet the technical bar".

Post edit: my questions are not directed at anything 4.0 related or talking about this as a feature release. Just want to see any high level points on what the limitations are to using this in the current state, say, internally.

@mrnugget
Copy link
Contributor Author

mrnugget commented Aug 1, 2022

My impression is that repo:deps sorta kinda worked right? Like, if we left repo:deps() in that would still remain fairly (technically) operational

Well, kinda. There's no obvious bugs or problems with it. It's not being removed because it falls over 4 times a day.

But: with the old index-repo-on-request model of dependency search it worked out of the box, but was unreliable (no comprehensive results, different degrees of quality changing from language to language and lockfile version to version, lot of timeouts, huge load on the backend in spurts, ...). The new model was reliable and explicit, but its out-of-the-box experience was not great (you had to setup a package host connection, then lockfile-index the relevant repositories, possibly the packages that then result from this indexing, then query) and didn't ultimately solve problems customers were interested in (everyone is interested in full dependency graph that's trustworthy, searching for something inside a set of dependencies is not something folks ask for). Or in other words: you had to do the same dance you have to do to get precise code intel, except that it wasn't 100% precise and absolutely-not precise for most languages we supported, and the feature wasn't as useful as precise code intel.

If you're curious, you can watch the Zoom recording mentioned here to see what the thinking was ~2 weeks ago that lead to this.

Just trying to get a grasp on what the technical limitations were of the current state that didn't "meet the technical bar".

I'd say we've have to improve the out-of-the-box flow immensely, we'd have to invest in packages (see #packages for recent conversations around that), we'd need to improve the parsers for all languages we support (or reduce number of languages we support), then work hard to ensure we are comprehensive and don't return false positive or false negatives, etc. All of this combined makes it really uncomfortable to demo the feature to customers when knowing that we can't invest more than one IC working on it for forseeable future.

@rvantonder
Copy link
Contributor

Thanks @mrnugget that's exactly what I wanted to know. Makes sense given the cost of precise resolution vs easy-but-unreliable tradeoffs. I'll explore my ideas in a branch, maybe it can fold into future effort 😄

mrnugget added a commit that referenced this pull request Aug 16, 2022
This should've been part of
#39742 but I missed it.

@lguychard also removed something else I missed: https://github.com/sourcegraph/sourcegraph/pull/40164/files

This here now removes the highlighting/completion of the
`repo:deps|revdeps|dependencies|dependents` predicates.

I kept the metrics in as to not break anything.

This should fix #40160.
mrnugget added a commit that referenced this pull request Aug 16, 2022
This should've been part of
#39742 but I missed it.

@lguychard also removed something else I missed: https://github.com/sourcegraph/sourcegraph/pull/40164/files

This here now removes the highlighting/completion of the
`repo:deps|revdeps|dependencies|dependents` predicates.

I kept the metrics in as to not break anything.

This should fix #40160.
jdorfman pushed a commit that referenced this pull request Aug 17, 2022
This should've been part of
#39742 but I missed it.

@lguychard also removed something else I missed: https://github.com/sourcegraph/sourcegraph/pull/40164/files

This here now removes the highlighting/completion of the
`repo:deps|revdeps|dependencies|dependents` predicates.

I kept the metrics in as to not break anything.

This should fix #40160.
mrnugget added a commit that referenced this pull request Aug 19, 2022
This was deleted along with dependency search in #39742.
mrnugget added a commit that referenced this pull request Aug 19, 2022
This was deleted along with dependency search in #39742.
mrnugget added a commit that referenced this pull request Aug 23, 2022
This job was accidentally removed in #39742 as part of the
`dependencies_job.go`.

The commit here restores it by restoring the `cratessyncer` in a
separate worker job.

That fixes #37698.
mrnugget added a commit that referenced this pull request Aug 24, 2022
This job was accidentally removed in #39742 as part of the
`dependencies_job.go`.

The commit here restores it by restoring the `cratessyncer` in a
separate worker job.

That fixes #37698.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants