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

Revert perf(git): use sub-tree scan mode for config files scan #6747

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 2 additions & 10 deletions core/src/garden.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ export class Garden {
public readonly localConfigStore: LocalConfigStore
public globalConfigStore: GlobalConfigStore
public readonly vcs: VcsHandler
private readonly configScanVcs: VcsHandler
public events: EventBus
private tools?: { [key: string]: PluginTool }
public readonly configTemplates: { [name: string]: ConfigTemplateConfig }
Expand Down Expand Up @@ -387,19 +386,12 @@ export class Garden {
const gitMode = params.projectConfig.scan?.git?.mode || gardenEnv.GARDEN_GIT_SCAN_MODE
const handlerCls = gitMode === "repo" ? GitRepoHandler : GitSubTreeHandler

const vcsCache = new TreeCache()
this.vcs = new handlerCls({
garden: this,
projectRoot: params.projectRoot,
gardenDirPath: params.gardenDirPath,
ignoreFile: params.dotIgnoreFile,
cache: vcsCache,
})
this.configScanVcs = new GitSubTreeHandler({
projectRoot: params.projectRoot,
gardenDirPath: params.gardenDirPath,
ignoreFile: params.dotIgnoreFile,
cache: vcsCache,
cache: new TreeCache(),
})

// Use the legacy build sync mode if
Expand Down Expand Up @@ -1380,7 +1372,7 @@ export class Garden {
log.silly(() => `Scanning for configs in ${path}`)

return findConfigPathsInPath({
vcs: this.configScanVcs,
vcs: this.vcs,
dir: path,
include: this.moduleIncludePatterns,
exclude: this.moduleExcludePatterns,
Expand Down