Remove unused settings and env vars (#58580)

Found while cleaning up sourcegraph.com
This commit is contained in:
Erik Seliger 2023-11-27 10:08:12 +01:00 committed by GitHub
parent efc65f62de
commit 7cdadb80ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 16 deletions

View File

@ -56,7 +56,6 @@ oci_image(
"CODEINTEL_PGPORT": "5432",
"CODEINTEL_PGSSLMODE": "disable",
"CODEINTEL_PGUSER": "sg",
"PUBLIC_REPO_REDIRECTS": "true",
},
tars = [":tar_frontend"],
user = "sourcegraph",

View File

@ -154,16 +154,16 @@ func TestMergeSettings(t *testing.T) {
}, {
name: "merge int",
left: &schema.Settings{
SearchContextLines: 0,
CodeIntelligenceAutoIndexPopularRepoLimit: 1,
SearchContextLines: 0,
HistoryDefaultPageSize: 1,
},
right: &schema.Settings{
SearchContextLines: 1,
CodeIntelligenceAutoIndexPopularRepoLimit: 0, // This is the zero value, so will not override a previous non-zero value
SearchContextLines: 1,
HistoryDefaultPageSize: 0, // This is the zero value, so will not override a previous non-zero value
},
expected: &schema.Settings{
SearchContextLines: 1,
CodeIntelligenceAutoIndexPopularRepoLimit: 1, // This is the zero value, so will not override a previous non-zero value
SearchContextLines: 1,
HistoryDefaultPageSize: 1, // This is the zero value, so will not override a previous non-zero value
},
}, {
name: "deep merge struct pointer",

View File

@ -2229,8 +2229,6 @@ type Settings struct {
CodeIntelMixPreciseAndSearchBasedReferences bool `json:"codeIntel.mixPreciseAndSearchBasedReferences,omitempty"`
// CodeIntelTraceExtension description: Whether to enable trace logging on the extension.
CodeIntelTraceExtension bool `json:"codeIntel.traceExtension,omitempty"`
// CodeIntelligenceAutoIndexPopularRepoLimit description: Up to this number of repos are auto-indexed automatically. Ordered by star count.
CodeIntelligenceAutoIndexPopularRepoLimit int `json:"codeIntelligence.autoIndexPopularRepoLimit,omitempty"`
// ExperimentalFeatures description: Experimental features and settings.
ExperimentalFeatures *SettingsExperimentalFeatures `json:"experimentalFeatures,omitempty"`
// FileSidebarVisibleByDefault description: Whether the sidebar on the repo view should be open by default.
@ -2326,7 +2324,6 @@ func (v *Settings) UnmarshalJSON(data []byte) error {
delete(m, "codeIntel.disableSearchBased")
delete(m, "codeIntel.mixPreciseAndSearchBasedReferences")
delete(m, "codeIntel.traceExtension")
delete(m, "codeIntelligence.autoIndexPopularRepoLimit")
delete(m, "experimentalFeatures")
delete(m, "fileSidebarVisibleByDefault")
delete(m, "history.defaultPageSize")

View File

@ -370,12 +370,6 @@
"description": "The timeout (in milliseconds) for un-indexed search requests.",
"type": "number"
},
"codeIntelligence.autoIndexPopularRepoLimit": {
"description": "Up to this number of repos are auto-indexed automatically. Ordered by star count.",
"type": "integer",
"minimum": 0,
"default": 0
},
"search.contextLines": {
"description": "The default number of lines to show as context below and above search results. Default is 1.",
"type": "integer",