diff --git a/garden-service/src/plugins/exec.ts b/garden-service/src/plugins/exec.ts index 6bc113547d..c057caed1f 100644 --- a/garden-service/src/plugins/exec.ts +++ b/garden-service/src/plugins/exec.ts @@ -15,13 +15,12 @@ import { createGardenPlugin } from "../types/plugin/plugin" import { Module } from "../types/module" import { CommonServiceSpec } from "../config/service" import { BaseTestSpec, baseTestSpecSchema } from "../config/test" -import { readModuleVersionFile, writeModuleVersionFile, ModuleVersion } from "../vcs/vcs" +import { writeModuleVersionFile } from "../vcs/vcs" import { GARDEN_BUILD_VERSION_FILENAME } from "../constants" import { ModuleSpec, BaseBuildSpec, baseBuildSpecSchema, ModuleConfig } from "../config/module" import { BaseTaskSpec, baseTaskSpecSchema } from "../config/task" import { dedent } from "../util/string" import { ConfigureModuleParams, ConfigureModuleResult } from "../types/plugin/module/configure" -import { GetBuildStatusParams, BuildStatus } from "../types/plugin/module/getBuildStatus" import { BuildModuleParams, BuildResult } from "../types/plugin/module/build" import { TestModuleParams } from "../types/plugin/module/testModule" import { TestResult } from "../types/plugin/module/getTestResult" @@ -200,23 +199,6 @@ export async function configureExecModule({ return { moduleConfig } } -export async function getExecModuleBuildStatus({ module }: GetBuildStatusParams): Promise { - const buildVersionFilePath = join(module.buildMetadataPath, GARDEN_BUILD_VERSION_FILENAME) - let builtVersion: ModuleVersion | null = null - - try { - builtVersion = await readModuleVersionFile(buildVersionFilePath) - } catch (_) { - // just ignore this error, can be caused by an outdated format - } - - if (builtVersion && builtVersion.versionString === module.version.versionString) { - return { ready: true } - } - - return { ready: false } -} - export async function buildExecModule({ module }: BuildModuleParams): Promise { const output: BuildResult = {} const { command } = module.spec.build @@ -353,7 +335,6 @@ export const execPlugin = createGardenPlugin({ }), handlers: { configure: configureExecModule, - getBuildStatus: getExecModuleBuildStatus, build: buildExecModule, runTask: runExecTask, testModule: testExecModule, diff --git a/garden-service/test/unit/src/plugins/exec.ts b/garden-service/test/unit/src/plugins/exec.ts index 4bd2388a09..56e9d5fdf0 100644 --- a/garden-service/test/unit/src/plugins/exec.ts +++ b/garden-service/test/unit/src/plugins/exec.ts @@ -7,7 +7,7 @@ import { LogEntry } from "../../../../src/logger/log-entry" import { keyBy } from "lodash" import { getDataDir, makeTestModule, expectError } from "../../../helpers" import { TaskTask } from "../../../../src/tasks/task" -import { writeModuleVersionFile, readModuleVersionFile } from "../../../../src/vcs/vcs" +import { readModuleVersionFile } from "../../../../src/vcs/vcs" import { dataDir, makeTestGarden } from "../../../helpers" import { ModuleConfig } from "../../../../src/config/module" import { ConfigGraph } from "../../../../src/config-graph" @@ -249,22 +249,6 @@ describe("exec plugin", () => { }) }) - describe("getBuildStatus", () => { - it("should read a build version file if it exists", async () => { - const module = await graph.getModule(moduleName) - const version = module.version - const buildMetadataPath = module.buildMetadataPath - const versionFilePath = join(buildMetadataPath, GARDEN_BUILD_VERSION_FILENAME) - - await writeModuleVersionFile(versionFilePath, version) - - const actions = await garden.getActionRouter() - const result = await actions.getBuildStatus({ log, module }) - - expect(result.ready).to.be.true - }) - }) - describe("build", () => { it("should write a build version file after building", async () => { const module = await graph.getModule(moduleName)