This repository was archived by the owner on Sep 30, 2024. It is now read-only.
chore(cody): allow setting "cody.contextFilters" in site config without feature flag#63881
Merged
Merged
Conversation
Previously, Sourcegraph Enterprise instances with context filters enabled rejected requests from all unknown clients out of concern that they might not respect context filters. This behavior makes it incredibly impractical to release now agent-based clients (CLI, Eclipse, Visual Studio, Neovim, ..) that do respect context filters out of the box thanks to the reused logic in the Cody agent. This logic suffers from both false positives and false negatives: - False negatives: upcoming Cody clients (CLI, Eclipse, Visual Studio) already support context filters out of the box thanks to using the Cody agent but they can't send requests unless we add a special case to them. - False positive: a malicious client can always fake that it's "jetbrains" with a valid version number even if the client doesn't respect context filters. This gives a false sense of security because it doesn't prevent malicious traffic from bypassing context filters. Now, with this change, Sourcegraph Enterprise instances only reject requests from old versions of Cody clients that are known to not support context filters. This ensures we never have false positives or false negatives.
…nterprise-instances' of github.com:sourcegraph/sourcegraph
aramaraju
approved these changes
Jul 17, 2024
aramaraju
left a comment
There was a problem hiding this comment.
Looks good, thanks @taras-yemets !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cody context filters support is now supported by default by all Cody clients (see also this thread). Thus we no longer need to gate instance admins from setting `"cody.contextFilters" in the site config as we know there's suffient feature support on the client side.
This PR is technically a revert of https://github.com/sourcegraph/sourcegraph/pull/62231.
Remove feature flag from s2 config:
Test plan
cody-context-filters-enabledfeature flag enabledChangelog