Enable deprecation error for v1.17.0 (#18341)
Co-authored-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
16d378fefc
commit
1d98d205f5
10 changed files with 84 additions and 52 deletions
|
@ -14,32 +14,20 @@ import (
|
|||
"github.com/gobwas/glob"
|
||||
)
|
||||
|
||||
// enumerates all the indexer queue types
|
||||
const (
|
||||
LevelQueueType = "levelqueue"
|
||||
ChannelQueueType = "channel"
|
||||
RedisQueueType = "redis"
|
||||
)
|
||||
|
||||
var (
|
||||
// Indexer settings
|
||||
Indexer = struct {
|
||||
IssueType string
|
||||
IssuePath string
|
||||
IssueConnStr string
|
||||
IssueIndexerName string
|
||||
IssueQueueType string // DEPRECATED - replaced by queue.issue_indexer
|
||||
IssueQueueDir string // DEPRECATED - replaced by queue.issue_indexer
|
||||
IssueQueueConnStr string // DEPRECATED - replaced by queue.issue_indexer
|
||||
IssueQueueBatchNumber int // DEPRECATED - replaced by queue.issue_indexer
|
||||
StartupTimeout time.Duration
|
||||
IssueType string
|
||||
IssuePath string
|
||||
IssueConnStr string
|
||||
IssueIndexerName string
|
||||
StartupTimeout time.Duration
|
||||
|
||||
RepoIndexerEnabled bool
|
||||
RepoType string
|
||||
RepoPath string
|
||||
RepoConnStr string
|
||||
RepoIndexerName string
|
||||
UpdateQueueLength int // DEPRECATED - replaced by queue.issue_indexer
|
||||
MaxIndexerFileSize int64
|
||||
IncludePatterns []glob.Glob
|
||||
ExcludePatterns []glob.Glob
|
||||
|
@ -49,7 +37,6 @@ var (
|
|||
IssuePath: "indexers/issues.bleve",
|
||||
IssueConnStr: "",
|
||||
IssueIndexerName: "gitea_issues",
|
||||
IssueQueueType: LevelQueueType,
|
||||
|
||||
RepoIndexerEnabled: false,
|
||||
RepoType: "bleve",
|
||||
|
@ -72,11 +59,12 @@ func newIndexerService() {
|
|||
Indexer.IssueIndexerName = sec.Key("ISSUE_INDEXER_NAME").MustString(Indexer.IssueIndexerName)
|
||||
|
||||
// The following settings are deprecated and can be overridden by settings in [queue] or [queue.issue_indexer]
|
||||
Indexer.IssueQueueType = sec.Key("ISSUE_INDEXER_QUEUE_TYPE").MustString("")
|
||||
Indexer.IssueQueueDir = filepath.ToSlash(sec.Key("ISSUE_INDEXER_QUEUE_DIR").MustString(""))
|
||||
Indexer.IssueQueueConnStr = sec.Key("ISSUE_INDEXER_QUEUE_CONN_STR").MustString("")
|
||||
Indexer.IssueQueueBatchNumber = sec.Key("ISSUE_INDEXER_QUEUE_BATCH_NUMBER").MustInt(0)
|
||||
Indexer.UpdateQueueLength = sec.Key("UPDATE_BUFFER_LEN").MustInt(0)
|
||||
// FIXME: DEPRECATED to be removed in v1.18.0
|
||||
deprecatedSetting("indexer", "ISSUE_INDEXER_QUEUE_TYPE", "queue.issue_indexer", "TYPE")
|
||||
deprecatedSetting("indexer", "ISSUE_INDEXER_QUEUE_DIR", "queue.issue_indexer", "DATADIR")
|
||||
deprecatedSetting("indexer", "ISSUE_INDEXER_QUEUE_CONN_STR", "queue.issue_indexer", "CONN_STR")
|
||||
deprecatedSetting("indexer", "ISSUE_INDEXER_QUEUE_BATCH_NUMBER", "queue.issue_indexer", "BATCH_LENGTH")
|
||||
deprecatedSetting("indexer", "UPDATE_BUFFER_LEN", "queue.issue_indexer", "LENGTH")
|
||||
|
||||
Indexer.RepoIndexerEnabled = sec.Key("REPO_INDEXER_ENABLED").MustBool(false)
|
||||
Indexer.RepoType = sec.Key("REPO_INDEXER_TYPE").MustString("bleve")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue