Skip to content

Commit 33c3ec1

Browse files
authored
Stop explicitly watching temp queued experiment directories (already covered) (#4610)
1 parent 9c39940 commit 33c3ec1

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

extension/src/cli/dvc/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const TEMP_PLOTS_DIR = join(DOT_DVC, 'tmp', 'plots')
99

1010
export const FIELD_SEPARATOR = '::'
1111

12-
export const TEMP_EXP_DIR = join(DOT_DVC, 'tmp', 'exps')
12+
const TEMP_EXP_DIR = join(DOT_DVC, 'tmp', 'exps')
1313
const TEMP_EXP_RUN_DIR = join(TEMP_EXP_DIR, 'run')
1414
export const DVCLIVE_ONLY_RUNNING_SIGNAL_FILE = join(
1515
TEMP_EXP_RUN_DIR,

extension/src/data/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export abstract class BaseData<
8282
)
8383
}
8484

85-
protected listener(path: string) {
85+
private listener(path: string) {
8686
const relPath = relative(this.dvcRoot, path)
8787
if (
8888
this.getWatchedFiles().some(

extension/src/experiments/data/index.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { join } from 'path'
21
import { collectBranches, collectFiles } from './collect'
32
import {
43
EXPERIMENTS_GIT_LOGS_REFS,
@@ -18,8 +17,7 @@ import {
1817
Args,
1918
DOT_DVC,
2019
DVCLIVE_STEP_COMPLETED_SIGNAL_FILE,
21-
ExperimentFlag,
22-
TEMP_EXP_DIR
20+
ExperimentFlag
2321
} from '../../cli/dvc/constants'
2422
import { COMMITS_SEPARATOR, gitPath } from '../../cli/git/constants'
2523
import { getGitPath } from '../../fileSystem'
@@ -51,7 +49,6 @@ export class ExperimentsData extends BaseData<ExperimentsOutput> {
5149
this.experiments = experiments
5250

5351
void this.watchExpGitRefs()
54-
void this.watchQueueDirectories()
5552
void this.managedUpdate()
5653
this.waitForInitialLocalData()
5754
}
@@ -188,15 +185,6 @@ export class ExperimentsData extends BaseData<ExperimentsOutput> {
188185
)
189186
}
190187

191-
private watchQueueDirectories() {
192-
const tempQueueDirectory = join(this.dvcRoot, TEMP_EXP_DIR)
193-
return createFileSystemWatcher(
194-
disposable => this.dispose.track(disposable),
195-
getRelativePattern(tempQueueDirectory, '**'),
196-
(path: string) => this.listener(path)
197-
)
198-
}
199-
200188
private async updateRemoteExpRefs() {
201189
const [lsRemoteOutput] = await Promise.all([
202190
this.internalCommands.executeCommand(

extension/src/test/suite/experiments/data/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ suite('Experiments Data Test Suite', () => {
8383
await data.isReady()
8484

8585
expect(mockExpShow).to.be.calledOnce
86-
expect(mockCreateFileSystemWatcher).to.be.calledTwice
86+
expect(mockCreateFileSystemWatcher).to.be.calledOnce
8787

8888
expect(getArgOfCall(mockCreateFileSystemWatcher, 0, 2)).to.deep.equal(
8989
new RelativePattern(getTestWorkspaceFolder(), '**')

0 commit comments

Comments
 (0)