Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions specs/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type Source struct {
Path string `json:"path,omitempty"`
// Registry can be github,local,grpc.
Registry Registry `json:"registry,omitempty"`
Concurrency uint64 `json:"concurrency,omitempty"` // deprecated: use TableConcurrency and ResourceConcurrency instead
TableConcurrency uint64 `json:"table_concurrency,omitempty"`
ResourceConcurrency uint64 `json:"resource_concurrency,omitempty"`
// Tables to sync from the source plugin
Expand Down Expand Up @@ -53,6 +54,12 @@ func (s *Source) SetDefaults() {
s.Tables = []string{"*"}
}

if s.Concurrency != 0 && s.TableConcurrency == 0 && s.ResourceConcurrency == 0 {
// attempt to make a sensible backwards-compatible choice, but the CLI
// should raise a warning about this until the `concurrency` option is fully removed.
s.TableConcurrency = s.Concurrency
s.ResourceConcurrency = s.Concurrency
}
if s.TableConcurrency == 0 {
s.TableConcurrency = defaultTableConcurrency
}
Expand Down